Skip to content

Additional crsd checks#107

Merged
johnstob merged 2 commits intomainfrom
additional-crsd-checks
Feb 12, 2026
Merged

Additional crsd checks#107
johnstob merged 2 commits intomainfrom
additional-crsd-checks

Conversation

@johnstob
Copy link
Contributor

While comparing CRSD v1.0 we noticed some fields that were not being checked and others used outdated nomenclature. This PR is meant to address shortfalls by adding additional CRSD verification checks and associated unit tests.

Test Success

$ pdm run nox
nox > Running session lint
nox > Creating virtual environment (virtualenv) using python in .nox/lint
nox > pdm sync -G dev-lint -G all
INFO: Inside an active virtualenv /home/vscuser/repos/sarkit-remote/.nox/lint, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
Synchronizing working set with resolved packages: 10 to add, 0 to update, 0 to remove

  ✔ Install jbpy 0.5.1 successful
  ✔ Install mypy-extensions 1.1.0 successful
  ✔ Install pathspec 1.0.4 successful
  ✔ Install typing-extensions 4.15.0 successful
  ✔ Install shapely 2.1.2 successful
  ✔ Install librt 0.7.8 successful
  ✔ Install mypy 1.19.1 successful
  ✔ Install lxml 6.0.2 successful
  ✔ Install ruff 0.15.0 successful
  ✔ Install numpy 2.4.2 successful
  ✔ Install sarkit 1.4.1.dev1+gb534bb3 successful

  0:00:15 🎉 All complete! 10/10
nox > ruff check
All checks passed!
nox > ruff format --diff
104 files already formatted
nox > mypy /home/vscuser/repos/sarkit-remote/sarkit
Success: no issues found in 55 source files
nox > Session lint was successful in 31 seconds.
nox > Running session data
nox > Creating virtual environment (virtualenv) using python in .nox/data
nox > pdm sync --prod
INFO: Inside an active virtualenv /home/vscuser/repos/sarkit-remote/.nox/data, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
Synchronizing working set with resolved packages: 4 to add, 0 to update, 0 to remove

  ✔ Install jbpy 0.5.1 successful
  ✔ Install shapely 2.1.2 successful
  ✔ Install lxml 6.0.2 successful
  ✔ Install numpy 2.4.2 successful
  ✔ Install sarkit 1.4.1.dev1+gb534bb3 successful

  0:00:06 🎉 All complete! 4/4
nox > python data/syntax_only/sicd/make_syntax_only_sicd_xmls.py --check
nox > python data/syntax_only/cphd/make_syntax_only_cphd_xmls.py --check
nox > python data/syntax_only/crsd/make_syntax_only_crsd_xmls.py --check
nox > python data/syntax_only/sidd/version1/make_syntax_only_sidd_xmls.py --check
nox > Session data was successful in 12 seconds.
nox > Running session xsdtypes
nox > Creating virtual environment (virtualenv) using python in .nox/xsdtypes
nox > pdm sync -G xsdtypes-generation
INFO: Inside an active virtualenv /home/vscuser/repos/sarkit-remote/.nox/xsdtypes, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
Synchronizing working set with resolved packages: 6 to add, 0 to update, 0 to remove

  ✔ Install jbpy 0.5.1 successful
  ✔ Install xmlschema 4.3.1 successful
  ✔ Install elementpath 5.1.1 successful
  ✔ Install shapely 2.1.2 successful
  ✔ Install lxml 6.0.2 successful
  ✔ Install numpy 2.4.2 successful
  ✔ Install sarkit 1.4.1.dev1+gb534bb3 successful

  0:00:07 🎉 All complete! 6/6
