Skip to content

Commit

Permalink
fix: minor fixes (#42)
Browse files Browse the repository at this point in the history
### What kind of change does this PR introduce?

Follow-up to last PR where some renaming was forgotten.

### Does this PR introduce a breaking change?
No
  • Loading branch information
Zeitsperre authored May 14, 2024
2 parents 33f63b3 + 033d506 commit 3d54a05
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tests/test_bake_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_bake_without_author_file(cookies):
# Assert there are no spaces in the toc tree
docs_index_path = result.project_path.joinpath("docs/index.rst")
with open(str(docs_index_path)) as index_file:
assert "releasing\n changes" in index_file.read()
assert "releasing\n changelog" in index_file.read()

# Check that
pyproject_path = result.project_path.joinpath("pyproject.toml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- This PR fixes #xyz
- [ ] (If applicable) Documentation has been added / updated (for bug fixes / features).
- [ ] (If applicable) Tests have been added.
- [ ] CHANGES.rst has been updated (with summary of main changes).
- [ ] CHANGELOG.rst has been updated (with summary of main changes).
- [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`) has been added.

### What kind of change does this PR introduce?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
{%- if cookiecutter.create_author_file == 'y' %}
- AUTHORS.rst
{%- endif %}
- CHANGES.rst
- CHANGELOG.rst
- CONTRIBUTING.rst
- Makefile
{%- if cookiecutter.make_docs == 'y' %}
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
paths-ignore:
- .cruft.json
- CHANGES.rst
- CHANGELOG.rst
- README.rst
- pyproject.toml
- tests/test_{{ cookiecutter.project_slug }}.py
Expand Down
14 changes: 7 additions & 7 deletions {{cookiecutter.project_slug}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ clean-test: ## remove test and coverage artifacts
rm -fr .pytest_cache

lint/flake8: ## check style with flake8
ruff {{ cookiecutter.project_slug }} tests
flake8 --config=.flake8 {{ cookiecutter.project_slug }} tests
ruff check src/{{ cookiecutter.project_slug }} tests
flake8 --config=.flake8 src/{{ cookiecutter.project_slug }} tests

{% if cookiecutter.use_black == 'y' -%}
lint/black: ## check style with black
black --check {{ cookiecutter.project_slug }} tests
blackdoc --check {{ cookiecutter.project_slug }} docs
isort --check {{ cookiecutter.project_slug }} tests
black --check src/{{ cookiecutter.project_slug }} tests
blackdoc --check src/{{ cookiecutter.project_slug }} docs
isort --check src/{{ cookiecutter.project_slug }} tests

{% endif -%}
lint: lint/flake8{%- if cookiecutter.use_black == 'y' %} lint/black{%- endif %} ## check style
Expand All @@ -88,9 +88,9 @@ test-all: ## run tests on every Python version with tox

coverage: ## check code coverage quickly with the default Python
{%- if cookiecutter.use_pytest == 'y' %}
coverage run --source {{ cookiecutter.project_slug }} -m pytest
coverage run --source src/{{ cookiecutter.project_slug }} -m pytest
{%- else %}
coverage run --source {{ cookiecutter.project_slug }} -m unittest discover -s tests/
coverage run --source src/{{ cookiecutter.project_slug }} -m unittest discover -s tests/
{%- endif %}
coverage report -m
coverage html
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{%- if cookiecutter.create_author_file == 'y' %}
authors
{%- endif %}
changes
changelog

.. toctree::
:maxdepth: 1
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/docs/releasing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A reminder for the **maintainers** on how to deploy. This section is only releva
It is important to be aware that any changes to files found within the ``{{ cookiecutter.project_slug }}`` folder (with the exception of ``{{ cookiecutter.project_slug }}/__init__.py``) will trigger the ``bump-version.yml`` workflow. Be careful not to commit changes to files in this folder when preparing a new release.

#. Create a new branch from `main` (e.g. `release-0.2.0`).
#. Update the `CHANGES.rst` file to change the `Unreleased` section to the current date.
#. Update the `CHANGELOG.rst` file to change the `Unreleased` section to the current date.
#. Bump the version in your branch to the next version (e.g. `v0.1.0 -> v0.2.0`)::

.. code-block:: console
Expand Down
6 changes: 3 additions & 3 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ all = ["{{ cookiecutter.project_slug }}[dev]"]
# "Changelog" = "https://{{ cookiecutter.project_slug }}.readthedocs.io/en/stable/history.html"
# "About Ouranos" = "https://www.ouranos.ca/en/"
"Issue tracker" = "https://github.com/{{ cookiecutter.__gh_slug }}/issues"
"changelog" = "https://github.com/{{ cookiecutter.__gh_slug }}/blob/main/changelog.rst"
"changelog" = "https://github.com/{{ cookiecutter.__gh_slug }}/blob/main/CHANGELOG.rst"
"homepage" = "https://github.com/{{ cookiecutter.__gh_slug }}"

[tool]
Expand Down Expand Up @@ -164,7 +164,7 @@ values = [

[tool.coverage.run]
relative_files = true
include = ["{{ cookiecutter.project_slug }}/*"]
include = ["src/{{ cookiecutter.project_slug }}/*"]
omit = ["tests/*.py"]
{%- if cookiecutter.use_pytest == 'n' %}
command_line = "-m unittest discover -s tests/"
Expand All @@ -178,7 +178,7 @@ include = [
{%- if cookiecutter.create_author_file == 'y' %}
"AUTHORS.rst",
{% endif -%}
"CHANGES.rst",
"CHANGELOG.rst",
"CONTRIBUTING.rst",
{%- if cookiecutter.open_source_license in license_classifiers %}
"LICENSE",
Expand Down

0 comments on commit 3d54a05

Please sign in to comment.