Skip to content

Commit 5f645ce

Browse files
committed
chore(architecture): split guardrails from packaging fix
1 parent 0e2c16b commit 5f645ce

13 files changed

Lines changed: 26 additions & 773 deletions

CONTRIBUTING.md

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -79,51 +79,30 @@ Please do not combine multiple feature enhancements into a single pull request.
7979
Before you submit a pull request, check that it meets these guidelines:
8080

8181
1. If the pull request adds or modifies package functionality, unit tests
82-
should be written to test the new functionality.
83-
2. If the pull request adds or modifies functionality, update the documentation
84-
or function docstrings that describe it.
85-
3. The pull request should work for Python 3.10 and later. Refer to the
86-
[Python package workflow](https://github.com/DOI-USGS/dataretrieval-python/blob/main/.github/workflows/python-package.yml)
87-
for the versions and operating systems currently tested by CI.
88-
4. Build-related changes should preserve the installed-wheel smoke test; tests
89-
run from a source checkout are not sufficient to prove package contents.
90-
5. Architecturally significant changes should update the
91-
[architecture documentation](docs/source/architecture/index.rst), add or
92-
supersede an ADR, and adjust the corresponding fitness function.
82+
should be written to test the new functionality
83+
2. If the pull request adds or modifies functionality, the documentation should
84+
be updated. To do so, either add or modify a functions docstring which will
85+
automatically become part of the API documentation
86+
3. The pull request should work for Python 3.9 and later - refer to the
87+
[python-package.yml file](https://github.com/DOI-USGS/dataretrieval-python/blob/main/.github/workflows/python-package.yml)
88+
for the latest versions of Python being tested by the continuous integration
89+
pipelines. This will be checked automatically by the CI pipelines once the
90+
pull request is opened.
9391

9492
### Coding Standards and Style
9593

96-
The continuous integration and pre-commit configurations enforce formatting,
97-
linting, and strict type checking. Run the relevant checks before opening a PR:
98-
99-
```bash
100-
ruff check .
101-
ruff format --check .
102-
mypy
103-
coverage run -m pytest tests/
104-
coverage report -m
105-
```
106-
107-
For documentation changes, install `.[doc,nldi]` and run `make html` from
108-
`docs/`. The broader `make docs` target also runs doctests and network-dependent
109-
link checking.
94+
Note that coding standards and style as described below are strong suggestions,
95+
the `dataretrieval` project does not strictly lint or enforce style guidelines
96+
via any automated processes or pipelines.
11097

11198
#### Style
11299

113-
* Follow the [PEP8 style guidelines](https://peps.python.org/pep-0008/).
114-
* The public interface should emphasize functions over classes; classes can and
115-
should be used internally and in tests.
116-
* Group public download functions by data portal. For example, modern Water
117-
Data functions belong in `dataretrieval.waterdata`; legacy NWIS functions
118-
remain quarantined in `dataretrieval.nwis` during deprecation.
119-
* Preserve the dependency direction documented in
120-
[`docs/source/architecture`](docs/source/architecture/index.rst): public
121-
facades depend on service/protocol adapters, which depend on stable shared
122-
policy and infrastructure. Shared OGC code must not import service adapters,
123-
and modern modules must not depend on legacy NWIS.
124-
* Treat underscore-prefixed helpers as implementation details. Existing
125-
cross-package uses are documented variances, not extension points for new
126-
code.
100+
* Attempt to write code following the [PEP8 style guidelines](https://peps.python.org/pep-0008/) as much as possible
101+
* The public interface should emphasize functions over classes; however, classes
102+
can and should be used internally and in tests
103+
* Functions for downloading data from a specific web portal must be grouped
104+
within their own submodule
105+
* For example, all NWIS functions are located at `dataretrieval.nwis`
127106

128107
#### Docstrings
129108
* Docstrings should follow the [numpy standard](https://numpydoc.readthedocs.io/en/v1.5.0/format.html):

NEWS.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
**08/02/2026:** Fixed source-distribution and wheel package discovery so the `dataretrieval.ogc` and `dataretrieval.waterdata` subpackages are included in installed artifacts. CI now builds and installs the wheel outside the source checkout before importing the core service modules. Added an architecture baseline, initial decision records, and executable dependency-direction guardrails for the existing modular-monolith boundaries.
2-
31
**06/23/2026:** **Breaking change (1.2.0):** the minimum supported Python is now **3.10** (`requires-python = ">=3.10"`). 3.9 support was already effectively broken — the `waterdata` module's dependencies (`anyio`, the test stack) require 3.10+, and the `waterdata` test modules already skipped on <3.10. `anyio` is now declared as a direct dependency (it is imported directly by `waterdata`), and the CI/ruff/mypy targets move to 3.10. Also fully removed the deprecated `variable_info` metadata property: the `NWIS_Metadata` override only warned and returned `None` (it relied on the defunct `get_pmcodes`), and the `BaseMetadata` abstract is gone too since nothing implemented it — accessing `.variable_info` now raises `AttributeError`. `site_info` is unaffected.
42

53
**06/23/2026:** **Breaking change (1.2.0):** removed the `nadp` module and the deprecated `samples` module ahead of the 1.2.0 release. `nadp` was deprecated on 05/01/2026 — NADP is not a USGS data source, so retrieve NADP data directly from https://nadp.slh.wisc.edu/. The `samples.get_usgs_samples` shim (a deprecated forward to the modern getter) is gone; use `waterdata.get_samples()` instead. `import dataretrieval.nadp` / `import dataretrieval.samples` now raise `ModuleNotFoundError`.

docs/source/architecture/decisions/0001-modular-monolith.rst

Lines changed: 0 additions & 49 deletions
This file was deleted.

docs/source/architecture/decisions/0002-sync-api-async-internals.rst

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/source/architecture/decisions/0003-dependency-direction.rst

Lines changed: 0 additions & 56 deletions
This file was deleted.

docs/source/architecture/decisions/0004-error-retry-resume.rst

Lines changed: 0 additions & 52 deletions
This file was deleted.

docs/source/architecture/decisions/0005-legacy-nwis.rst

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/source/architecture/decisions/index.rst

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)