{"id":21425382,"url":"https://github.com/utrechtuniversity/re-python-package-setuptools","last_synced_at":"2025-07-14T08:32:25.384Z","repository":{"id":91937112,"uuid":"590915843","full_name":"UtrechtUniversity/re-python-package-setuptools","owner":"UtrechtUniversity","description":"Simple python package template repository","archived":false,"fork":false,"pushed_at":"2024-03-06T10:24:53.000Z","size":18,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-08T05:51:15.213Z","etag":null,"topics":["github","project","python","template","template-repository"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UtrechtUniversity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-19T14:13:10.000Z","updated_at":"2024-03-08T08:37:41.000Z","dependencies_parsed_at":"2024-01-16T18:58:44.749Z","dependency_job_id":"271597f7-07df-4bda-a289-4fa54d90b1e7","html_url":"https://github.com/UtrechtUniversity/re-python-package-setuptools","commit_stats":null,"previous_names":["utrechtuniversity/re-python-package-setuptools"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/UtrechtUniversity/re-python-package-setuptools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UtrechtUniversity%2Fre-python-package-setuptools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UtrechtUniversity%2Fre-python-package-setuptools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UtrechtUniversity%2Fre-python-package-setuptools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UtrechtUniversity%2Fre-python-package-setuptools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UtrechtUniversity","download_url":"https://codeload.github.com/UtrechtUniversity/re-python-package-setuptools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UtrechtUniversity%2Fre-python-package-setuptools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265262648,"owners_count":23736442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","project","python","template","template-repository"],"created_at":"2024-11-22T21:28:12.067Z","updated_at":"2025-07-14T08:32:23.159Z","avatar_url":"https://github.com/UtrechtUniversity.png","language":null,"readme":"# Python packaging template with Setuptools\n\nThis template repository is created by the [UU Research Engineering team](https://utrechtuniversity.github.io/research-engineering/) and is aimed to provide a simple project template for python package development. This template uses [Setuptools](https://setuptools.pypa.io/en/latest/userguide/quickstart.html) as the packaging toolkit, there is another [template](https://github.com/UtrechtUniversity/re-python-package-poetry) that is very similar that uses [Poetry](https://python-poetry.org/).\n\nThe template includes:\n- Project directory structure\n- Project configuration using `pyproject.toml`\n- GitHub actions workflows for testing, linting, type checking and publishing on pypi\n\nMany other project templates exist, check for example this advanced [python template](https://github.com/NLeSC/python-template) by the NL eScience Center.\n\n## Dependencies\nThis template uses:\n| Tool | Aim |\n| --- | --- |\n| setuptools | building |\n| flake8, pylint | code linting |\n| pytest | testing |\n| pydocstyle | checking docstrings |\n| mypy | type checking |\n| sphinx | documentation generation |\n\nIf needed, most of these tools can be removed by simply removing the GitHub action that calls the tool, or by changing `pyproject.toml`\n\n## How to use\n\n### Step 1: Create new repository from this template\nClick `Use this template` at the top of this page to create a new repository using this template\n\n### Step 2: Change the name of your package in pyproject.toml\n- Change the name of the folder `packagename` to the name of your package\n- Open `pyproject.toml` and change `packagename` to the name of your package\n- Also change the authors and optionally any other items that you want to change\n\n### Step 3: Change GitHub Actions workflow\n- Open `.github/workflows/python-package.yml`\n- Change `packagename` to the name of your package (line 21)\n- Many actions are commented out, uncomment them when you want to start using them.\n\n### Step 4: Replace this README file with your README\n- You may use this [README template](https://github.com/UtrechtUniversity/rse-project-templates/blob/master/README-template.md)\n\n### Step 5: Change the license file\n- Open `LICENSE`, change the copyright holder when required (line 3)\n- Or replace the entire license file if another license applies\n\n### Step 6: Add a citation file\n- Create a citation file for your repository using [cffinit](https://citation-file-format.github.io/cff-initializer-javascript/#/)\n\n### Step 7: Publising on Pypi (optional/later)\nFor publishing the package on Pypi you need to create [API tokens](https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries).\n\n## Next Steps\n\nNow that you have succesfully created a package, there are some further steps to consider.\n\n### Tagging your commits\n\nWhen 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:\n\n```bash\ngit checkout main \u0026\u0026 git pull\ngit tag -a \"v1.2.0\" -m \"Version 1.2.0\"\ngit push --tags  # upload the tags to GitHub\n```\n\n### Publishing on Pypi \nFor publishing the package on Pypi you need to create [API tokens](https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries).\n\nIf 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.\n\nNote however that your first release on PyPi has to be done manually and can't be done using this method.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futrechtuniversity%2Fre-python-package-setuptools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futrechtuniversity%2Fre-python-package-setuptools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futrechtuniversity%2Fre-python-package-setuptools/lists"}