nexsci-rv 1.0.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 (42) hide show
  1. nexsci_rv-1.0.0/.gitignore +68 -0
  2. nexsci_rv-1.0.0/CHANGELOG.md +55 -0
  3. nexsci_rv-1.0.0/LICENSE +28 -0
  4. nexsci_rv-1.0.0/PKG-INFO +147 -0
  5. nexsci_rv-1.0.0/README.md +67 -0
  6. nexsci_rv-1.0.0/pyproject.toml +147 -0
  7. nexsci_rv-1.0.0/src/nexsci_rv/__init__.py +54 -0
  8. nexsci_rv-1.0.0/src/nexsci_rv/_adql_utils.py +212 -0
  9. nexsci_rv-1.0.0/src/nexsci_rv/_types.py +18 -0
  10. nexsci_rv-1.0.0/src/nexsci_rv/archives/__init__.py +0 -0
  11. nexsci_rv-1.0.0/src/nexsci_rv/archives/expres/__init__.py +169 -0
  12. nexsci_rv-1.0.0/src/nexsci_rv/archives/expres/endpoints.py +38 -0
  13. nexsci_rv-1.0.0/src/nexsci_rv/archives/expres/tables.py +85 -0
  14. nexsci_rv-1.0.0/src/nexsci_rv/archives/neid/__init__.py +49 -0
  15. nexsci_rv-1.0.0/src/nexsci_rv/archives/neid/endpoints.py +36 -0
  16. nexsci_rv-1.0.0/src/nexsci_rv/archives/neid/tables.py +107 -0
  17. nexsci_rv-1.0.0/src/nexsci_rv/async_job.py +244 -0
  18. nexsci_rv-1.0.0/src/nexsci_rv/auth.py +201 -0
  19. nexsci_rv-1.0.0/src/nexsci_rv/base.py +488 -0
  20. nexsci_rv-1.0.0/src/nexsci_rv/config.py +71 -0
  21. nexsci_rv-1.0.0/src/nexsci_rv/download.py +236 -0
  22. nexsci_rv-1.0.0/src/nexsci_rv/exceptions.py +109 -0
  23. nexsci_rv-1.0.0/src/nexsci_rv/tap.py +164 -0
  24. nexsci_rv-1.0.0/tests/__init__.py +0 -0
  25. nexsci_rv-1.0.0/tests/cassettes/.gitkeep +0 -0
  26. nexsci_rv-1.0.0/tests/conftest.py +19 -0
  27. nexsci_rv-1.0.0/tests/integration/__init__.py +0 -0
  28. nexsci_rv-1.0.0/tests/recorded/__init__.py +0 -0
  29. nexsci_rv-1.0.0/tests/unit/__init__.py +0 -0
  30. nexsci_rv-1.0.0/tests/unit/test_adql_utils.py +194 -0
  31. nexsci_rv-1.0.0/tests/unit/test_async_job.py +422 -0
  32. nexsci_rv-1.0.0/tests/unit/test_auth.py +126 -0
  33. nexsci_rv-1.0.0/tests/unit/test_base_archive.py +508 -0
  34. nexsci_rv-1.0.0/tests/unit/test_cassette_hygiene.py +51 -0
  35. nexsci_rv-1.0.0/tests/unit/test_config.py +53 -0
  36. nexsci_rv-1.0.0/tests/unit/test_download.py +173 -0
  37. nexsci_rv-1.0.0/tests/unit/test_exceptions.py +42 -0
  38. nexsci_rv-1.0.0/tests/unit/test_expres_archive.py +210 -0
  39. nexsci_rv-1.0.0/tests/unit/test_neid_endpoints.py +39 -0
  40. nexsci_rv-1.0.0/tests/unit/test_neid_tables.py +36 -0
  41. nexsci_rv-1.0.0/tests/unit/test_tap.py +111 -0
  42. nexsci_rv-1.0.0/tests/unit/test_types.py +21 -0
