Skip to content

Commit 4d32164

Browse files
committed
move setup.cfg to pyproject.toml
1 parent 795794e commit 4d32164

16 files changed

Lines changed: 101 additions & 95 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
### Changed
1313

14+
* Moved from setup.cfg/.py to pyproject.toml [#351](https://github.com/NLeSC/python-template/issues/351)
1415
* Moved from prospector to ruff [#336](https://github.com/NLeSC/python-template/issues/336)
1516
* Renamed `project_name` to `directory_name` in cookiecutter questionnaire
1617
* Initial linting is error free [#227](https://github.com/NLeSC/python-template/issues/227)

hooks/pre_gen_project.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"directory_name": cookiecutter.directory_name.lower().replace(" ", "-"),
77
"full_name": cookiecutter.full_name.replace('\"', '\\\"'),
88
"repository": "git@github.com:" + cookiecutter.github_organization + "/" + cookiecutter.directory_name.lower().replace(" ", "-"),
9+
"repository_url": "https://github.com/" + cookiecutter.github_organization + "/" + cookiecutter.directory_name.lower().replace(" ", "-"),
910
"package_short_description": cookiecutter.package_short_description.replace('\"', '\\\"')
1011
}) }}

{{cookiecutter.directory_name}}/.github/next_steps/01_sonarcloud_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: 'Next step: Sonarcloud integration'
44

