Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
## 0.8 (unreleased)


- Nothing changed yet.
- Removed old `test.yml`.
- Documented `--no-cov` for vscode when debugging inside tests.
- Fixed exclusion of tests/ files in the distribution.


## 0.7 (2025-09-16)
Expand Down

This file was deleted.

9 changes: 9 additions & 0 deletions symlink_into_django_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@ def create_symlinks(filenames: list[str]) -> bool:
return changed_something


def check_for_dead_symlinks():
for root, dirs, files in Path("django").walk():
d = Path(root) # d = directory
for f in files: # f = file
if not (d / f).exists():
print(f"BROKEN symlink '{d / f}'")


if __name__ == "__main__":
changed_something = create_symlinks(python_files())
if changed_something:
# Exit with error code: that way we can be run as check in a github action.
sys.exit("Some symlinks were created")
check_for_dead_symlinks()
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
name: nens-meta
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.12
- uses: pre-commit/action@v3.0.1
Expand Down
44 changes: 0 additions & 44 deletions {{ cookiecutter.project_name }}/.github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion {{ cookiecutter.project_name }}/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# setuptools_scm automatically includes all git-managed files. You can include/exclude
# extra files here.
exclude tests/
recursive-exclude tests/
23 changes: 15 additions & 8 deletions {{ cookiecutter.project_name }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ See [nens-meta's documentation](https://nens-meta.readthedocs.io) for an explana

The standard commands apply:

$ uv sync
$ uv run pytest
$ uv run python # You can also activate the virtualenv in .venv
$ pre-commit run --all # You can also do 'pre-commit install'
$ uv add some-dependency
uv sync # Yes, add 'uv.lock' to git afterwards!
uv run pytest
uv run python # You can also activate the virtualenv in .venv
pre-commit run --all # You can also do 'pre-commit install'
uv add some-dependency

`uv` replaces pip/venv/requirement.txt/pip-tools. `pre-commit` does basic formatting.

Expand All @@ -36,11 +36,18 @@ If you need a new dependency (like `requests`), add it in
Note: "public" means "don't put customer data or sample data with real
persons' addresses on github"!

- Follow the steps you then see (from "git init" to "git push origin main")
and your code will be online.
- Push your project to github (note: the current instructions on github only add the README, but we want to add all files):

git init
git add -A
git commit -m "Generated with cookiecutter"
git branch -M main
git remote add origin https://github.com/nens/{{ cookiecutter.project_name }}.git
# git remote add origin git@github.com:nens/{{ cookiecutter.project_name }}.git # If you use ssh
git push -u origin main

- Go to
https://github.com/nens/>{{ cookiecutter.project_name }}/settings/collaboration
https://github.com/nens/{{ cookiecutter.project_name }}/settings/access
and add the teams with write access (you might have to ask someone with
admin rights (like Reinout) to do it).

Expand Down
4 changes: 4 additions & 0 deletions {{ cookiecutter.project_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ homepage = "https://github.com/nens/{{ cookiecutter.project_name }}"

[tool.pytest.ini_options]
addopts = "--cov --cov-fail-under=80"
# Debugging tests in vscode? Run pytest with "--no-cov", see
# https://pytest-cov.readthedocs.io/en/latest/debuggers.html

[tool.zest-releaser]
release = false
Expand All @@ -47,4 +49,6 @@ venvPath = "."
venv = ".venv"

[dependency-groups]
# The "dev" group is automatically installed by uv. When using pip,
# do something like "pip install -e . --group test".
dev = ["pytest>=8.4.2", "pytest-cov>=6.3.0", "pytest-sugar>=1.1.1"]