spice-kernel-db 0.22.2__tar.gz → 0.22.3__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.
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/CHANGELOG.md +26 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/CITATION.cff +1 -1
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/CLAUDE.md +36 -7
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/PKG-INFO +1 -1
- spice_kernel_db-0.22.3/conda/recipe.yaml +58 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/pyproject.toml +1 -1
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/db.py +44 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/test_regressions.py +75 -0
- spice_kernel_db-0.22.2/conda/meta.yaml +0 -49
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/.github/workflows/ci.yml +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/.github/workflows/publish.yml +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/.gitignore +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/.zenodo.json +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/LICENSE +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/README.md +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/_quarto.yml +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/api.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/cli.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/coverage.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/custom.scss +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/design.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/images/hero.svg +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/index.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/motivation.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/review.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/troubleshooting.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/tutorial-mission-discovery.ipynb +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/docs/usage.qmd +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/__init__.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/cli/__init__.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/cli/_app.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/cli/browse.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/cli/configure.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/cli/inspect_cmds.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/cli/prompts.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/cli/transform.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/config.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/coverage.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/hashing.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/mission_registry.toml +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/parser.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/registry.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/src/spice_kernel_db/remote.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/__init__.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/_netguard.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/conftest.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/fixtures/mission_registry_min.toml +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/helpers.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/test_cli.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/test_db.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/test_metakernel.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/test_network.py +0 -0
- {spice_kernel_db-0.22.2 → spice_kernel_db-0.22.3}/tests/test_remote.py +0 -0
|
@@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.22.3] - 2026-10-26
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **A kernel marked superseded now recovers when its file is present** (#29).
|
|
15
|
+
`superseded_by` had exactly one writer and it only ever SET the column, so
|
|
16
|
+
the state was unrecoverable. Whenever anything wrote non-kernel content to a
|
|
17
|
+
tracked path -- a pre-0.17.0 interrupted download, a Dropbox conflict copy,
|
|
18
|
+
an editor -- the real kernel's hash was marked superseded by that junk.
|
|
19
|
+
Restoring the file marked the junk superseded in turn, leaving *both* rows
|
|
20
|
+
flagged, and `find_by_filename()` excludes superseded rows. So `resolve`
|
|
21
|
+
reported "not found" for a byte-perfect file on disk,
|
|
22
|
+
`_should_skip_download()` saw no `db_hash`, and every `update` re-downloaded
|
|
23
|
+
the same kernel forever. Observed on a real install where `pck00011.tpc` and
|
|
24
|
+
`earthstns_fx_201023.bsp` re-downloaded on every run.
|
|
25
|
+
|
|
26
|
+
`register_file()` now clears the flag when the superseding content exists in
|
|
27
|
+
**no live location**. The condition is narrow on purpose: a genuine upstream
|
|
28
|
+
update whose newer file is on disk keeps its supersession, so `resolve` can
|
|
29
|
+
never start handing back a real older release. Content that supersedes
|
|
30
|
+
nothing findable was never a version, only damage.
|
|
31
|
+
|
|
32
|
+
This makes **`scan` the repair path** for an already-damaged database: one
|
|
33
|
+
pass over the kernel tree heals every poisoned row.
|
|
34
|
+
|
|
10
35
|
## [0.22.2] - 2026-10-26
|
|
11
36
|
|
|
12
37
|
### Fixed
|
|
@@ -1108,6 +1133,7 @@ spice-kernel-db check <your-metakernel.tm>
|
|
|
1108
1133
|
reference)
|
|
1109
1134
|
- Comprehensive test suite (30 tests)
|
|
1110
1135
|
|
|
1136
|
+
[0.22.3]: https://github.com/michaelaye/spice-kernel-db/compare/v0.22.2...v0.22.3
|
|
1111
1137
|
[0.22.2]: https://github.com/michaelaye/spice-kernel-db/compare/v0.22.1...v0.22.2
|
|
1112
1138
|
[0.22.1]: https://github.com/michaelaye/spice-kernel-db/compare/v0.22.0...v0.22.1
|
|
1113
1139
|
[0.22.0]: https://github.com/michaelaye/spice-kernel-db/compare/v0.21.0...v0.22.0
|
|
@@ -84,17 +84,46 @@ Tests use `pytest-tmp-files` for temporary directory fixtures. The main fixture
|
|
|
84
84
|
|
|
85
85
|
**IMPORTANT: Always update the changelog when bumping the version. Never commit a version bump without a corresponding changelog entry.**
|
|
86
86
|
|
|
87
|
+
The version string lives in **three** places and all three move together:
|
|
88
|
+
`pyproject.toml`, `conda/recipe.yaml` (`context.version`) and `CITATION.cff`.
|
|
89
|
+
|
|
87
90
|
1. Commit all changes with descriptive messages
|
|
88
|
-
2. Update version in
|
|
91
|
+
2. Update the version in all three files above (minor for features, patch for fixes)
|
|
89
92
|
3. Add entry to `CHANGELOG.md` (Keep a Changelog format) with comparison link at bottom
|
|
90
93
|
4. Commit as "Bump version to X.Y.Z: brief description"
|
|
91
94
|
5. Push to GitHub: `git push`
|
|
92
95
|
6. Publish to PyPI: `rm -rf dist/ && python -m build && python -m twine upload dist/*`
|
|
93
|
-
7. Create GitHub release: `gh release create vX.Y.Z --title "vX.Y.Z" --notes
|
|
94
|
-
8.
|
|
95
|
-
|
|
96
|
+
7. Create GitHub release: `gh release create vX.Y.Z --title "vX.Y.Z" --notes-file <file> --verify-tag`
|
|
97
|
+
8. Put the **published** sdist's sha256 in `conda/recipe.yaml`, then build:
|
|
98
|
+
```bash
|
|
99
|
+
curl -s https://pypi.org/pypi/spice-kernel-db/X.Y.Z/json \
|
|
100
|
+
| jq -r '.urls[] | select(.packagetype=="sdist") | .digests.sha256'
|
|
101
|
+
rattler-build build --recipe conda/recipe.yaml -c conda-forge --output-dir /tmp/skd-conda-out
|
|
102
|
+
```
|
|
103
|
+
9. Upload to anaconda.org:
|
|
104
|
+
```bash
|
|
105
|
+
export ANACONDA_API_KEY=<token>
|
|
106
|
+
rattler-build upload anaconda -o michaelaye /tmp/skd-conda-out/noarch/spice-kernel-db-X.Y.Z-*.conda
|
|
107
|
+
```
|
|
96
108
|
|
|
97
109
|
**Notes:**
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
110
|
+
- **Tag before building any artefact, and build from the tag.** A 0.22.x lesson:
|
|
111
|
+
the Typer port sat on `main` under the already-released 0.22.0 version string,
|
|
112
|
+
so a build from `main` would have published something the tag and the Zenodo
|
|
113
|
+
record did not describe. 0.22.1 then shipped a tag containing a stray build
|
|
114
|
+
directory that `git add -A` swept in. Check `git status` and the sdist's
|
|
115
|
+
contents before uploading, not after.
|
|
116
|
+
- **`rattler-build` replaced `conda-build` here** (2026-10-26). It is a
|
|
117
|
+
standalone Rust binary with no Python or conda-build dependency, so nothing
|
|
118
|
+
has to live in `base` or in a work env. Installed via
|
|
119
|
+
`pixi global install rattler-build`, landing in `~/.pixi/bin`. The recipe is
|
|
120
|
+
`conda/recipe.yaml` in the v1 format (CEP 13/14); the old
|
|
121
|
+
`conda/meta.yaml` and the `grayskull`/`anaconda-client` steps are gone.
|
|
122
|
+
- The v1 format is also conda-forge's direction, so the recipe should mostly
|
|
123
|
+
carry over if this ever moves to conda-forge. As of early 2026 conda-forge
|
|
124
|
+
still accepts both formats.
|
|
125
|
+
- conda-forge calls the DuckDB bindings **`python-duckdb`**, while
|
|
126
|
+
`pyproject.toml` asks for `duckdb`. The recipe must use the conda name.
|
|
127
|
+
- The recipe's tests exercise **both console scripts plus `--version`**. 0.22.0
|
|
128
|
+
moved the CLI to Typer, and an import-only test would not notice an entry
|
|
129
|
+
point breaking.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: spice-kernel-db
|
|
3
|
-
Version: 0.22.
|
|
3
|
+
Version: 0.22.3
|
|
4
4
|
Summary: Browse, get, and manage SPICE kernels and metakernels across NASA and ESA mission archives
|
|
5
5
|
Project-URL: Homepage, https://github.com/michaelaye/spice-kernel-db
|
|
6
6
|
Project-URL: Repository, https://github.com/michaelaye/spice-kernel-db
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
context:
|
|
2
|
+
name: spice-kernel-db
|
|
3
|
+
version: "0.22.3"
|
|
4
|
+
|
|
5
|
+
package:
|
|
6
|
+
name: ${{ name }}
|
|
7
|
+
version: ${{ version }}
|
|
8
|
+
|
|
9
|
+
source:
|
|
10
|
+
url: https://pypi.org/packages/source/s/${{ name }}/spice_kernel_db-${{ version }}.tar.gz
|
|
11
|
+
sha256: de6c6ea8b7ab2ce4f7830d70d810b2eb73071a52ad34f0553fe58e97b1432286
|
|
12
|
+
|
|
13
|
+
build:
|
|
14
|
+
noarch: python
|
|
15
|
+
number: 0
|
|
16
|
+
script: python -m pip install . -vv --no-deps --no-build-isolation
|
|
17
|
+
python:
|
|
18
|
+
entry_points:
|
|
19
|
+
- spice-kernel-db = spice_kernel_db.cli:main
|
|
20
|
+
- skd = spice_kernel_db.cli:main
|
|
21
|
+
|
|
22
|
+
requirements:
|
|
23
|
+
host:
|
|
24
|
+
- python >=3.11
|
|
25
|
+
- hatchling
|
|
26
|
+
- pip
|
|
27
|
+
run:
|
|
28
|
+
- python >=3.11
|
|
29
|
+
# conda-forge names the DuckDB Python bindings python-duckdb, while
|
|
30
|
+
# pyproject asks for `duckdb`; the rest match their PyPI names.
|
|
31
|
+
- python-duckdb >=1.0
|
|
32
|
+
- requests >=2.31
|
|
33
|
+
- rich >=13.0
|
|
34
|
+
- typer >=0.27
|
|
35
|
+
|
|
36
|
+
tests:
|
|
37
|
+
- python:
|
|
38
|
+
imports:
|
|
39
|
+
- spice_kernel_db
|
|
40
|
+
pip_check: true
|
|
41
|
+
- script:
|
|
42
|
+
# both console scripts, because 0.22.0 moved the CLI to Typer and an
|
|
43
|
+
# import-only test would not have caught the entry point breaking
|
|
44
|
+
- spice-kernel-db --help
|
|
45
|
+
- skd --help
|
|
46
|
+
- skd --version
|
|
47
|
+
|
|
48
|
+
about:
|
|
49
|
+
homepage: https://github.com/michaelaye/spice-kernel-db
|
|
50
|
+
repository: https://github.com/michaelaye/spice-kernel-db
|
|
51
|
+
documentation: https://michaelaye.github.io/spice-kernel-db
|
|
52
|
+
summary: Browse, get, and manage SPICE kernels and metakernels across NASA and ESA mission archives
|
|
53
|
+
license: MIT
|
|
54
|
+
license_file: LICENSE
|
|
55
|
+
|
|
56
|
+
extra:
|
|
57
|
+
recipe-maintainers:
|
|
58
|
+
- michaelaye
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "spice-kernel-db"
|
|
7
|
-
version = "0.22.
|
|
7
|
+
version = "0.22.3"
|
|
8
8
|
description = "Browse, get, and manage SPICE kernels and metakernels across NASA and ESA mission archives"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -634,6 +634,50 @@ class KernelDB:
|
|
|
634
634
|
[h, superseded_old_hash],
|
|
635
635
|
)
|
|
636
636
|
|
|
637
|
+
# Issue 29: un-supersede content that is demonstrably present.
|
|
638
|
+
#
|
|
639
|
+
# `superseded_by` had exactly one writer -- the block above --
|
|
640
|
+
# and it only ever SET the column, so the state was
|
|
641
|
+
# unrecoverable. Whenever anything wrote non-kernel content to
|
|
642
|
+
# a tracked path (a pre-0.17.0 interrupted download, a Dropbox
|
|
643
|
+
# conflict copy, an editor), the real kernel's hash was marked
|
|
644
|
+
# superseded by that junk. A later correct download restored
|
|
645
|
+
# the file and re-inserted this location, but the flag stayed,
|
|
646
|
+
# and find_by_filename() excludes superseded rows. So resolve()
|
|
647
|
+
# reported "not found" for a byte-perfect file on disk,
|
|
648
|
+
# _should_skip_download() got db_hash=None, and every `update`
|
|
649
|
+
# re-downloaded it. Forever, with no shipped way to repair it.
|
|
650
|
+
#
|
|
651
|
+
# The condition is deliberately narrow: clear the flag only
|
|
652
|
+
# when the superseding content exists in NO live location. A
|
|
653
|
+
# genuine upstream update whose newer file is on disk keeps its
|
|
654
|
+
# supersession, otherwise resolve() could start handing back a
|
|
655
|
+
# real older version. Content that supersedes nothing findable
|
|
656
|
+
# was never a version, only damage.
|
|
657
|
+
#
|
|
658
|
+
# This also makes `scan` the repair path for existing damage:
|
|
659
|
+
# re-registering a file heals its row.
|
|
660
|
+
superseded_now = cur.execute(
|
|
661
|
+
"SELECT superseded_by FROM kernels WHERE sha256 = ?", [h]
|
|
662
|
+
).fetchone()
|
|
663
|
+
if superseded_now and superseded_now[0]:
|
|
664
|
+
newer_hash = superseded_now[0]
|
|
665
|
+
newer_paths = cur.execute(
|
|
666
|
+
"SELECT abs_path FROM locations WHERE sha256 = ?",
|
|
667
|
+
[newer_hash],
|
|
668
|
+
).fetchall()
|
|
669
|
+
if not any(Path(r[0]).is_file() for r in newer_paths):
|
|
670
|
+
cur.execute(
|
|
671
|
+
"UPDATE kernels SET superseded_by = NULL "
|
|
672
|
+
"WHERE sha256 = ?", [h],
|
|
673
|
+
)
|
|
674
|
+
logger.warning(
|
|
675
|
+
"Kernel %s (%s) was marked superseded by %s, which "
|
|
676
|
+
"exists in no live location. Clearing the flag: "
|
|
677
|
+
"the file is present at %s.",
|
|
678
|
+
fname, h[:16], newer_hash[:16], p,
|
|
679
|
+
)
|
|
680
|
+
|
|
637
681
|
cur.execute("""
|
|
638
682
|
INSERT OR REPLACE INTO locations VALUES
|
|
639
683
|
(?, ?, ?, ?, current_timestamp)
|
|
@@ -1621,3 +1621,78 @@ class TestH6StalenessDatetimeComparison:
|
|
|
1621
1621
|
captured = capsys.readouterr().out
|
|
1622
1622
|
assert "Remote update available" not in captured
|
|
1623
1623
|
db.close()
|
|
1624
|
+
|
|
1625
|
+
|
|
1626
|
+
class TestUnsupersedePresentHashes:
|
|
1627
|
+
"""Issue 29: a hash whose file is on disk must not stay superseded forever.
|
|
1628
|
+
|
|
1629
|
+
`superseded_by` used to have exactly one writer, which only ever SET it.
|
|
1630
|
+
When anything put non-kernel content at a tracked path -- a pre-0.17.0
|
|
1631
|
+
interrupted download, a Dropbox conflict copy -- the real kernel was marked
|
|
1632
|
+
superseded by that junk. Restoring the file marked the junk superseded in
|
|
1633
|
+
turn, so BOTH rows ended up flagged, and find_by_filename() excludes
|
|
1634
|
+
superseded rows. resolve() then reported "not found" for a byte-perfect
|
|
1635
|
+
file and every `update` re-downloaded it, with no shipped repair path.
|
|
1636
|
+
|
|
1637
|
+
The damaged state is built with SQL rather than by driving register_file,
|
|
1638
|
+
because the fix heals it on the first call: the point is that an existing
|
|
1639
|
+
database carrying this damage recovers, which is what a user's `scan` does.
|
|
1640
|
+
"""
|
|
1641
|
+
|
|
1642
|
+
def _damaged(self, db, path, content, junk_hash):
|
|
1643
|
+
path.write_text(content)
|
|
1644
|
+
good = sha256_file(path)
|
|
1645
|
+
db.con.execute(
|
|
1646
|
+
"INSERT INTO kernels (sha256, filename, kernel_type, size_bytes, "
|
|
1647
|
+
"superseded_by) VALUES (?, ?, ?, ?, ?)",
|
|
1648
|
+
[good, path.name, "pck", path.stat().st_size, junk_hash],
|
|
1649
|
+
)
|
|
1650
|
+
db.con.execute(
|
|
1651
|
+
"INSERT INTO locations VALUES (?, ?, ?, ?, current_timestamp)",
|
|
1652
|
+
[good, str(path), "JUICE", None],
|
|
1653
|
+
)
|
|
1654
|
+
return good
|
|
1655
|
+
|
|
1656
|
+
def test_a_scan_heals_a_poisoned_row(self, db, tmp_path):
|
|
1657
|
+
p = tmp_path / "pck00011.tpc"
|
|
1658
|
+
junk = "f" * 64 # a hash with no row and no location
|
|
1659
|
+
good = self._damaged(db, p, "REAL PCK CONTENT", junk)
|
|
1660
|
+
|
|
1661
|
+
# the damage must be real, or this test proves nothing
|
|
1662
|
+
assert db.resolve_kernel("pck00011.tpc")[0] is None
|
|
1663
|
+
|
|
1664
|
+
db.register_file(p, mission="JUICE") # what `scan` does
|
|
1665
|
+
|
|
1666
|
+
row = db.con.execute(
|
|
1667
|
+
"SELECT superseded_by FROM kernels WHERE sha256 = ?", [good]
|
|
1668
|
+
).fetchone()
|
|
1669
|
+
assert row[0] is None, "flag not cleared for content present on disk"
|
|
1670
|
+
assert db.resolve_kernel("pck00011.tpc")[0] == str(p)
|
|
1671
|
+
|
|
1672
|
+
def test_a_real_upstream_update_keeps_its_supersession(self, db, tmp_path):
|
|
1673
|
+
"""The condition is narrow on purpose: clear only when the superseding
|
|
1674
|
+
content is findable nowhere. A genuine newer version on disk must keep
|
|
1675
|
+
winning, or resolve() could start handing back a real older release."""
|
|
1676
|
+
old = tmp_path / "naif0012.tls"
|
|
1677
|
+
old.write_text("OLD LSK")
|
|
1678
|
+
old_hash = sha256_file(old)
|
|
1679
|
+
db.register_file(old, mission="JUICE")
|
|
1680
|
+
|
|
1681
|
+
old.write_text("NEW LSK") # upstream updated in place
|
|
1682
|
+
db.register_file(old, mission="JUICE")
|
|
1683
|
+
new_hash = sha256_file(old)
|
|
1684
|
+
assert new_hash != old_hash
|
|
1685
|
+
|
|
1686
|
+
# the older content reappears elsewhere and gets registered
|
|
1687
|
+
elsewhere = tmp_path / "copy" / "naif0012.tls"
|
|
1688
|
+
elsewhere.parent.mkdir()
|
|
1689
|
+
elsewhere.write_text("OLD LSK")
|
|
1690
|
+
db.register_file(elsewhere, mission="JUICE")
|
|
1691
|
+
|
|
1692
|
+
row = db.con.execute(
|
|
1693
|
+
"SELECT superseded_by FROM kernels WHERE sha256 = ?", [old_hash]
|
|
1694
|
+
).fetchone()
|
|
1695
|
+
assert row[0] == new_hash, (
|
|
1696
|
+
"supersession cleared even though the newer content is on disk"
|
|
1697
|
+
)
|
|
1698
|
+
assert db.resolve_kernel("naif0012.tls")[0] == str(old)
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{% set version = "0.22.2" %}
|
|
2
|
-
|
|
3
|
-
package:
|
|
4
|
-
name: spice-kernel-db
|
|
5
|
-
version: {{ version }}
|
|
6
|
-
|
|
7
|
-
source:
|
|
8
|
-
url: https://pypi.org/packages/source/s/spice-kernel-db/spice_kernel_db-{{ version }}.tar.gz
|
|
9
|
-
sha256: 6989e401560012f95a767aa77552c57ac531557dbf5cd525e9bfac346c3e1a6d
|
|
10
|
-
|
|
11
|
-
build:
|
|
12
|
-
entry_points:
|
|
13
|
-
- spice-kernel-db = spice_kernel_db.cli:main
|
|
14
|
-
- skd = spice_kernel_db.cli:main
|
|
15
|
-
noarch: python
|
|
16
|
-
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
|
|
17
|
-
number: 0
|
|
18
|
-
|
|
19
|
-
requirements:
|
|
20
|
-
host:
|
|
21
|
-
- python >=3.11
|
|
22
|
-
- hatchling
|
|
23
|
-
- pip
|
|
24
|
-
run:
|
|
25
|
-
- python >=3.11
|
|
26
|
-
- python-duckdb >=1.0
|
|
27
|
-
- requests >=2.31
|
|
28
|
-
- rich >=13.0
|
|
29
|
-
- typer >=0.27
|
|
30
|
-
|
|
31
|
-
test:
|
|
32
|
-
imports:
|
|
33
|
-
- spice_kernel_db
|
|
34
|
-
commands:
|
|
35
|
-
- pip check
|
|
36
|
-
- spice-kernel-db --help
|
|
37
|
-
requires:
|
|
38
|
-
- pip
|
|
39
|
-
- python
|
|
40
|
-
|
|
41
|
-
about:
|
|
42
|
-
home: https://github.com/michaelaye/spice-kernel-db
|
|
43
|
-
summary: Browse, get, and manage SPICE kernels and metakernels across NASA and ESA mission archives
|
|
44
|
-
license: MIT
|
|
45
|
-
license_file: LICENSE
|
|
46
|
-
|
|
47
|
-
extra:
|
|
48
|
-
recipe-maintainers:
|
|
49
|
-
- michaelaye
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|