Observed since 20 Oct, 20:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Core library of the Aequitas project
A simple template of a Python project, with a rigid file structure, and predisposition for unit testing and release on PyPi.
aequitas-lib/)test/)unittestsetuptoolsDockerfileTODO comments into GitHub issues via the alstr/todo-to-issue-actionOverview:
<root directory>
├── aequitas-lib/ # main package (should be named after your project)
│ ├── __init__.py # python package marker
│ └── __main__.py # application entry point
├── test/ # test package (should contain unit tests)
├── .github/ # configuration of GitHub CI
│ └── workflows/ # configuration of GitHub Workflows
│ ├── check.yml # runs tests on multiple OS and versions of Python
│ └── deploy.yml # if check succeeds, and the current branch is one of {main, master}, triggers automatic releas on PyPi
├── MANIFEST.in # file stating what to include/exclude in releases
├── LICENSE # license file (Apache 2.0 by default)
├── pyproject.toml # declares build dependencies
├── renovate.json # configuration of Renovate bot, for automatic dependency updates
├── requirements-dev.txt # declares development dependencies
├── requirements.txt # declares runtime dependencies
├── setup.py # configuration of the package to be released on Pypi
└── Dockerfile # configuration of the Docker image to be realsed on Dockerhub
Use this template to create a new GitHub repository, say aequitas-lib
using_snake_case)Clone the aequitas-lib repository
Open a shell into your local aequitas-lib directory and run
./rename-template.sh aequitas-lib
This will coherently rename the template's project name with the one chosen by you (i.e. aequitas-lib, in this example)
Commit & push
Ensure you like the Apache 2.0 License. If you don't, change the content of the LICENSE file
Ensure the version reported in .python-version corresponds to the actual Python version you are willing to use to develop your project
Check the Python version and OS tests should be run on in CI, by looking the file .github/workflows/check.yml
Add your runtime dependencies to requirements.txt
requirements-dev.txtSet your project's release metadata and dependencies by editing setup.py
Change the assignee for pull-requests for automatic dependency updates by editing renovate.json
Add your PyPi credentials as secrets of the GitHub repository
PYPI_USERNAME (resp. PYPI_PASSWORD) for your username (resp. password)Generate a GitHub token and add it as a secret of the GitHub repository, named RELEASE_TOKEN
Put your main (resp. test) code in aequitas-lib/ (resp. test/)
This will execute the file aequitas-lib/__main__.py:
python -m aequitas-lib
python -m unittest discover -s test -t .
Tests are automatically run in CI, on all pushes on all branches. There, tests are executed on multiple OS (Win, Mac, Ubuntu) and on multiple Python versions (from
3.8to3.11).
pip install -r requirements-dev.txt
This paragraph is more understandable if the reader has some background about GitFlow
GitHub actions automatically release a new version of aequitas-lib on PyPi whenever commits are pushed on either the main/master or develop branches, as well as when new tags are pushed.
Tags are assumed to consist of semantic versioning strings of the form Major.Minor.Patch where Major, Minor, and Patch are non-negative integers.
So, to release version X.Y.Z, developers must:
tag a commit on the master/main/develop branch, using X.Y.Z as the tag label
git tag -a 'X.Y.Z' -m <a message here describing the version>
push the tag
git push --follow-tags
GitHub Actions will then run tests and, if all of them succeed, release the code on PyPi. After the release, users will be able to install your code via Pip.
Non-tagged commits pushed on the
master/main/developbranch will trigger dev releases. Dev releases are automatically tagged asX.Y.Y.devN, where
X.Y.Yis the value of the most recent version tagNis the amount of commits following the most recent version tag
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 11 Oct 2023 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b072e9c809521768c69c7290fff60eed0711bb4e5dae8259a751436e1108d14b