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
12 changes: 12 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Last"
given-names: "First"
orcid: "https://orcid.org/0000-0000-0000-0000"
title: "Python Package Template repository"
version: 0.0.1
doi: 10.5281/zenodo.1234
date-released: 2025-07-23
url: "https://github.com/biosustain/python_package"
36 changes: 36 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Contributing code

Install the code with development dependencies:

```bash
pip install -e '.[dev]'
```

## Format code and sort imports

```bash
black .
isort .
```

## lint code

```bash
ruff check .
```

## Run tests

```bash
pytest
```

## Sync notebooks with jupytext

For easier diffs, you can use jupytext to sync notebooks in the `docs/tutorial` directory with the percent format.

```bash
jupytext --sync docs/tutorial/*.ipynb
```

This is configured in the [`.jupytext`](docs/tutorial/.jupytext) file in that directory.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +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`
- also the folder `src/python_package`
- `RasmussenLab` -> `GitHub_user_name` (or `organization`)
with the name of your package and 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.
- Update the `CITATION.cff` file with your information.

## Development environment

Expand All @@ -41,7 +42,7 @@ print(hello_world(4))
## Readthedocs

The documentation can be build using readthedocs automatically. See
[project on Readthedocs](https://readthedocs.org/projects/rasmussenlab-python-package/)
[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).

Expand Down
6 changes: 5 additions & 1 deletion docs/tutorial/.jupytext
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# all notebooks in this directory are in the percent format
# all notebooks in this directory are synced percent format when typing
# (jupytext is a dev dependency)
# jupytext --sync *.ipynb
# or from root directory
# jupytext --sync docs/api_examples/*.ipynb
formats = "ipynb,py:percent"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ docs = [
"sphinx-copybutton",
]
# local development options
dev = ["black[jupyter]", "ruff", "pytest"]
dev = ["black[jupyter]", "ruff", "pytest", "isort", "jupytext"]

[tool.ruff]
# https://docs.astral.sh/ruff/rules/#flake8-bandit-s
Expand Down