55
Continuous code quality can be handled by [Sonarcloud](https://sonarcloud.io/). This repository is configured to use Sonarcloud to perform quality analysis and code coverage report on each push.
66

7-
In order to configure Sonarcloud analysis [GitHub Action workflow]({{cookiecutter.repository}}/blob/main/.github/workflows/sonarcloud.yml) you must follow the steps below:
7+
In order to configure Sonarcloud analysis [GitHub Action workflow]({{cookiecutter.repository_url}}/blob/main/.github/workflows/sonarcloud.yml) you must follow the steps below:
88

99
1. go to [Sonarcloud](https://sonarcloud.io/projects/create) to create a new Sonarcloud project
1010
1. login with your GitHub account

{{cookiecutter.directory_name}}/.github/next_steps/02_citation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 'Next step: Citation data'
33
---
44

5-
It is likely that your `CITATION.cff` currently doesn't pass validation. The error messages you get from the [`cffconvert`]({{cookiecutter.repository}}/actions/workflows/cffconvert.yml) GitHub Action are unfortunately a bit cryptic, but doing the following helps:
5+
It is likely that your `CITATION.cff` currently doesn't pass validation. The error messages you get from the [`cffconvert`]({{cookiecutter.repository_url}}/actions/workflows/cffconvert.yml) GitHub Action are unfortunately a bit cryptic, but doing the following helps:
66

77
- [ ] Check if the `given-name` and `family-name` keys need updating. If your family name has a name particle like `von` or `van` or `de`, use the `name-particle` key; if your name has a suffix like `Sr` or `IV`, use `name-suffix`. For details, refer to the schema description: https://github.com/citation-file-format/citation-file-format
88
- [ ] Update the value of the `orcid` key. If you do not have an orcid yet, you can get one here [https://orcid.org/](https://orcid.org/).
@@ -14,7 +14,7 @@ It is likely that your `CITATION.cff` currently doesn't pass validation. The err
1414
Once you do all the steps above, the `cffconvert` workflow will tell you what content it expected to see in `.zenodo.json`. Copy-paste from the GitHub Action log into a new file `.zenodo.json`. Afterwards, the `cffconvert` GitHub Action should be green.
1515

1616

17-
To help you keep the citation metadata up to date and synchronized, the [`cffconvert`]({{cookiecutter.repository}}/actions/workflows/cffconvert.yml) GitHub Action checks the following 6 aspects:
17+
To help you keep the citation metadata up to date and synchronized, the [`cffconvert`]({{cookiecutter.repository_url}}/actions/workflows/cffconvert.yml) GitHub Action checks the following 6 aspects:
1818

1919
1. Whether your repository includes a `CITATION.cff` file.
2020

{{cookiecutter.directory_name}}/.github/next_steps/03_readthedocs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ To host the documentation of this repository please perform the following instru
1515
2. make sure {{ cookiecutter.github_organization }} has been granted access.
1616
3. reload repository list on Read the Docs import page
1717
1. wait for the first build to be completed at <https://readthedocs.org/projects/{{ cookiecutter.directory_name }}/builds>
18-
1. check that the link of the documentation badge in the [README.md]({{ cookiecutter.repository }}) works
18+
1. check that the link of the documentation badge in the [README.md]({{ cookiecutter.repository_url }}) works
1919

20-
See [README.dev.md#]({{cookiecutter.repository}}/blob/main/README.dev.md#generating-the-api-docs) how to build documentation site locally.
20+
See [README.dev.md#]({{cookiecutter.repository_url}}/blob/main/README.dev.md#generating-the-api-docs) how to build documentation site locally.

{{cookiecutter.directory_name}}/.github/next_steps/04_zenodo_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To enable Zenodo integration:
88

99
1. Go to http://zenodo.org and login with your GitHub account. When you are redirected to GitHub, *Authorize application* to give permission to Zenodo to access your account.
1010
1. Go to <https://zenodo.org/account/settings/github/> and enable Zenodo integration of your repository by clicking on `On` toggle button.
11-
2. Your package will get a DOI only after you make a release. Create a new release as described in [README.dev.md]({{cookiecutter.repository}}/blob/main/README.dev.md#33-github)
11+
2. Your package will get a DOI only after you make a release. Create a new release as described in [README.dev.md]({{cookiecutter.repository_url}}/blob/main/README.dev.md#33-github)
1212
3. At this point you should have a DOI. To find out the DOI generated by Zenodo:
1313
1. Visit https://zenodo.org/deposit and click on your repository link
1414
2. You will find the latest DOI in the right column in Versions box in **Cite all versions?** section

{{cookiecutter.directory_name}}/.github/next_steps/05_linting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: 'Next step: Linting'
33
---
44

5-
Your repository has a [workflow]({{ cookiecutter.repository }}/blob/main/.github/workflows/build.yml) which [lints](https://en.wikipedia.org/wiki/Lint_(software)) your code after every push and when creating a pull request.
5+
Your repository has a [workflow]({{ cookiecutter.repository_url }}/blob/main/.github/workflows/build.yml) which [lints](https://en.wikipedia.org/wiki/Lint_(software)) your code after every push and when creating a pull request.
66

7-
Linter workflow may fail if `description` or `keywords` field in [setup.cfg]({{ cookiecutter.repository }}/blob/main/setup.cfg) is empty. Please update these fields. To validate your changes run:
7+
Linter workflow may fail if `description` or `keywords` field in [setup.cfg]({{ cookiecutter.repository_url }}/blob/main/setup.cfg) is empty. Please update these fields. To validate your changes run:
88

99
```shell
1010
ruff .

{{cookiecutter.directory_name}}/CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ authors:
1010
date-released: 20??-MM-DD
1111
doi: <insert your DOI here>
1212
version: "{{ cookiecutter.version }}"
13-
repository-code: "{{ cookiecutter.repository }}"
13+
repository-code: "{{ cookiecutter.repository_url }}"
1414
keywords:
1515
- {{ cookiecutter.keyword1 }}
1616
- {{ cookiecutter.keyword2 }}

{{cookiecutter.directory_name}}/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ The sections below outline the steps in each case.
1313

1414
## You have a question
1515

16-
1. use the search functionality [here]({{cookiecutter.repository}}/issues) to see if someone already filed the same issue;
16+
1. use the search functionality [here]({{cookiecutter.repository_url}}/issues) to see if someone already filed the same issue;
1717
2. if your issue search did not yield any relevant results, make a new issue;
1818
3. apply the "Question" label; apply other labels when relevant.
1919

2020
## You think you may have found a bug
2121

22-
1. use the search functionality [here]({{cookiecutter.repository}}/issues) to see if someone already filed the same issue;
22+
1. use the search functionality [here]({{cookiecutter.repository_url}}/issues) to see if someone already filed the same issue;
2323
1. if your issue search did not yield any relevant results, make a new issue, making sure to provide enough information to the rest of the community to understand the cause and context of the problem. Depending on the issue, you may want to include:
2424
- the [SHA hashcode](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas) of the commit that is causing your problem;
2525
- some identifying information (name and version number) for dependencies you're using;

{{cookiecutter.directory_name}}/README.dev.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,4 @@ twine upload dist/*
203203

204204
### (3/3) GitHub
205205

206-
Don't forget to also make a [release on GitHub]({{cookiecutter.repository}}/releases/new). If your repository uses the GitHub-Zenodo integration this will also trigger Zenodo into making a snapshot of your repository and sticking a DOI on it.
206+
Don't forget to also make a [release on GitHub]({{cookiecutter.repository_url}}/releases/new). If your repository uses the GitHub-Zenodo integration this will also trigger Zenodo into making a snapshot of your repository and sticking a DOI on it.

0 commit comments

Comments
 (0)