Common-Environment

Foundational Python libraries used across a variety of different projects and environments.


Keywords
Python, Library, Development, Foundation
License
BSL-1.0
Install
pip install Common-Environment==1.0.4

Documentation

Common_Environment

Foundational repository that implements functionality common to all development environments, including:

Contents

  1. Quick Start
  2. License
  3. Supported Platforms
  4. Definitions
  5. Functionality
  6. Docker Images
  7. Pip Install
  8. Dependencies
  9. Related Repositories
  10. Creating Your Own Repository
  11. Support

Quick Start

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>

License

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

Supported Platforms

This software has been verified on the following platforms.

Platform Scripting Environment Version
Windows Cmd.exe

Windows 10:

  • October 2018 Update
  • April 2018 Update
Windows PowerShell

Windows 10:

  • October 2018 Update
  • April 2018 Update
Linux Bash

Ubuntu:

  • 18.04
  • 16.04

Definitions

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's Setup_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 and python27.

Configurations are defined in a repository's Setup_custom.py file.

Functionality

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:

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:

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:

Linux Tester.sh /?
Windows Tester.cmd /?
Windows (PowerShell) Tester.ps1 /?

Docker Images

Docker images of Common_Environment are generated periodically.

dbrownell/common_environment:python36 An environment that is activated with python36.
dbrownell/common_environment:python27 An environment that is activated with python27.
dbrownell/common_environment:base An environment that is setup but not activated (useful as a base image for other Common_Environment-based images).

Pip Install

Common_Environment's implementation includes foundational python tools and functionality that is useful outside of the repository itself.

A wheel file with these tools are generated periodically and available via pip:

pip install Common-Environment

Dependencies

As this repository serves as the foundation for all other repositories, it has no dependencies.

Related Repositories

Common_EnvironmentEx Enhances Common_Environment with libraries, scripts, and tools common to different development activities.

Creating Your Own Repository

InitializeRepository.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/InitializeRepository.py
Windows python %DEVELOPMENT_ENVIRONMENT_FUNDAMENTAL%\RepositoryBootstrap\InitializeRepository.py
Windows (PowerShell) python $env:DEVELOPMENT_ENVIRONMENT_FUNDAMENTAL\RepositoryBootstrap\InitializeRepository.py

Support

For question or issues, please visit https://github.com/davidbrownell/Common_Environment_v3/issues.