nrtqclib 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. nrtqclib-0.1.0/.github/workflows/check_package.yml +27 -0
  2. nrtqclib-0.1.0/.github/workflows/code_coverage.yml +30 -0
  3. nrtqclib-0.1.0/.github/workflows/publish_to_pypi.yml +74 -0
  4. nrtqclib-0.1.0/.gitignore +25 -0
  5. nrtqclib-0.1.0/.python-version +1 -0
  6. nrtqclib-0.1.0/.readthedocs.yml +13 -0
  7. nrtqclib-0.1.0/CHANGELOG.md +15 -0
  8. nrtqclib-0.1.0/CLAUDE.md +42 -0
  9. nrtqclib-0.1.0/CONTRIBUTING.md +39 -0
  10. nrtqclib-0.1.0/LICENSE +21 -0
  11. nrtqclib-0.1.0/PKG-INFO +54 -0
  12. nrtqclib-0.1.0/README.md +41 -0
  13. nrtqclib-0.1.0/RELEASING.md +40 -0
  14. nrtqclib-0.1.0/codecov.yaml +2 -0
  15. nrtqclib-0.1.0/docs/Makefile +20 -0
  16. nrtqclib-0.1.0/docs/design/NRTQCLIB_plan.md +225 -0
  17. nrtqclib-0.1.0/docs/design/NRTQC_doc.md +224 -0
  18. nrtqclib-0.1.0/docs/design/NRTQC_plan.md +185 -0
  19. nrtqclib-0.1.0/docs/design/NRTQC_spec.md +445 -0
  20. nrtqclib-0.1.0/docs/design/README.md +19 -0
  21. nrtqclib-0.1.0/docs/make.bat +35 -0
  22. nrtqclib-0.1.0/docs/requirements.txt +5 -0
  23. nrtqclib-0.1.0/docs/source/_static/_empty +0 -0
  24. nrtqclib-0.1.0/docs/source/api/modules.rst +7 -0
  25. nrtqclib-0.1.0/docs/source/api/nrtqclib.config.rst +34 -0
  26. nrtqclib-0.1.0/docs/source/api/nrtqclib.interface.rst +34 -0
  27. nrtqclib-0.1.0/docs/source/api/nrtqclib.loader.rst +26 -0
  28. nrtqclib-0.1.0/docs/source/api/nrtqclib.rst +21 -0
  29. nrtqclib-0.1.0/docs/source/api/nrtqclib.step1_read_input.rst +18 -0
  30. nrtqclib-0.1.0/docs/source/api/nrtqclib.step2_run_qc.rst +26 -0
  31. nrtqclib-0.1.0/docs/source/api/nrtqclib.step3_concat_flags.rst +26 -0
  32. nrtqclib-0.1.0/docs/source/api/nrtqclib.step4_compare_flags.rst +26 -0
  33. nrtqclib-0.1.0/docs/source/conf.py +43 -0
  34. nrtqclib-0.1.0/docs/source/configuration/nrtqc.rst +245 -0
  35. nrtqclib-0.1.0/docs/source/how-to/batch_processing.rst +113 -0
  36. nrtqclib-0.1.0/docs/source/how-to/nrt_qc.rst +281 -0
  37. nrtqclib-0.1.0/docs/source/index.rst +29 -0
  38. nrtqclib-0.1.0/pyproject.toml +43 -0
  39. nrtqclib-0.1.0/pytest.ini +7 -0
  40. nrtqclib-0.1.0/src/nrtqclib/__init__.py +34 -0
  41. nrtqclib-0.1.0/src/nrtqclib/config/__init__.py +0 -0
  42. nrtqclib-0.1.0/src/nrtqclib/config/nrtqc_config.py +248 -0
  43. nrtqclib-0.1.0/src/nrtqclib/config/yaml_schema.py +276 -0
  44. nrtqclib-0.1.0/src/nrtqclib/config/yaml_templates.py +203 -0
  45. nrtqclib-0.1.0/src/nrtqclib/interface/__init__.py +0 -0
  46. nrtqclib-0.1.0/src/nrtqclib/interface/batch.py +104 -0
  47. nrtqclib-0.1.0/src/nrtqclib/interface/config.py +125 -0
  48. nrtqclib-0.1.0/src/nrtqclib/interface/nrtqc.py +77 -0
  49. nrtqclib-0.1.0/src/nrtqclib/loader/__init__.py +0 -0
  50. nrtqclib-0.1.0/src/nrtqclib/loader/nrtqc_loader.py +112 -0
  51. nrtqclib-0.1.0/src/nrtqclib/loader/nrtqc_registry.py +52 -0
  52. nrtqclib-0.1.0/src/nrtqclib/py.typed +0 -0
  53. nrtqclib-0.1.0/src/nrtqclib/step1_read_input/__init__.py +0 -0
  54. nrtqclib-0.1.0/src/nrtqclib/step1_read_input/dataset_all.py +36 -0
  55. nrtqclib-0.1.0/src/nrtqclib/step2_run_qc/__init__.py +0 -0
  56. nrtqclib-0.1.0/src/nrtqclib/step2_run_qc/dataset_all.py +40 -0
  57. nrtqclib-0.1.0/src/nrtqclib/step2_run_qc/qc_base.py +141 -0
  58. nrtqclib-0.1.0/src/nrtqclib/step3_concat_flags/__init__.py +0 -0
  59. nrtqclib-0.1.0/src/nrtqclib/step3_concat_flags/concat_base.py +192 -0
  60. nrtqclib-0.1.0/src/nrtqclib/step3_concat_flags/dataset_all.py +40 -0
  61. nrtqclib-0.1.0/src/nrtqclib/step4_compare_flags/__init__.py +0 -0
  62. nrtqclib-0.1.0/src/nrtqclib/step4_compare_flags/compare_base.py +348 -0
  63. nrtqclib-0.1.0/src/nrtqclib/step4_compare_flags/dataset_all.py +40 -0
  64. nrtqclib-0.1.0/tests/conftest.py +69 -0
  65. nrtqclib-0.1.0/tests/data/config/test_dataset_invalid.yaml +2 -0
  66. nrtqclib-0.1.0/tests/data/input/nrt_cora_bo_test.parquet +0 -0
  67. nrtqclib-0.1.0/tests/test_common_config_nrtqc.py +403 -0
  68. nrtqclib-0.1.0/tests/test_interface_batch.py +187 -0
  69. nrtqclib-0.1.0/tests/test_interface_config.py +145 -0
  70. nrtqclib-0.1.0/tests/test_interface_nrtqc.py +105 -0
  71. nrtqclib-0.1.0/tests/test_nrtqc_pipeline.py +166 -0
  72. nrtqclib-0.1.0/tests/test_nrtqc_step1_input.py +35 -0
  73. nrtqclib-0.1.0/tests/test_nrtqc_step2_qc.py +210 -0
  74. nrtqclib-0.1.0/tests/test_nrtqc_step3_concat.py +251 -0
  75. nrtqclib-0.1.0/tests/test_nrtqc_step4_compare.py +304 -0
  76. nrtqclib-0.1.0/uv.lock +2000 -0
