Anonymization and anonymization evaluation library
Project description
Python packaging template with Poetry
This template repository is created by the UU Research Engineering team and is aimed to provide a simple project template for python package development. This template uses Poetry as the packaging toolkit, there is another template that is very similar that uses Setuptools.
The template includes:
- Project directory structure
- Project configuration using
pyproject.toml - GitHub actions workflows for testing, linting, type checking and publishing on pypi
Many other project templates exist, check for example this advanced python template by the NL eScience Center.
Dependencies
This template uses:
| Tool | Aim |
|---|---|
| poetry | building |
| ruff | code linting |
| pytest | testing |
| mypy | type checking |
If needed, most of these tools can be removed by simply removing the GitHub action that calls the tool, or by changing pyproject.toml
How to use this template
Click Use this template at the top of this page to create a new repository using this template
You will probably want to install/modify the package locally. For this, you will need Poetry. It is recommended for new users of Poetry to read the documentation which is excellent. This template uses a plugin for automated versioning which should be installed. A quick start:
pip install pipx
pipx install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
Modificating the template for your package
Step 1: Create new repository from this template
Step 2: Change the name of your package in pyproject.toml
- Change the name of the folder
packagenameto the name of your package - Open
pyproject.tomland changepackagenameto the name of your package - Also change the authors and optionally any other items that you want to change
Step 3: Change GitHub Actions workflow
- Open
.github/workflows/python-package.yml - Change
packagenameto the name of your package (line 21) - Many actions are commented out, uncomment them when you want to start using them.
Step 4: Replace this README file with your README
- You may use this README template
Step 5: Change the license file
- Open
LICENSE, change the copyright holder when required (line 3) - Or replace the entire license file if another license applies
Step 6: Add a citation file
- Create a citation file for your repository using cffinit
Next Steps
Now that you have succesfully created a package, there are some further steps to consider.
Tagging your commits
When your library grows, you might want to give some commits (on main) a more human-readable tag, such as 1.2.0. To do this, do the following:
git checkout main && git pull
git tag -a "v1.2.0" -m "Version 1.2.0"
git push --tags # upload the tags to GitHub
Publishing on Pypi
For publishing the package on Pypi you need to create API tokens.
If you put this token in GitHub secrets with the name PYPI_API_TOKEN, then you can automatically generate a new release on PyPi by creating a release on GitHub. You have to select the tag that was created in the previous step.
Note however that your first release on PyPi has to be done manually and can't be done using this method.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyikaild-0.0.2.tar.gz.
File metadata
- Download URL: pyikaild-0.0.2.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
283407bea1b729949edd2b7a0ebcc518caa7c6d41a48fa4ce2b269d6754a1288
|
|
| MD5 |
899f7f16d0ec26df4a9f193510875e3b
|
|
| BLAKE2b-256 |
61e6c1f020dfca185bf11fe650d28ebe7fa5b4cb4eacb1ce4dd5754a4c6e8120
|
File details
Details for the file pyikaild-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pyikaild-0.0.2-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/5.15.167.4-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
207cb276cef615d7db1d86f450e8ab94e11d61980c10007d30a6324b7f69ada4
|
|
| MD5 |
2e1ce1420abc99237dc9d19460b55c68
|
|
| BLAKE2b-256 |
d0509be1a0ec30142667fcaedec9efe27b0d192961e13f12454189b11e4597eb
|