forked from cjolowicz/cookiecutter-hypermodern-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coverage, badges and documentation updates (#18)
- Replace read-the-docs links with GitHub pages links - Document project options, i.e questions asked when creating a project - Remove references to CodeCov and replace with SonarCloud - Support label skip-changelog - Fix badges - Fix SonarCloud coverage warning about unknown paths - Set coverage limit to 80 % - Replace old logo with Statistics Norway logo - Update dependencies
- Loading branch information
1 parent
5a20db1
commit 182e8f0
Showing
17 changed files
with
141 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,10 +217,10 @@ by pointing Cookiecutter to its [GitHub repository][hypermodern python cookiecut | |
Use the `--checkout` option with the [current stable release][2023.2.24]: | ||
|
||
```console | ||
$ cookiecutter gh:cjolowicz/cookiecutter-hypermodern-python --checkout="2023.2.24" | ||
$ cruft create https://github.com/statisticsnorway/ssb-pypitemplate.git --checkout=2023.2.24 | ||
``` | ||
|
||
Cookiecutter downloads the template, | ||
Cruft downloads the template, | ||
and asks you a series of questions about project variables, | ||
for example, how you wish your project to be named. | ||
When you have answered these questions, | ||
|
@@ -237,35 +237,38 @@ Here is a complete list of the project variables defined by this template: | |
- Description | ||
- Example | ||
- - `project_name` | ||
- Project name on PyPI and GitHub | ||
- `hypermodern-python` | ||
- Project name on PyPI and GitHub repo name | ||
- `ssb-library` | ||
- - `package_name` | ||
- Import name of the package | ||
- `hypermodern_python` | ||
- `ssb_library` | ||
- - `friendly_name` | ||
- Friendly project name | ||
- `Hypermodern Python` | ||
- `SSB Library` | ||
- - `copyright_owner` | ||
- Copyright owner | ||
- Statistics Norway | ||
- - `copyright_year` | ||
- The project copyright year | ||
- `2023` | ||
- - `author` | ||
- Primary author | ||
- Katherine Johnson | ||
- Name of the contact person | ||
- Ola Nordmann | ||
- - `email` | ||
- E-mail address of the author | ||
- [email protected] | ||
- E-mail address of the contact person | ||
- [email protected] | ||
- - `github_organization` | ||
- GitHub organization or GitHub username of the author | ||
- `katherine` | ||
- `statisticsnorway` | ||
- - `version` | ||
- Initial project version | ||
- `0.0.0` | ||
- - `copyright_year` | ||
- The project copyright year | ||
- `2023` | ||
- - `license` | ||
- The project license | ||
- `MIT` | ||
- - `development_status` | ||
- Development status of the project | ||
- `Development Status :: 3 - Alpha` | ||
- `Development Status :: 4 - Beta` | ||
|
||
::: | ||
|
||
|
@@ -279,7 +282,7 @@ Your choices are recorded in the file `.cookiecutter.json` in the generated proj | |
together with the URL of this Cookiecutter template. | ||
Having this [JSON] file in the project makes it possible later on | ||
to update your project with changes from the Cookiecutter template, | ||
using tools such as [cupper]. | ||
using tools such as [cruft]. | ||
|
||
In the remainder of this guide, | ||
`<project>` and `<package>` are used | ||
|
@@ -2613,7 +2616,7 @@ You can also read the articles on [this blog][hypermodern python blog]. | |
[cookiecutter]: https://github.com/cookiecutter/cookiecutter | ||
[coverage.py]: https://coverage.readthedocs.io/ | ||
[crazy-max/ghaction-github-labeler]: https://github.com/crazy-max/ghaction-github-labeler | ||
[cupper]: https://github.com/senseyeio/cupper | ||
[cruft]: https://cruft.github.io/cruft/ | ||
[curl]: https://curl.se | ||
[cyclomatic complexity]: https://en.wikipedia.org/wiki/Cyclomatic_complexity | ||
[darglint codes]: https://github.com/terrencepreilly/darglint#error-codes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
{{cookiecutter.project_name}}/.github/workflows/constraints.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pip==23.2.1 | ||
nox==2023.4.22 | ||
nox-poetry==1.0.3 | ||
poetry==1.5.1 | ||
virtualenv==20.24.2 | ||
poetry==1.6.1 | ||
virtualenv==20.24.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: DeployDocs | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ jobs: | |
if: "! steps.check-version.outputs.tag" | ||
uses: pypa/[email protected] | ||
with: | ||
repository_url: https://test.pypi.org/legacy/ | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish the release notes | ||
uses: release-drafter/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,8 +149,10 @@ jobs: | |
run: | | ||
nox --session=coverage -- xml | ||
- name: Upload coverage report | ||
uses: codecov/[email protected] | ||
# Need to fix coverage source paths for SonarCloud scanning in GitHub actions. | ||
# Replace root path with /github/workspace (mounted in docker container). | ||
- name: Override coverage source paths for SonarCloud | ||
run: sed -i "s/<source>\/home\/runner\/work\/{{cookiecutter.project_name}}\/{{cookiecutter.project_name}}/<source>\/github\/workspace/g" coverage.xml | ||
|
||
- name: SonarCloud Scan | ||
env: | ||
|
Oops, something went wrong.