nox > python generate_xsdtypes.py --check
nox > Session xsdtypes was successful in 15 seconds.
nox > Running session test
nox > Creating virtual environment (virtualenv) using python in .nox/test
nox > Session test was successful.
nox > Running session test_core
nox > Creating virtual environment (virtualenv) using python in .nox/test_core
nox > pdm sync
INFO: Inside an active virtualenv /home/vscuser/repos/sarkit-remote/.nox/test_core, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
Synchronizing working set with resolved packages: 62 to add, 0 to update, 0 to remove

  ✔ Install aiohappyeyeballs 2.6.1 successful
  ✔ Install attrs 25.4.0 successful
  ✔ Install aiosignal 1.4.0 successful
  ✔ Install argcomplete 3.6.3 successful
  ✔ Install colorlog 6.10.1 successful
  ✔ Install certifi 2026.1.4 successful
  ✔ Install alabaster 1.0.0 successful
  ✔ Install distlib 0.4.0 successful
  ✔ Install dependency-groups 1.3.1 successful
  ✔ Install filelock 3.20.3 successful
  ✔ Install elementpath 5.1.1 successful
  ✔ Install idna 3.11 successful
  ✔ Install iniconfig 2.3.0 successful
  ✔ Install humanize 4.15.0 successful
  ✔ Install imagesize 1.4.1 successful
  ✔ Install docutils 0.21.2 successful
  ✔ Install jbpy 0.5.1 successful
  ✔ Install jinja2 3.1.6 successful
  ✔ Install charset-normalizer 3.4.4 successful
  ✔ Install babel 2.18.0 successful
  ✔ Install mypy-extensions 1.1.0 successful
  ✔ Install nox 2026.2.9 successful
  ✔ Install frozenlist 1.8.0 successful
  ✔ Install numpydoc 1.10.0 successful
  ✔ Install packaging 26.0 successful
  ✔ Install pathspec 1.0.4 successful
  ✔ Install markupsafe 3.0.3 successful
  ✔ Install platformdirs 4.5.1 successful
  ✔ Install pluggy 1.6.0 successful
  ✔ Install pygments 2.19.2 successful
  ✔ Install pytest 9.0.2 successful
  ✔ Install requests 2.32.5 successful
  ✔ Install roman-numerals 4.1.0 successful
  ✔ Install roman-numerals-py 4.1.0 successful
  ✔ Install librt 0.7.8 successful
  ✔ Install propcache 0.4.1 successful
  ✔ Install mypy 1.19.1 successful
  ✔ Install smart-open 7.5.0 successful
  ✔ Install snowballstemmer 3.0.1 successful
  ✔ Install sphinx 8.2.3 successful
  ✔ Install sphinx-rtd-theme 3.1.0 successful
  ✔ Install sphinxcontrib-applehelp 2.0.0 successful
  ✔ Install sphinxcontrib-autoprogram 0.1.9 successful
  ✔ Install sphinxcontrib-devhelp 2.0.0 successful
  ✔ Install sphinxcontrib-htmlhelp 2.1.0 successful
  ✔ Install sphinxcontrib-jquery 4.1 successful
  ✔ Install shapely 2.1.2 successful
  ✔ Install sphinxcontrib-jsmath 1.0.1 successful
  ✔ Install sphinxcontrib-qthelp 2.0.0 successful
  ✔ Install sphinxcontrib-serializinghtml 2.0.0 successful
  ✔ Install typing-extensions 4.15.0 successful
  ✔ Install urllib3 2.6.3 successful
  ✔ Install lxml 6.0.2 successful
  ✔ Install xmlschema 4.3.1 successful
  ✔ Install virtualenv 20.36.1 successful
  ✔ Install multidict 6.7.1 successful
  ✔ Install numpy 2.4.2 successful
  ✔ Install wrapt 2.1.1 successful
  ✔ Install scipy 1.17.0 successful
  ✔ Install yarl 1.22.0 successful
  ✔ Install aiohttp 3.13.3 successful
  ✔ Install ruff 0.15.0 successful
  ✔ Install sarkit 1.4.1.dev1+gb534bb3 successful

  0:00:50 🎉 All complete! 62/62
nox > pytest tests/core tests/verification
======================================================== test session starts =========================================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/vscuser/repos/sarkit-remote
configfile: pyproject.toml
collected 1307 items                                                                                                                 

