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
14 changes: 5 additions & 9 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
---
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

branches: [main]
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
id-token: write
pages: write
contents: read

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
group: pages
cancel-in-progress: false

jobs:
build_docs_and_deploy:
runs-on: ubuntu-latest
Expand All @@ -34,7 +30,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: '3.11'
- name: Install dependencies
run: |
pip install .
Expand All @@ -54,7 +50,7 @@ jobs:
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "./docs/build/html"
path: ./docs/build/html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
11 changes: 4 additions & 7 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
---
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: ["main"]
branches: [main]
pull_request:
branches: ["main"]

branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
---
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
64 changes: 40 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,48 @@
---
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/jsh9/cercis
rev: 0.2.3
hooks:
- id: cercis
- id: cercis-jupyter

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/pre-commit
rev: v3.5.0
- id: end-of-file-fixer
- id: debug-statements
- id: double-quote-string-fixer
- id: requirements-txt-fixer
- id: pretty-format-json
args: [--no-ensure-ascii, --indent=4, --no-sort-keys]
exclude: \.ipynb$
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/jsh9/muff-pre-commit
rev: 0.13.2
hooks:
- id: muff-format
args: [--config, muff.toml]
- repo: https://github.com/jsh9/blank-line-after-blocks
rev: 0.1.4
hooks:
- id: validate_manifest

- id: blank-line-after-blocks
- id: blank-line-after-blocks-jupyter
- repo: https://github.com/lyz-code/yamlfix
rev: 1.18.0
hooks:
- id: yamlfix
- repo: https://github.com/hukkin/mdformat
rev: 0.7.22
hooks:
- id: mdformat
args: [--wrap, '79', --number]
additional_dependencies: [mdformat-tables]
- repo: https://github.com/jsh9/markdown-toc-creator
rev: 0.0.6
rev: 0.0.11
hooks:
- id: markdown-toc-creator
- repo: https://github.com/jsh9/format-docstring
rev: 0.1.4
hooks:
- id: format-docstring
name: Format docstrings in .py files
args: [--line-length=79]
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/).
The format is based on
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

Expand All @@ -27,4 +28,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
### Fixed

- Python 3.12 pipeline issues
- GitHub Pages deployment workflow permissions by adding environment configuration
- GitHub Pages deployment workflow permissions by adding environment
configuration
18 changes: 13 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

## 1. General guideline

In general, contributors should make code changes on a branch, and then [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) to have the changes merged.
In general, contributors should make code changes on a branch, and then
[create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
to have the changes merged.

## 2. Install the library for development

- It is strongly recommended that contributors work on code changes in an isolated Python environment
- Use `pip install -e .` to install this library locally, so that any local code changes are reflected immediately in your current Python environment
- It is strongly recommended that contributors work on code changes in an
isolated Python environment
- Use `pip install -e .` to install this library locally, so that any local
code changes are reflected immediately in your current Python environment

## 3. Running local tests and linting

Expand All @@ -17,10 +21,14 @@ And you can run auto-formatting with the command `pre-commit run -a`.

## 4. Update the documentations

If you would like to make changes to the documentations of this library, you need to install the dependencies for building documentations with the following command (from the root directory):
If you would like to make changes to the documentations of this library, you
need to install the dependencies for building documentations with the following
command (from the root directory):

```
pip install -r docs/requirements.txt
```

To build the documentation HTML pages locally, navigate to the `docs` folder, and run `make clean html`. To view the generated HTML documentation, open the file `docs/build/html/index.html` in the browser.
To build the documentation HTML pages locally, navigate to the `docs` folder,
and run `make clean html`. To view the generated HTML documentation, open the
file `docs/build/html/index.html` in the browser.
Loading