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
14 changes: 7 additions & 7 deletions .github/workflows/deploy_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Install dependencies
run: uv sync
- name: Build a binary wheel and a source tarball
run: python3 -m build
run: uv build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/make_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- uses: actions/cache@v4
with:
path: .cache
key: ${{ github.ref }}
- run: pip install mkdocs-material jupyter nbconvert mkdocs-jupyter mkdocs-plotly-plugin
- run: mkdocs gh-deploy --force
- name: Install dependencies
run: uv sync --group dev
- name: Build and deploy docs
run: uv run mkdocs gh-deploy --force
13 changes: 7 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install --with dev
run: uv sync --group dev

- name: Run tests with pytest
run: |
poetry run pytest --nbval-lax
run: uv run pytest --nbval-lax
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,7 @@ cython_debug/
#.idea/


.test_example.py
.test_example.py
.python-version
.ruff_cache/
uv.lock
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
repos:
- repo: local
hooks:
- id: sort_pyproject
name: sort_pyproject
entry: toml-sort -i --sort-table-keys --sort-inline-tables
language: python
files: ^pyproject\.toml$
additional_dependencies: ["toml-sort==0.23.1"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
- id: ruff-format
types_or: [python, pyi, jupyter] # drop toml to avoid conflicts
- id: ruff
types_or: [python, pyi, jupyter, toml]
args: [--fix]

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.379
hooks:
- id: pyright
# use the packaged pyright for reproducibility
language: python
additional_dependencies: ["pyright==1.1.379"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=5000"]
1 change: 1 addition & 0 deletions calipytion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .tools import Calibrator

__all__ = ["Calibrator"]
__version__ = "1.0.1"
69 changes: 37 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,45 @@
[tool.poetry]
[project]
name = "calipytion"
version = "1.0.0"
version = "1.0.1"
description = "Tool for creating standard curves and concentration calculations."
authors = ["haeussma <83341109+haeussma@users.noreply.github.com>"]
license = "MIT License"
authors = [{ name = "haeussma", email = "83341109+haeussma@users.noreply.github.com" }]
license = {text = "MIT"}
readme = "Readme.md"
packages = [{include = "calipytion"}]
requires-python = ">=3.10,<3.16"
dependencies = [
"httpx>=0.25.0",
"lmfit>=1.0.0",
"matplotlib>=3.8.0",
"mdmodels>=0.2.0",
"nbformat>=5.0.0",
'numpy>=1.26,<2; python_version < "3.13"',
'numpy>=2; python_version >= "3.13"',
"pandas[excel]>=2.0,<3.0",
"plotly>=6.3.0",
"pydantic>=2.0.0",
"pyenzyme>=2.1.0",
"rich>=13.0.0",
"sympy>=1.0.0",
"toml>=0.10.2",
]

[tool.poetry.dependencies]
python = "^3.10"
plotly = "^5.18.0"
numpy = "^1.26.4"
lmfit = "^1.2.2"
sympy = "^1.12"
matplotlib = ">=3.7"
nbformat = "^5.10.4"
pydantic = "^2.4"
rich = "^13"
pandas = { version = ">=2.0,<3.0", extras = ["excel"] }
toml = "^0.10.2"
pyenzyme = "^2.0.0"
httpx = ">=0.27.0"
mdmodels = "^0.2.0"
[tool.mypy]
ignore_missing_imports = true

[tool.poetry.group.dev.dependencies]
mkdocs-material = "^9.5.8"
pytest = "^8.0.0"
devtools = "^0.12.2"
notebook = "<7"
mkdocs-plotly-plugin = "^0.1.3"
pandas-stubs = "^2.2.2.240807"
nbval = "^0.11.0"
[dependency-groups]
dev = [
"devtools>=0,<1",
"mkdocs-material>=9,<10",
"mkdocs-plotly-plugin>=0,<1",
"nbval>=0,<1",
"notebook>=6,<7",
"pandas-stubs>=2,<3",
"pytest>=8,<9",
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling>=1.25"]
build-backend = "hatchling.build"

[tool.mypy]
ignore_missing_imports = true
[tool.hatch.build.targets.wheel]
packages = ["calipytion"]
Loading