Skip to content

Latest commit

 

History

History
88 lines (84 loc) · 4.7 KB

DEVELOPMENT.md

File metadata and controls

88 lines (84 loc) · 4.7 KB

Local Development

Enlistment

Enlistment in this repository involves these steps.

Step Command Line Description
1. Clone the repository locally git clone https://github.com/davidbrownell/AutoGitSemVer https://git-scm.com/docs/git-clone
2. Bootstrap the environment
Linux / MacOS ./Bootstrap.sh [--python-version <python version>]
Windows Bootstrap.cmd [--python-version <python version>]
Prepares the repository for local development by enlisting in all dependencies.
3. Activate the environment
Linux / MacOS . ./Activate.sh
Windows Activate.cmd

Activates the terminal for development. Each new terminal window must be activated.

Activate.sh/.cmd is actually a shortcut to the most recently bootstrapped version of python (e.g. Activate3.11.sh/.cmd). With this functionality, it is possible to support multiple python versions in the same repository and activate each in a terminal using the python-specific activation script.

4. [Optional] Deactivate the environment
Linux / MacOS . ./Deactivate.sh
Windows Deactivate.cmd
Deactivates the terminal environment. Deactivating is optional, as the terminal window itself may be closed when development activities are complete.

Development Activities

Each of these activities can be invoked from an activated terminal on your local machine.

Activity Command Line Description Invoked by Continuous Integration
Code Formatting python Build.py black [--format] Format source code using black based on settings in pyproject.toml.
Static Code Analysis python Build.py pylint Validate source code using pylint based on settings in pyproject.toml.
Automated Testing python Build.py pytest [--code-coverage] Run automated tests using pytest and (optionally) extract code coverage information using coverage based on settings in pyproject.toml.
Semantic Version Generation python Build.py update_version Generate a new Semantic Version based on git commits using AutoGitSemVer. Version information is stored in /src/AutoGitSemVer/__init__.py.
Python Package Creation

python Build.py package

Requires that the repository was bootstrapped with the --package flag.

Create a python package using setuptools based on settings in pyproject.toml.
Python Package Publishing

python Build.py publish

Requires that the repository was bootstrapped with the --package flag.

Publish a python package to PyPi.
Build Binaries python Build.py build_binaries Create a python binary for your current operating system using cx_Freeze based on settings in src/BuildBinary.py.
Development Docker Image python Build.py create_docker_image Create a docker image for a bootstrapped development environment. This functionality is useful when adhering to the FAIR principles for research software by supporting the creation of a development environment and its dependencies as they existed at the moment when the image was created.