Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Basic continuous integration and deployment (CI/CD) workflow for Python packages.

- checks formatting (black)
- checks formatting (black, isort)
- checks linting (ruff)
- run unit tests (pytest)
- optional: add c extensions to a package
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ name: Python application

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "0 2 * * 3"
release:
types: [published]

permissions:
contents: read
Expand All @@ -19,6 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
- uses: isort/isort-action@v1
lint:
name: Lint with ruff
runs-on: ubuntu-latest
Expand All @@ -40,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -106,6 +110,8 @@ jobs:
publish:
name: Publish package
if: startsWith(github.ref, 'refs/tags')
permissions:
id-token: write
needs:
- format
- lint
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.11"
python: "3.13"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
Expand Down
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.
Loading