Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/empty view regs #3

Merged
merged 9 commits into from
Oct 3, 2024
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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: Test V3

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

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: py=${{ matrix.python-version }}

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Set Up Hatch Env
run: |
hatch env create test.py${{ matrix.python-version }}
- name: Run Tests
run: |
hatch env run --env test.py${{ matrix.python-version }} run
50 changes: 50 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"
autofix_prs: false
default_stages: [commit, push]
default_language_version:
python: python3
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["-L", "ba,ihs,kake,nd,noe,nwo,te,fo,zar", "-S", "fixture"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
files: src|tests
additional_dependencies:
- pydantic-xml
- pytest
- repo: https://github.com/scientific-python/cookie
rev: 2024.08.19
hooks:
- id: sp-repo-review
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/adamchainz/blacken-docs
rev: "" # replace with latest tag on GitHub
hooks:
- id: blacken-docs
additional_dependencies:
- black==22.12.0
- repo: https://github.com/rbubley/mirrors-prettier
rev: "" # Use the sha / tag you want to point at
hooks:
- id: prettier
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"
commands:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv venv
- uv pip install .[docs]
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D
language=en docs $READTHEDOCS_OUTPUT/html
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![PyPI - Version](https://img.shields.io/pypi/v/pydantic-bigstitcher.svg)](https://pypi.org/project/pydantic-bigstitcher)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pydantic-bigstitcher.svg)](https://pypi.org/project/pydantic-bigstitcher)

-----
---

Pydantic models for [bigsticher](https://github.com/PreibischLab/BigStitcher). This is very minimal right now, with features being added only as needed.

Expand Down
1 change: 1 addition & 0 deletions docs/api/pydantic_bigstitcher.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: pydantic_bigstitcher
1 change: 1 addition & 0 deletions docs/api/transform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: pydantic_bigstitcher.transform
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pydantic-bigstitcher

pydantic models for bigstitcher xml documents
17 changes: 17 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
site_name: pydantic-bigstitcher
site_url: https://d-v-b.github.io/pydantic-bigstitcher/
theme:
name: material
watch: ["src"]
plugins:
- mkdocstrings:
handlers:
python:
options:
docstring_style: numpy
members_order: source
separate_signature: true
filters: ["!^_"]
docstring_options:
ignore_init_summary: true
merge_init_into_class: true
89 changes: 76 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pydantic-bigstitcher"
dynamic = ["version"]
description = ''
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.10"
license = "MIT"
keywords = []
authors = [
Expand All @@ -16,8 +16,6 @@ authors = [
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -30,21 +28,33 @@ dependencies = [
]

[project.urls]
Documentation = "https://github.com/unknown/pydantic-bigstitcher#readme"
Issues = "https://github.com/unknown/pydantic-bigstitcher/issues"
Source = "https://github.com/unknown/pydantic-bigstitcher"
Documentation = "https://github.com/d-v-b/pydantic-bigstitcher#readme"
Issues = "https://github.com/d-v-b/pydantic-bigstitcher/issues"
Source = "https://github.com/d-v-b/pydantic-bigstitcher"

[tool.hatch.version]
path = "src/pydantic_bigstitcher/__about__.py"

[tool.hatch.envs.test]
dependencies = [
[project.optional-dependencies]
test = [
"coverage[toml]>=6.5",
"pytest",
"xmldiff",
"xmltodict"
"xmltodict",
"deepdiff==8.0.1"
]

docs = [
"mkdocs-material>=9.5.39",
"mkdocstrings[python]>=0.26.1"
]

[tool.hatch.version]
path = "src/pydantic_bigstitcher/__about__.py"

[tool.hatch.envs.test]
features = ["test"]

[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12"]

[tool.hatch.envs.test.scripts]
run = "pytest {args:tests}"
run-cov = "coverage run -m pytest {args:tests}"
Expand All @@ -57,8 +67,16 @@ cov = [
"cov-report",
]

[tool.hatch.envs.docs]
features = ["docs"]

[tool.hatch.envs.docs.scripts]
"serve" = "mkdocs serve"
"build" = "mkdocs build"
"deploy" = "mkdocs gh-deploy"

[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
python = ["3.10", "3.11", "3.12"]

[tool.hatch.envs.types]
dependencies = [
Expand All @@ -85,3 +103,48 @@ exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
namespace_packages = false
strict=true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]

[tool.ruff]
line-length = 100
force-exclude = true
extend-exclude = [
".bzr",
".direnv",
".eggs",
".git",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"notebooks", # temporary, until we achieve compatibility with ruff ≥ 0.6
"venv",
"docs",
]
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"UP", # pyupgrade
]


[tool.pytest.ini_options]
minversion = "7"
testpaths = ["tests"]
log_cli_level = "INFO"
xfail_strict = true
addopts = ["-ra", "--strict-config", "--strict-markers"]
filterwarnings = ["error"]
Loading