Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7e34654
:art: add flake8 and ruff line length default (to 90 characters)
enryH Jun 25, 2025
0ed57cd
:art: add formatting of jupyter notebooks per default
enryH Jun 25, 2025
453a4fb
:memo: highlight that also a folder has to be renamed
enryH Jun 25, 2025
8d4ae8b
:memo: document what extension are used for
enryH Jun 25, 2025
0f3d369
:memo: document debian (ubuntu) package adding which might be needed
enryH Jun 25, 2025
5df3ae3
:art: use PyPI and GitHub integration instead of secret api token
enryH Jun 25, 2025
f162ae1
🙈 hide folders creating when locally building the documentation website
enryH Jun 25, 2025
0e93852
:memo: document desing choices and layout of Python package
enryH Jun 25, 2025
e1026bd
:art: add copy button for code blocks per default
enryH Jun 25, 2025
a5b2ac3
:art: small corrections after proof-reading
enryH Jun 27, 2025
e09d610
:art: make name generic and document it. Choose a Licence hint
enryH Jun 27, 2025
3ba8502
:art: add design document to Sphinx documentation
enryH Jun 27, 2025
a01647c
:art: add some more common error checking
enryH Jun 27, 2025
a5a78b6
Apply suggestions from code review
enryH Jun 27, 2025
f04d90f
:bug: correct python pkg configuration file
enryH Jun 27, 2025
32f5bac
:bug: add missing changes for requirments.txt
enryH Jun 29, 2025
1bf4ad0
:memo: Add hint to GitHub Releases and Source distribution testing
enryH Jun 30, 2025
4bedc95
:art: follow Pasquale's advices (.gitignore + unnecessary config)
enryH Jul 1, 2025
2467b61
:memo: add sebastians hints on other ressources
enryH Jul 1, 2025
afbbd70
:art: add license key and remove from classifiers as suggested by Seb…
enryH Jul 1, 2025
15771b9
:memo: docstring and src layout hints (noted by sebastian)
enryH Jul 1, 2025
3e6b805
:bug: add missing key to pyproject.toml
enryH Jul 1, 2025
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
7 changes: 3 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff check .
ruff check src
test:
name: Test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -119,10 +119,9 @@ jobs:
with:
name: artifact
path: ./dist

# register PyPI integration:
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
# remove repository key to set the default to pypi (not test.pypi.org)
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# find more examples here:
# https://github.com/github/gitignore/blob/main/Python.gitignore
# Binaries (object files) produced by a compiler
*.so
*.o
Expand Down Expand Up @@ -27,3 +29,28 @@ _templates

# VSCode may create a config file with this name
**.vscode

# Ruff stuff:
.ruff_cache/

# Environments
.env
.envrc
.venv
env/
venv/

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ build:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"
# apt_packages:
# - some_package


# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023: Jakob Nybo Nissen.
Copyright (c) 2025: First Last.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Example Python package

All design principles are explained in the [developing.md](developing.md) file.
The Python package template was created by Jakob Nybo Nissen and Henry Webel.

## How to use

Can be used as GitHub template repository,
Expand All @@ -8,10 +11,15 @@ see [GitHub documentation](https://docs.github.com/en/repositories/creating-and-
You will need to find and replace occurences of

- `python_package` -> `your_package_name`
- also the folder `src/python_package`
- `RasmussenLab` -> `GitHub_user_name` (or `organization`)

with the name of your package and GitHub user name (or organization).

- look for `First Last` to see where to replace with your name
- choose a license, see [GitHub documentation](https://docs.github.com/en/repositories/creating-and-managing-repositories/licensing-a-repository)
and [Creative Commons](https://creativecommons.org/chooser/).
Replace [`LICENSE`](LICENSE) file with the license you choose.

## Development environment

Install package so that new code is picked up in a restared python interpreter:
Expand All @@ -22,6 +30,8 @@ pip install -e ".[dev]"

## Basic usage

> works using this template

```python
from python_package import hello_world
print (python_package.__version__)
Expand All @@ -31,8 +41,9 @@ print(hello_world(4))
## Readthedocs

The documentation can be build using readthedocs automatically. See
[project on Readthedocs](https://readthedocs.org/projects/rasmussenlab-python-package/) for the project. A new project needs
to be registered.
[project on Readthedocs](https://readthedocs.org/projects/rasmussenlab-python-package/)
for the project based on this template. A new project needs
to [be registered on ReadTheDocs](https://docs.readthedocs.com/platform/stable/intro/add-project.html).

- make sure to enable build from PRs in the settings (advanded settings)
- checkout configuration file: [`.readthedocs.yaml`](.readthedocs.yaml)
Loading