@@ -0,0 +1,68 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ dist/
9
+ *.egg-info/
10
+ *.egg
11
+ .eggs/
12
+
13
+ # venvs
14
+ .venv/
15
+ venv/
16
+ env/
17
+
18
+ # Tests / coverage
19
+ .pytest_cache/
20
+ .coverage
21
+ .coverage.*
22
+ htmlcov/
23
+ coverage.xml
24
+ *.cover
25
+
26
+ # mypy / ruff caches
27
+ .mypy_cache/
28
+ .ruff_cache/
29
+
30
+ # Docs build output (Sphinx + legacy MkDocs)
31
+ site/
32
+ .cache/
33
+ docs/_build/
34
+
35
+ # Jupyter
36
+ .ipynb_checkpoints/
37
+
38
+ # Notebook download outputs (created when tutorials run live)
39
+ docs/tutorials/data/
40
+
41
+ # IDEs
42
+ .vscode/
43
+ .idea/
44
+ *.swp
45
+
46
+ # OS
47
+ .DS_Store
48
+ Thumbs.db
49
+
50
+ # Secrets / local artifacts (defense in depth — should never exist anyway)
51
+ *.cookie
52
+ cookie
53
+ neid_cookie.txt
54
+ neidadmincookie.txt
55
+ .env
56
+ .env.*
57
+
58
+ # Internal IPAC policy docs — never publish
59
+ Open Sourcing Software*.pdf
60
+
61
+ # IPAC open-sourcing paperwork — contains signatures/personal info, never publish
62
+ SoftwareDisclosure*.pdf
63
+ IPAC-Public-Repository-Request*.pdf
64
+ nexsci-rv_OTTCP_disclosure_description.*
65
+ OTTCP_submission_*/
66
+
67
+ # Local tooling binaries that must never be committed
68
+ dcp-cert-util
@@ -0,0 +1,55 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.0] — 2026-10-27
11
+
12
+ First public release.
13
+
14
+ ### Added
15
+ - `NEIDArchive` backend covering NEID L0/L1/L2, engineering, and solar tables.
16
+ - `EXPRESArchive` backend covering EXPRES solar L1 and L2.
17
+ - Shared core: TAP client, cookie-based `SessionManager`, parallel `download()` with
18
+ retry and resume, `AsyncJob` for async TAP queries.
19
+ - Sphinx (MyST) documentation on GitHub Pages, written for astronomers new to
20
+ RV archives: quickstart, a guided "first query" page, an "Understanding the
21
+ data" concepts layer, glossary, per-archive pages, guides, and API reference.
22
+ - Three tutorial notebooks under `docs/tutorials/`, exercised in CI via
23
+ `nbmake` in an offline stub mode (`NEXSCI_RV_OFFLINE_FIXTURES=1`).
24
+ - Support section pointing to `neid-help@ipac.caltech.edu` and GitHub Issues.
25
+
26
+ ### Fixed
27
+ - `NEIDArchive.query_datetime` filtered on a nonexistent `date_obs` column
28
+ (server error `ORA-00904`); NEID tables use `obsdate`, as EXPRES does.
29
+ - `download()` ignored the `server=` override and always fetched from the
30
+ production host; downloads now go to the same server as queries and login,
31
+ for both NEID and EXPRES.
32
+
33
+ ### Security
34
+ - Pre-release audit with remediations applied: EXPRES query gaps raise
35
+ `NotApplicable`, cookie-file race fix, defusedxml documentation,
36
+ pip-audit clean. User-facing credential guidance lives in the
37
+ Authentication guide.
38
+
39
+ ### Relationship to pyNEID
40
+ `nexsci-rv` is a clean-room successor to the
41
+ [pyNEID](https://github.com/Caltech-IPAC/pyNEID) package. It is **not** API
42
+ compatible. Motivations for the rewrite:
43
+
44
+ - Multi-archive support (NEID + EXPRES, with extensibility for more) rather
45
+ than NEID-only.
46
+ - New PyPI project (the original `pyneid` PyPI account is no longer accessible).
47
+ - Cleaner internal architecture: archive-backends + shared core, replacing a
48
+ 3,900-line monolithic `core.py`.
49
+ - Modern packaging (`pyproject.toml`, ruff, mypy, GitHub Actions, Trusted Publishing).
50
+ - Polished auth (per-archive cookies in `~/.config/nexsci-rv/`, env-var
51
+ credentials, `getpass` prompts, 0600 file mode).
52
+ - Default server is the NEID production server.
53
+
54
+ Existing pyNEID users should migrate by rewriting imports and call sites. There
55
+ is no compatibility shim.
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Caltech-IPAC
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.5
2
+ Name: nexsci-rv
3
+ Version: 1.0.0
4
+ Summary: Python client for the radial-velocity data archives hosted at NExScI.
5
+ Project-URL: Homepage, https://github.com/Caltech-IPAC/nexsci-rv
6
+ Project-URL: Documentation, https://caltech-ipac.github.io/nexsci-rv/
7
+ Project-URL: Repository, https://github.com/Caltech-IPAC/nexsci-rv
8
+ Project-URL: Issues, https://github.com/Caltech-IPAC/nexsci-rv/issues
9
+ Author-email: BJ Fulton <bjfulton@ipac.caltech.edu>
10
+ License: BSD 3-Clause License
11
+
12
+ Copyright (c) 2026, Caltech-IPAC
13
+
14
+ Redistribution and use in source and binary forms, with or without
15
+ modification, are permitted provided that the following conditions are met:
16
+
17
+ 1. Redistributions of source code must retain the above copyright notice, this
18
+ list of conditions and the following disclaimer.
19
+
20
+ 2. Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimer in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ 3. Neither the name of the copyright holder nor the names of its
25
+ contributors may be used to endorse or promote products derived from
26
+ this software without specific prior written permission.
27
+
28
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+ License-File: LICENSE
39
+ Keywords: astronomy,expres,ivoa,neid,nexsci,radial-velocity,spectroscopy,tap
40
+ Classifier: Development Status :: 5 - Production/Stable
41
+ Classifier: Intended Audience :: Science/Research
42
+ Classifier: License :: OSI Approved :: BSD License
43
+ Classifier: Operating System :: MacOS
44
+ Classifier: Operating System :: POSIX :: Linux
45
+ Classifier: Programming Language :: Python :: 3
46
+ Classifier: Programming Language :: Python :: 3.10
47
+ Classifier: Programming Language :: Python :: 3.11
48
+ Classifier: Programming Language :: Python :: 3.12
49
+ Classifier: Programming Language :: Python :: 3.13
50
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
51
+ Requires-Python: >=3.10
52
+ Requires-Dist: astropy>=6.0
53
+ Requires-Dist: defusedxml>=0.7
54
+ Requires-Dist: platformdirs>=4.0
55
+ Requires-Dist: requests>=2.31
56
+ Requires-Dist: tqdm>=4.66
57
+ Provides-Extra: dev
58
+ Requires-Dist: mypy>=1.10; extra == 'dev'
59
+ Requires-Dist: pip-audit>=2.7; extra == 'dev'
60
+ Requires-Dist: pre-commit>=3.7; extra == 'dev'
61
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
62
+ Requires-Dist: pytest-vcr>=1.0.2; extra == 'dev'
63
+ Requires-Dist: pytest>=8.0; extra == 'dev'
64
+ Requires-Dist: ruff<0.16,>=0.15; extra == 'dev'
65
+ Requires-Dist: types-requests; extra == 'dev'
66
+ Requires-Dist: vcrpy>=6.0; extra == 'dev'
67
+ Provides-Extra: docs
68
+ Requires-Dist: ipykernel>=6.29; extra == 'docs'
69
+ Requires-Dist: linkify-it-py>=2.0; extra == 'docs'
70
+ Requires-Dist: matplotlib>=3.8; extra == 'docs'
71
+ Requires-Dist: myst-nb>=1.1; extra == 'docs'
72
+ Requires-Dist: sphinx-copybutton>=0.5; extra == 'docs'
73
+ Requires-Dist: sphinx-rtd-theme>=2.0; extra == 'docs'
74
+ Requires-Dist: sphinx<9,>=7.2; extra == 'docs'
75
+ Provides-Extra: notebooks
76
+ Requires-Dist: jupyter>=1.0; extra == 'notebooks'
77
+ Requires-Dist: matplotlib>=3.8; extra == 'notebooks'
78
+ Requires-Dist: nbmake>=1.5; extra == 'notebooks'
79
+ Description-Content-Type: text/markdown
80
+
81
+ # nexsci-rv
82
+
83
+ A Python client for radial-velocity data archives hosted at [NExScI](https://nexsci.caltech.edu/).
84
+
85
+ [![Docs](https://github.com/Caltech-IPAC/nexsci-rv/actions/workflows/docs.yml/badge.svg)](https://caltech-ipac.github.io/nexsci-rv/)
86
+
87
+ 📖 **Documentation:** <https://caltech-ipac.github.io/nexsci-rv/>
88
+
89
+ **Status:** stable (`1.0.0`). The public API follows [Semantic Versioning](https://semver.org/): breaking changes only in a new major version.
90
+
91
+ `nexsci-rv` gives every supported archive the same interface: search
92
+ observations by date, position, target, or program, get the results back as
93
+ an `astropy` table, and download the data products you need.
94
+
95
+ ## Supported archives
96
+
97
+ | Archive | Data levels | Auth |
98
+ |---|---|---|
99
+ | NEID | L0, L1, L2, eng, solar L0/L1/L2/eng | cookie-based login (public access without) |
100
+ | EXPRES | solar L1, solar L2 | public |
101
+
102
+ ## Install
103
+
104
+ ```bash
105
+ pip install nexsci-rv
106
+ # or, from source:
107
+ pip install -e ".[dev]"
108
+ ```
109
+
110
+ ## Quickstart
111
+
112
+ ```python
113
+ from nexsci_rv import NEIDArchive, EXPRESArchive
114
+
115
+ neid = NEIDArchive()
116
+ table = neid.query_datetime("l2", ("2024-11-01", "2024-11-06"))
117
+ print(table)
118
+
119
+ expres = EXPRESArchive()
120
+ sun = expres.query_datetime(
121
+ "solarl2",
122
+ ("2024-11-01", "2024-11-06"),
123
+ columns=["l2filename", "obsdate", "v", "e_v", "dvrms", "extsnr"],
124
+ )
125
+ print(sun)
126
+ ```
127
+
128
+ See the [quickstart](https://caltech-ipac.github.io/nexsci-rv/quickstart.html) and the [tutorials](https://caltech-ipac.github.io/nexsci-rv/tutorials/01_neid_query_l2.html) in the documentation.
129
+
130
+ ## Predecessor
131
+
132
+ `nexsci-rv` is a clean-room successor to [pyNEID](https://github.com/Caltech-IPAC/pyNEID). It is **not** API-compatible — see the [changelog](https://github.com/Caltech-IPAC/nexsci-rv/blob/main/CHANGELOG.md) for the rationale.
133
+
134
+ ## Support
135
+
136
+ Questions, bug reports, and feature requests are welcome:
137
+
138
+ - **Email:** <neid-help@ipac.caltech.edu> — the NEID/NExScI archive helpdesk, and the
139
+ best route for questions about the data itself or about archive access.
140
+ - **GitHub Issues:** <https://github.com/Caltech-IPAC/nexsci-rv/issues> — for bugs in
141
+ this client library.
142
+
143
+ Please do not include passwords or session cookies in an issue or an email.
144
+
145
+ ## License
146
+
147
+ BSD 3-Clause. See [`LICENSE`](https://github.com/Caltech-IPAC/nexsci-rv/blob/main/LICENSE).
@@ -0,0 +1,67 @@
1
+ # nexsci-rv
2
+
3
+ A Python client for radial-velocity data archives hosted at [NExScI](https://nexsci.caltech.edu/).
4
+
5
+ [![Docs](https://github.com/Caltech-IPAC/nexsci-rv/actions/workflows/docs.yml/badge.svg)](https://caltech-ipac.github.io/nexsci-rv/)
6
+
7
+ 📖 **Documentation:** <https://caltech-ipac.github.io/nexsci-rv/>
8
+
9
+ **Status:** stable (`1.0.0`). The public API follows [Semantic Versioning](https://semver.org/): breaking changes only in a new major version.
10
+
11
+ `nexsci-rv` gives every supported archive the same interface: search
12
+ observations by date, position, target, or program, get the results back as
13
+ an `astropy` table, and download the data products you need.
14
+
15
+ ## Supported archives
16
+
17
+ | Archive | Data levels | Auth |
18
+ |---|---|---|
19
+ | NEID | L0, L1, L2, eng, solar L0/L1/L2/eng | cookie-based login (public access without) |
20
+ | EXPRES | solar L1, solar L2 | public |
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ pip install nexsci-rv
26
+ # or, from source:
27
+ pip install -e ".[dev]"
28
+ ```
29
+
30
+ ## Quickstart
31
+
32
+ ```python
33
+ from nexsci_rv import NEIDArchive, EXPRESArchive
34
+
35
+ neid = NEIDArchive()
36
+ table = neid.query_datetime("l2", ("2024-11-01", "2024-11-06"))
37
+ print(table)
38
+
39
+ expres = EXPRESArchive()
40
+ sun = expres.query_datetime(
41
+ "solarl2",
42
+ ("2024-11-01", "2024-11-06"),
43
+ columns=["l2filename", "obsdate", "v", "e_v", "dvrms", "extsnr"],
44
+ )
45
+ print(sun)
46
+ ```
47
+
48
+ See the [quickstart](https://caltech-ipac.github.io/nexsci-rv/quickstart.html) and the [tutorials](https://caltech-ipac.github.io/nexsci-rv/tutorials/01_neid_query_l2.html) in the documentation.
49
+
50
+ ## Predecessor
51
+
52
+ `nexsci-rv` is a clean-room successor to [pyNEID](https://github.com/Caltech-IPAC/pyNEID). It is **not** API-compatible — see the [changelog](https://github.com/Caltech-IPAC/nexsci-rv/blob/main/CHANGELOG.md) for the rationale.
53
+
54
+ ## Support
55
+
56
+ Questions, bug reports, and feature requests are welcome:
57
+
58
+ - **Email:** <neid-help@ipac.caltech.edu> — the NEID/NExScI archive helpdesk, and the
59
+ best route for questions about the data itself or about archive access.
60
+ - **GitHub Issues:** <https://github.com/Caltech-IPAC/nexsci-rv/issues> — for bugs in
61
+ this client library.
62
+
63
+ Please do not include passwords or session cookies in an issue or an email.
64
+
65
+ ## License
66
+
67
+ BSD 3-Clause. See [`LICENSE`](https://github.com/Caltech-IPAC/nexsci-rv/blob/main/LICENSE).
@@ -0,0 +1,147 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.21"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "nexsci-rv"
7
+ version = "1.0.0"
8
+ description = "Python client for the radial-velocity data archives hosted at NExScI."
9
+ readme = "README.md"
10
+ license = { file = "LICENSE" }
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "BJ Fulton", email = "bjfulton@ipac.caltech.edu" },
14
+ ]
15
+ keywords = ["astronomy", "radial-velocity", "spectroscopy", "neid", "expres", "nexsci", "tap", "ivoa"]
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Intended Audience :: Science/Research",
19
+ "License :: OSI Approved :: BSD License",
20
+ "Operating System :: POSIX :: Linux",
21
+ "Operating System :: MacOS",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
27
+ "Topic :: Scientific/Engineering :: Astronomy",
28
+ ]
29
+ dependencies = [
30
+ "astropy>=6.0",
31
+ "requests>=2.31",
32
+ "platformdirs>=4.0",
33
+ "tqdm>=4.66",
34
+ "defusedxml>=0.7",
35
+ ]
36
+
37
+ [project.optional-dependencies]
38
+ dev = [
39
+ "pytest>=8.0",
40
+ "pytest-cov>=5.0",
41
+ "pytest-vcr>=1.0.2",
42
+ "vcrpy>=6.0",
43
+ # Pinned below 0.16: 0.16 began formatting Python code blocks inside
44
+ # Markdown, which would reformat the docs tree. Revisit deliberately.
45
+ "ruff>=0.15,<0.16",
46
+ "mypy>=1.10",
47
+ "types-requests",
48
+ "pre-commit>=3.7",
49
+ "pip-audit>=2.7",
50
+ ]
51
+ docs = [
52
+ "sphinx>=7.2,<9",
53
+ "myst-nb>=1.1",
54
+ "sphinx-rtd-theme>=2.0",
55
+ "sphinx-copybutton>=0.5",
56
+ "linkify-it-py>=2.0",
57
+ "ipykernel>=6.29",
58
+ "matplotlib>=3.8",
59
+ ]
60
+ notebooks = [
61
+ "jupyter>=1.0",
62
+ "matplotlib>=3.8",
63
+ "nbmake>=1.5",
64
+ ]
65
+
66
+ [project.urls]
67
+ Homepage = "https://github.com/Caltech-IPAC/nexsci-rv"
68
+ Documentation = "https://caltech-ipac.github.io/nexsci-rv/"
69
+ Repository = "https://github.com/Caltech-IPAC/nexsci-rv"
70
+ Issues = "https://github.com/Caltech-IPAC/nexsci-rv/issues"
71
+
72
+ [tool.hatch.build.targets.wheel]
73
+ packages = ["src/nexsci_rv"]
74
+
75
+ [tool.hatch.build.targets.sdist]
76
+ include = [
77
+ "src/nexsci_rv",
78
+ "tests",
79
+ "README.md",
80
+ "LICENSE",
81
+ "CHANGELOG.md",
82
+ "pyproject.toml",
83
+ ]
84
+
85
+ [tool.ruff]
86
+ line-length = 100
87
+ target-version = "py310"
88
+ src = ["src", "tests"]
89
+
90
+ [tool.ruff.lint]
91
+ select = [
92
+ "E", "F", "W", # pycodestyle / pyflakes
93
+ "I", # isort
94
+ "B", # bugbear
95
+ "UP", # pyupgrade
96
+ "SIM", # simplify
97
+ "RUF", # ruff-specific
98
+ "S", # bandit (security)
99
+ ]
100
+ ignore = [
101
+ "E501", # line length handled by formatter
102
+ "S101", # asserts in tests
103
+ ]
104
+
105
+ [tool.ruff.lint.per-file-ignores]
106
+ "tests/**" = ["S101", "S105", "S106", "S311"]
107
+
108
+ [tool.ruff.format]
109
+ quote-style = "double"
110
+
111
+ [tool.mypy]
112
+ python_version = "3.10"
113
+ strict = true
114
+ warn_unreachable = true
115
+ warn_unused_ignores = true
116
+ disallow_untyped_defs = true
117
+ files = ["src/nexsci_rv"]
118
+
119
+ [[tool.mypy.overrides]]
120
+ module = ["astropy.*", "vcr.*", "tqdm.*", "defusedxml.*"]
121
+ ignore_missing_imports = true
122
+
123
+ [tool.pytest.ini_options]
124
+ minversion = "8.0"
125
+ testpaths = ["tests"]
126
+ addopts = [
127
+ "-ra",
128
+ "--strict-markers",
129
+ "--strict-config",
130
+ ]
131
+ markers = [
132
+ "network: integration tests that hit the live NEID server",
133
+ "slow: tests slower than a few seconds",
134
+ ]
135
+
136
+ [tool.coverage.run]
137
+ source = ["src/nexsci_rv"]
138
+ branch = true
139
+
140
+ [tool.coverage.report]
141
+ exclude_lines = [
142
+ "pragma: no cover",
143
+ "raise NotImplementedError",
144
+ "if TYPE_CHECKING:",
145
+ "\\.\\.\\.",
146
+ ]
147
+ fail_under = 85
@@ -0,0 +1,54 @@
1
+ """nexsci-rv — Python client for radial-velocity archives at NExScI."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ from . import exceptions
6
+ from .archives.expres import EXPRESArchive
7
+ from .archives.neid import NEIDArchive
8
+ from .async_job import AsyncJob
9
+ from .base import BaseArchive
10
+ from .config import Conf, conf
11
+ from .exceptions import (
12
+ AsyncJobError,
13
+ AuthError,
14
+ AuthExpired,
15
+ ConfigError,
16
+ DownloadError,
17
+ LoginFailed,
18
+ NexsciRVError,
19
+ NotApplicable,
20
+ NotAuthenticated,
21
+ QueryError,
22
+ TapServerError,
23
+ UnknownColumn,
24
+ UnknownDataLevel,
25
+ )
26
+
27
+ try:
28
+ __version__ = version("nexsci-rv")
29
+ except PackageNotFoundError: # pragma: no cover
30
+ __version__ = "0.0.0+unknown"
31
+
32
+ __all__ = [
33
+ "AsyncJob",
34
+ "AsyncJobError",
35
+ "AuthError",
36
+ "AuthExpired",
37
+ "BaseArchive",
38
+ "Conf",
39
+ "ConfigError",
40
+ "DownloadError",
41
+ "EXPRESArchive",
42
+ "LoginFailed",
43
+ "NEIDArchive",
44
+ "NexsciRVError",
45
+ "NotApplicable",
46
+ "NotAuthenticated",
47
+ "QueryError",
48
+ "TapServerError",
49
+ "UnknownColumn",
50
+ "UnknownDataLevel",
51
+ "__version__",
52
+ "conf",
53
+ "exceptions",
54
+ ]