@@ -0,0 +1,27 @@
1
+ name: Check Package
2
+ on:
3
+ push:
4
+ branches: [ "main" ]
5
+ pull_request:
6
+ branches: [ "main", "develop" ]
7
+
8
+ # Test fixtures are committed under tests/data/, so there is no download step.
9
+
10
+ jobs:
11
+ build:
12
+ name: python
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ fail-fast: false
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v5
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version-file: ".python-version"
24
+ - name: Install the project
25
+ run: uv sync --locked --all-extras --dev
26
+ - name: Run tests
27
+ run: uv run pytest -v tests
@@ -0,0 +1,30 @@
1
+ name: Code Coverage
2
+ on:
3
+ push:
4
+ branches: [ "main" ]
5
+ pull_request:
6
+ branches: [ "main" ]
7
+
8
+ jobs:
9
+ build:
10
+ name: python
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v5
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version-file: ".python-version"
22
+ - name: Install the project
23
+ run: uv sync --locked --all-extras --dev
24
+ - name: Run code coverage
25
+ run: uv run pytest --cov --cov-branch --cov-report=xml
26
+ - name: Upload coverage reports to Codecov
27
+ uses: codecov/codecov-action@v5
28
+ with:
29
+ token: ${{ secrets.CODECOV_TOKEN }}
30
+ slug: AIQC-Hub/nrtqclib
@@ -0,0 +1,74 @@
1
+ # This workflow will upload a Python Package to PyPI when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Publish to PyPI
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ release-build:
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v5
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version-file: ".python-version"
32
+
33
+ - name: Install the project
34
+ run: uv sync --locked --all-extras --dev
35
+
36
+ - name: Build release distributions
37
+ run: uv build
38
+
39
+ - name: Upload distributions
40
+ uses: actions/upload-artifact@v4
41
+ with:
42
+ name: release-dists
43
+ path: dist/
44
+
45
+ pypi-publish:
46
+ runs-on: ubuntu-latest
47
+ needs:
48
+ - release-build
49
+ permissions:
50
+ # IMPORTANT: this permission is mandatory for trusted publishing
51
+ id-token: write
52
+
53
+ # Dedicated environments with protections for publishing are strongly recommended.
54
+ # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
55
+ environment:
56
+ name: pypi
57
+ # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
58
+ # url: https://pypi.org/p/YOURPROJECT
59
+ #
60
+ # ALTERNATIVE: if your GitHub Release name is the PyPI project version string
61
+ # ALTERNATIVE: exactly, uncomment the following line instead:
62
+ # url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
63
+
64
+ steps:
65
+ - name: Retrieve release distributions
66
+ uses: actions/download-artifact@v4
67
+ with:
68
+ name: release-dists
69
+ path: dist/
70
+
71
+ - name: Publish release distributions to PyPI
72
+ uses: pypa/gh-action-pypi-publish@release/v1
73
+ with:
74
+ packages-dir: dist/
@@ -0,0 +1,25 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # IDE
13
+ .idea/
14
+
15
+ # Sphinx build output
16
+ docs/build/
17
+
18
+ # Test-generated output (fixtures under tests/data/ are tracked)
19
+ tests/data/test/
20
+
21
+ # Personal, machine-local Claude Code instructions (not shared)
22
+ CLAUDE.local.md
23
+
24
+ # Claude Code local settings (machine-specific paths, not for the repo)
25
+ .claude/settings.local.json
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,13 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.12"
7
+
8
+ python:
9
+ install:
10
+ - requirements: docs/requirements.txt
11
+
12
+ sphinx:
13
+ configuration: docs/source/conf.py
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+ As this project is still in active development, it does not yet strictly adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0] - 2026-11-05
10
+ ### Added
11
+ - NRT QC pipeline (read input, run QC, concat flags, compare flags), its config, schema and template, moved from `aiqclib` 0.13.0; outputs match `aiqclib` 0.14.0 on the test fixture
12
+ - Public API: `run_nrt_qc`, `read_config`, `read_config_template`, `write_config_template`, `run_batch` (no `stage`/`mode` arguments; options after the first are keyword-only for the writer and batch)
13
+ - `NRTQCConfig` serves its own `nrt_qc_sets` schema and template through the `aiqclib` 0.14 config hooks
14
+ - `run_batch` runs the `nrt_qc` phase on the `aiqclib` batch engine
15
+ - Batch processing how-to and API reference pages
@@ -0,0 +1,42 @@
1
+ # CLAUDE.md
2
+
3
+ `nrtqclib`: near-real-time QC (NRT QC) pipeline for CTD ocean profiles, split out of `aiqclib` (sibling checkout at `../aiqclib`). It **depends on `aiqclib`**: the QC items (`aiqclib/prepare/features/qc_*.py`), feature registry, flag utilities and config/dataset base classes stay there; this repo owns the pipeline, its config, docs and tests. Source in `src/nrtqclib/` (`step1_read_input` to `step4_compare_flags`, `config/`, `loader/`, `interface/`). Design docs (outside the Sphinx build) in `docs/design/`.
4
+
5
+ ## Migration status (delete this section when the port is done)
6
+
7
+ - Plan: `docs/design/NRTQCLIB_plan.md`. Phases 2 and 3 happen here; Phases 1 and 4 happen in `aiqclib`. Phase 1 is released as `aiqclib` 0.14.0 (PyPI, 2026-11-05). Do not edit `../aiqclib` from this repo; read it for reference only.
8
+ - Done on `feature/move-nrtqc`: imports rewritten to `nrtqclib.*`; `NRTQCConfig` overrides `get_yaml_schema` / `get_template_text`; `nrtqclib.read_config`, `read_config_template`, `write_config_template` (`interface/config.py`) and `run_batch` (`interface/batch.py`, `NRT_QC_PHASE` on `aiqclib.interface.batch.run_phases`); the remaining aiqclib NRT QC tests ported; `how-to/batch_processing.rst`; `docs/source/api/` generated. Parity with `aiqclib.run_nrt_qc` 0.14.0 verified (identical step 2, 3, 4 outputs on the fixture).
9
+ - `pytest.ini` turns aiqclib's "is moving to the nrtqclib package" `DeprecationWarning` into an error, so an import pointing back at aiqclib's copy fails the suite.
10
+ - The `aiqclib` names this package may import are listed in `CONTRACT` in aiqclib `tests/test_common_public_api.py`. Importing a name not listed there needs a matching addition in `aiqclib` first.
11
+ - Released as `nrtqclib` 0.1.0 (Phase 3 step 7). Remaining: Phase 4 in `aiqclib`.
12
+ - `aiqclib` comes from PyPI (`aiqclib>=0.14,<0.15`). Do not add a `[tool.uv.sources]` path to `../aiqclib`: CI's `uv sync --locked` cannot see it. To test against unreleased aiqclib code, use `uv run --with-editable ../aiqclib pytest` for that run only.
13
+
14
+ ## Environment
15
+
16
+ - Use **`uv`**: `uv sync` installs everything, `uv run <cmd>` runs in the env. No separate install step.
17
+ - Shell commands go through **RTK** (global hook, see `~/.claude/RTK.md`) to cut output tokens. Keep output small: run single test files or `-k` selections with `-q`, read file ranges instead of whole files.
18
+
19
+ ## Tests
20
+
21
+ - `uv run pytest` (small suite). Fixtures are committed: `tests/data/input/nrt_cora_bo_test.parquet`, `tests/data/config/test_dataset_invalid.yaml`. Test outputs go to `tests/data/test/` (gitignored).
22
+
23
+ ## Lint & format
24
+
25
+ - `uv run ruff format src tests` then `uv run ruff check src tests`. Always run both before merging a feature branch.
26
+
27
+ ## Writing style
28
+
29
+ - **Never use em or en dashes** anywhere (docs, README, CHANGELOG, docstrings, comments, commit messages). Use a colon, comma, semicolon, parentheses or two sentences; plain hyphen for ranges and minus signs.
30
+ - Do not write `--` / `---` in `.rst` as a substitute: `docs/source/conf.py` sets `smartquotes_action = "qe"`; keep it.
31
+ - Check: `git ls-files -z | xargs -0 grep -lP '[\x{2013}\x{2014}]'` must print nothing.
32
+
33
+ ## Git (gitflow)
34
+
35
+ - `main` (releases), `develop` (integration), plus `feature/*`, `release/*`, `hotfix/*`.
36
+ - Branch off `develop` for features, off `main` for hotfixes. Do **not** commit directly to `main` or `develop` (the initial import commit is the only exception).
37
+
38
+ ## Releasing
39
+
40
+ - Checklist in `RELEASING.md`. Order: check the `aiqclib` pin, ruff (+ `sphinx-apidoc` if needed), `CHANGELOG.md`, bump `version` in `pyproject.toml`, `uv sync` (updates `uv.lock`), GitHub release triggers PyPI publish.
41
+ - Keep `CHANGELOG.md` **compact**: terse one-line bullets under `### Added/Changed/Fixed/Removed` in `## [Unreleased]` (Keep a Changelog).
42
+ - A fix to a QC item ships in `aiqclib` first; this package then raises its `aiqclib` lower bound if it needs the fix.
@@ -0,0 +1,39 @@
1
+ # Contributing & Development
2
+
3
+ For the release process, see [RELEASING.md](RELEASING.md).
4
+
5
+ ## Environment setup
6
+
7
+ We use **uv** for the development environment. Install it with
8
+ `mamba install -n base -c conda-forge uv`, `pip install uv`, or the
9
+ [standalone installer](https://docs.astral.sh/uv/getting-started/installation/).
10
+
11
+ ```bash
12
+ uv sync # creates .venv and installs nrtqclib (editable) with all dependencies
13
+ ```
14
+
15
+ `aiqclib` comes from PyPI (`aiqclib>=0.14,<0.15`). To try the tests against
16
+ an unreleased `aiqclib`, overlay a local checkout for one run without touching
17
+ `pyproject.toml` or `uv.lock`:
18
+
19
+ ```bash
20
+ uv run --with-editable ../aiqclib pytest
21
+ ```
22
+
23
+ ## Running tests
24
+
25
+ The test fixtures are small and committed under `tests/data/`, so no download
26
+ is needed.
27
+
28
+ ```bash
29
+ uv run pytest -v
30
+ ```
31
+
32
+ ## Code style
33
+
34
+ We use **Ruff** for linting and formatting.
35
+
36
+ ```bash
37
+ uv run ruff format src tests
38
+ uv run ruff check src tests
39
+ ```
nrtqclib-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Takaya Saito
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.5
2
+ Name: nrtqclib
3
+ Version: 0.1.0
4
+ Summary: Near-real-time quality control (NRT QC) for CTD ocean profiles, built on aiqclib
5
+ Author-email: Takaya Saito <takaya.saito@outlook.com>
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.12
8
+ Requires-Dist: aiqclib<0.15,>=0.14
9
+ Requires-Dist: jsonschema>=4.23.0
10
+ Requires-Dist: polars>=1.30.0
11
+ Requires-Dist: pyyaml>=6.0.2
12
+ Description-Content-Type: text/markdown
13
+
14
+ # nrtqclib
15
+
16
+ Near-real-time quality control (NRT QC) for CTD ocean profiles. `nrtqclib`
17
+ applies automated real-time QC tests (Argo/CTD RTQC tests) to temperature and
18
+ salinity profiles, producing per-item flag columns and a final NRT flag per
19
+ variable, and can compare those flags with existing ones.
20
+
21
+ The QC items are implemented in [`aiqclib`](https://github.com/AIQC-Hub/aiqclib),
22
+ which this package depends on. The same tests are available there as training
23
+ features for its machine-learning models.
24
+
25
+ > **Status:** moved out of `aiqclib` (where it shipped as
26
+ > `aiqclib.run_nrt_qc` from v0.5.0). See
27
+ > [`docs/design/NRTQCLIB_plan.md`](docs/design/NRTQCLIB_plan.md). Install
28
+ > with `pip install nrtqclib`.
29
+
30
+ ## Usage
31
+
32
+ ```python
33
+ import nrtqclib as nq
34
+
35
+ nq.write_config_template("nrt_qc_config.yaml")
36
+ # Edit the paths, variables and QC items, then:
37
+ config = nq.read_config("nrt_qc_config.yaml")
38
+ nq.run_nrt_qc(config)
39
+
40
+ # Or over a table of datasets (column `nrt_qc_set_name`):
41
+ summary = nq.run_batch("datasets.txt", nrt_qc_config="nrt_qc_config.yaml")
42
+ ```
43
+
44
+ Migrating from `aiqclib`: the functions keep their names and arguments,
45
+ minus `stage` (config functions) and `mode` (`run_batch`). The pipeline,
46
+ configuration format and outputs are unchanged.
47
+
48
+ ## Development
49
+
50
+ See [CONTRIBUTING.md](CONTRIBUTING.md) and [RELEASING.md](RELEASING.md).
51
+
52
+ ## License
53
+
54
+ MIT
@@ -0,0 +1,41 @@
1
+ # nrtqclib
2
+
3
+ Near-real-time quality control (NRT QC) for CTD ocean profiles. `nrtqclib`
4
+ applies automated real-time QC tests (Argo/CTD RTQC tests) to temperature and
5
+ salinity profiles, producing per-item flag columns and a final NRT flag per
6
+ variable, and can compare those flags with existing ones.
7
+
8
+ The QC items are implemented in [`aiqclib`](https://github.com/AIQC-Hub/aiqclib),
9
+ which this package depends on. The same tests are available there as training
10
+ features for its machine-learning models.
11
+
12
+ > **Status:** moved out of `aiqclib` (where it shipped as
13
+ > `aiqclib.run_nrt_qc` from v0.5.0). See
14
+ > [`docs/design/NRTQCLIB_plan.md`](docs/design/NRTQCLIB_plan.md). Install
15
+ > with `pip install nrtqclib`.
16
+
17
+ ## Usage
18
+
19
+ ```python
20
+ import nrtqclib as nq
21
+
22
+ nq.write_config_template("nrt_qc_config.yaml")
23
+ # Edit the paths, variables and QC items, then:
24
+ config = nq.read_config("nrt_qc_config.yaml")
25
+ nq.run_nrt_qc(config)
26
+
27
+ # Or over a table of datasets (column `nrt_qc_set_name`):
28
+ summary = nq.run_batch("datasets.txt", nrt_qc_config="nrt_qc_config.yaml")
29
+ ```
30
+
31
+ Migrating from `aiqclib`: the functions keep their names and arguments,
32
+ minus `stage` (config functions) and `mode` (`run_batch`). The pipeline,
33
+ configuration format and outputs are unchanged.
34
+
35
+ ## Development
36
+
37
+ See [CONTRIBUTING.md](CONTRIBUTING.md) and [RELEASING.md](RELEASING.md).
38
+
39
+ ## License
40
+
41
+ MIT
@@ -0,0 +1,40 @@
1
+ # Releasing (for Maintainers)
2
+
3
+ For development setup, tests and linting, see [CONTRIBUTING.md](CONTRIBUTING.md).
4
+
5
+ ## Release checklist
6
+
7
+ Follow these steps in order. Steps marked *if necessary* only apply when the
8
+ relevant code has changed since the last release.
9
+
10
+ 1. **Check the `aiqclib` dependency.** `pyproject.toml` must pin a released
11
+ `aiqclib` range (for example `aiqclib>=0.14,<0.15`), and the development-only
12
+ `[tool.uv.sources]` path entry must be removed. Widen the upper bound only
13
+ after the tests pass against the new `aiqclib` minor version.
14
+ 2. **Lint and format** *(if necessary)*:
15
+ ```bash
16
+ uv run ruff format src tests
17
+ uv run ruff check src tests
18
+ ```
19
+ 3. **Update API documentation** *(if necessary)*: see
20
+ [Building docs locally](#building-docs-locally).
21
+ 4. **Update `CHANGELOG.md`**: record the changes for the new version.
22
+ 5. **Bump the version** in `pyproject.toml`, then run `uv sync` so `uv.lock`
23
+ records it.
24
+ 6. **Commit, then create the release**: once merged into `main`, creating a
25
+ GitHub release triggers the PyPI publish.
26
+
27
+ ## Building docs locally
28
+
29
+ ```bash
30
+ uv run sphinx-apidoc -f --remove-old --module-first -o docs/source/api src/nrtqclib
31
+ cd docs; uv run make html; cd ..
32
+ ```
33
+
34
+ Open `docs/build/html/index.html` to view the site.
35
+
36
+ ## Deployment
37
+
38
+ The package is published to PyPI by `.github/workflows/publish_to_pypi.yml`
39
+ whenever a GitHub release is created. The PyPI project needs a trusted
40
+ publisher configured for this repository and the `pypi` environment.
@@ -0,0 +1,2 @@
1
+ ignore:
2
+ - 'tests/*'
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)