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 |
|
Prepares the repository for local development by enlisting in all dependencies. | ||||
3. Activate the environment |
|
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 |
|
Deactivates the terminal environment. Deactivating is optional, as the terminal window itself may be closed when development activities are complete. |
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 |
Requires that the repository was bootstrapped with the |
Create a python package using setuptools based on settings in pyproject.toml . |
✅ |
Python Package Publishing |
Requires that the repository was bootstrapped with the |
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. |