Foundational repository that implements functionality common to all development environments, including:
- Dynamic repository relationship management
- Tool, Script, and Library dependency management
- Build tools
- Test tools
- Code Coverage tools
- Python bootstrapping activities
- Quick Start
- License
- Supported Platforms
- Definitions
- Functionality
- Docker Images
- Dependencies
- Creating Your Own Repository
- Support
Setup and Activate are required to begin using this repository.
- Setup
Setup installs/unpacks tools used during development activities and locates its repository dependencies (if any). Setup must be run on your machine after cloning the repository or after changing the file location of repositories that it depends upon (if any).
Linux Setup.sh
Windows Setup.cmd
Windows (PowerShell) Setup.ps1
- Activate
Activate prepares the current environment for development activities and must be run at least once in each terminal window.
Linux Activate.sh <python36|python27>
Windows Activate.cmd <python36|python27>
Windows (PowerShell) Activate.ps1 <python36|python27>
Common_Environment is licensed under the Boost Software License.
GitHub describes this license as:
A simple permissive license only requiring preservation of copyright and license notices for source (and not binary) distribution. Licensed works, modifications, and larger works may be distributed under different terms and without source code.
This repository distributes the following software:
Software | License |
---|---|
OpenSSL | OpenSSL License |
Pandoc | GNU GPL v2 |
Python | PSF License Agreement |
This software has been verified on the following platforms.
Platform | Scripting Environment | Version |
---|---|---|
Windows | Cmd.exe | Windows 10 April 2018 Update |
Windows | PowerShell | Windows 10 April 2018 Update |
Linux | Bash | Ubuntu 18.04, 16.04 |
- Tool
- A folder available in the environment's path after activation. A specific tool version can be specified using Version Specs.
- Script
- Content available in the environment's path after activation. Scripts do not have specific versions.
- Library
- A language-specific library available after activation; where the specifics of "availability" are based on the corresponding language. In Python, this means that the library is made available within the Python's site-packages directory. A specific library version can be specified using Version Specs.
- Repository
- A collection of code based on Common_Environment. A repository and those that it depends on are activated within an environment.
- Environment
- A repository that has been activated within a command window. Environments leverage Tools, Scripts, and Libraries it defines or are defined in any repository that it depends on.
- Version Specs
When a repository takes a dependency on another, version spec(ifications) can be used to activate specific versions of Tools and Libraries in those repositories.
The latest version of a Tool or Library is used if not customized by a version spec.
VersionSpecs
is defined in RepositoryBootstrap/SetupAndActivate/Configuration.py and is specified in a repository'sSetup_custom.py
file.
- Dependencies
- Repositories can be dependent upon other repositories. During activation, all Tools, Scripts, and Libraries from those repositories will be made available in addition to any Tools, Scripts, and Libraries made available by the current repository.
- Configuration
A repository may support configurations, where an individual configuration customizes Version Specs for the Tools, Scripts, and Libraries made available during activation. For example, the Common_Environment repository makes 2 configurations available:
python36
andpython27
.Configurations are defined in a repository's
Setup_custom.py
file.
- Python Bootstrap
Support for environment-specific instances of Python, each with distinct Libraries. Different environments with different Python library Version Specs can safely coexist on the same system.
This functionality is similar to a dynamic virtualenv.
- Build Tools
Plugin-based system for the arbitrary building of applications. For more information, see:
- Builder.py to invoke a build
- BuildImpl/__init__.py to implement a build
Linux Builder.sh /?
Windows Builder.cmd /?
Windows (PowerShell) Builder.ps1 /?
- Test Tools
Plugin-based system for the arbitrary testing of applications. For more information, see:
- Tester.py to execute tests
- Compilers/PythonVerifier.py for an example of a test compiler plugin
- TestParsers/PyUnittestTestParser.py for an example of a test framework plugin
- TestParserImpl/__init__.py to implement a test parser plugin
Linux Tester.sh /?
Windows Tester.cmd /?
Windows (PowerShell) Tester.ps1 /?
- Code Coverage Tools
Plugin-based system for the arbitrary extraction of code coverage information. For more information, see:
- Tester.py to execute tests
- TestExecutor/PyCoverageTestExecutor.py for an example of a code coverage / test executor plugin
- TestExecutorImpl/__init__.py to implement a test executor / code coverage extractor plugin
Linux Tester.sh /?
Windows Tester.cmd /?
Windows (PowerShell) Tester.ps1 /?
Docker images of Common_Environment are generated periodically.
Coming Soon | An environment that is setup but not activated (useful as a base image). |
Coming Soon | An environment that is activated. |
As this repository serves as the foundation for all other repositories, it has no dependencies.
Coming Soon | TODO |
CreateRepository.py is an interactive script used to create a new repository based on the Common_Environment framework.
From an activated environment, run:
Linux python $DEVELOPMENT_ENVIRONMENT_FUNDAMENTAL/RepositoryBootstrap/CreateRepository.py <Destination Repository Dir> <Repository Name>
Windows python %DEVELOPMENT_ENVIRONMENT_FUNDAMENTAL%\RepositoryBootstrap\CreateRepository.py <Destination Repository Dir> <Repository Name>
Windows (PowerShell) python $env:DEVELOPMENT_ENVIRONMENT_FUNDAMENTAL\RepositoryBootstrap\CreateRepository.py <Destination Repository Dir> <Repository Name>
The script will prompt you for information and then generate the necessary files in
<Destination Repository Dir>
.
For question or issues, please visit https://github.com/davidbrownell/v3-Common_Environment/issues.