tests/core/cphd/test_cphdinfo.py .....                                                                                         [  0%]
tests/core/cphd/test_io.py ..............................................................................................      [  7%]
tests/core/cphd/test_refgeom.py ..                                                                                             [  7%]
tests/core/cphd/test_xml.py ......                                                                                             [  8%]
tests/core/crsd/test_computations.py ......                                                                                    [  8%]
tests/core/crsd/test_crsdinfo.py .....                                                                                         [  9%]
tests/core/crsd/test_io.py .........                                                                                           [  9%]
tests/core/crsd/test_xml.py .......                                                                                            [ 10%]
tests/core/sicd/test_errorprop.py ....                                                                                         [ 10%]
tests/core/sicd/test_io.py ............                                                                                        [ 11%]
tests/core/sicd/test_projection.py ..................x....................................                                     [ 15%]
tests/core/sicd/test_sicd_projections.py ........x                                                                             [ 16%]
tests/core/sicd/test_sicdinfo.py .....                                                                                         [ 16%]
tests/core/sicd/test_xml.py ....................                                                                               [ 18%]
tests/core/sidd/test_calculations.py ........                                                                                  [ 18%]
tests/core/sidd/test_io.py ................                                                                                    [ 20%]
tests/core/sidd/test_siddinfo.py ......                                                                                        [ 20%]
tests/core/sidd/test_xml.py ...............................                                                                    [ 22%]
tests/core/test_dependencies.py .                                                                                              [ 23%]
tests/core/test_iohelp.py ..                                                                                                   [ 23%]
tests/core/test_wgs84.py ......                                                                                                [ 23%]
tests/core/xmlhelp/test_core.py ..                                                                                             [ 23%]
tests/core/xmlhelp/test_transcoders.py ....................                                                                    [ 25%]
tests/verification/test_cli.py ....                                                                                            [ 25%]
tests/verification/test_consistency.py ..........                                                                              [ 26%]
tests/verification/test_cphd_consistency.py .................................................................................. [ 32%]
......................................................                                                                         [ 36%]
tests/verification/test_crsd_consistency.py .................................................................................. [ 43%]
......................................................................................................ssss.................... [ 52%]
..................ss........................sssssssssssssssssssssssssssss.............sssss......ss.ss.ss......ssss........... [ 62%]
.....ss...........ssss....ssssssssssssssssssssssssssssssssssssss.............................................................. [ 71%]
..ssss...........ss.ss.ss..ssss.....ss............s........................................................................... [ 81%]
.........                                                                                                                      [ 82%]
tests/verification/test_sicd_consistency.py .................................................................................. [ 88%]
...............................................................................................................                [ 97%]
tests/verification/test_sidd_consistency.py ......................................                                             [100%]

========================================================== warnings summary ==========================================================
tests/verification/test_sicd_consistency.py::test_smoketest[xml_file4]
  /home/vscuser/repos/sarkit-remote/sarkit/verification/_sicd_consistency.py:29: RuntimeWarning: invalid value encountered in divide
    return vec / np.linalg.norm(vec, axis=axis, keepdims=True)

tests/verification/test_sicd_consistency.py::test_smoketest[xml_file6]
  /home/vscuser/repos/sarkit-remote/sarkit/sicd/_xml.py:455: RuntimeWarning: invalid value encountered in arccos
    dca_xmt = np.arccos(-rdot_xmt_scp / vxmt_m)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ 1194 passed, 111 skipped, 2 xfailed, 2 warnings in 90.15s (0:01:30) =================================
nox > Session test_core was successful in 2 minutes.
nox > Running session test_core_dependencies
nox > Creating virtual environment (virtualenv) using python in .nox/test_core_dependencies
nox > pdm sync --prod
INFO: Inside an active virtualenv /home/vscuser/repos/sarkit-remote/.nox/test_core_dependencies, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
Synchronizing working set with resolved packages: 4 to add, 0 to update, 0 to remove

  ✔ Install jbpy 0.5.1 successful
  ✔ Install shapely 2.1.2 successful
  ✔ Install lxml 6.0.2 successful
  ✔ Install numpy 2.4.2 successful
  ✔ Install sarkit 1.4.1.dev1+gb534bb3 successful

  0:00:06 🎉 All complete! 4/4
nox > python tests/core/test_dependencies.py
.
----------------------------------------------------------------------
Ran 1 test in 0.569s

OK
nox > Session test_core_dependencies was successful in 11 seconds.
nox > Ran 6 sessions in 4 minutes:
nox > * lint: success, took 31 seconds
nox > * data: success, took 12 seconds
nox > * xsdtypes: success, took 15 seconds
nox > * test: success
nox > * test_core: success, took 2 minutes
nox > * test_core_dependencies: success, took 11 seconds

Copy link
Contributor

@pressler-vsc pressler-vsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice finds; thanks!

@johnstob johnstob merged commit a72d89d into main Feb 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants