Skip to content

Conversation

@denvir-py
Copy link
Collaborator

@denvir-py denvir-py commented Sep 9, 2025

The file limit on llnl-ssapy has been increased to 500 MiB (pypi/support#7292), meaning we are able to host all data files on PyPi and not have to create a workaround.

This MR made the following changes:

  • MANIFEST.in: recursively include /data
  • pyproject.toml: include /data as package-data
  • setup.py: include /data as package_data
  • CHANGELOG: add previous tagged versions
  • init.py: add back original datadir import

The data_utils.py files and related tests have been deleted.

The testpypi version is uploaded here: https://test.pypi.org/project/llnl-ssapy/

This version has been successfully imported and tested with the following code:

from ssapy import (
    SciPyPropagator,
    get_body,
    AccelKepler,
    AccelEarthRad,
    AccelThirdBody,
    AccelHarmonic,
    AccelSolRad,
    AccelConstNTW,
    rv,
    Orbit,
    AccelSum
)
 
from ssapy.constants import LD, RGEO, EARTH_MU,EARTH_RADIUS
from ssapy.compute import calc_M_v, calculate_orbital_elements
import numpy as np
import random
 
base_accel = (
    AccelKepler()
    + AccelThirdBody(get_body("Moon"))
    + AccelHarmonic(get_body("Earth"))
    + AccelHarmonic(get_body("Moon"))
    + AccelEarthRad()
    + AccelSolRad()
)
 
a = random.uniform(RGEO, 2 * LD)
e = random.uniform(0, 1)
i = random.uniform(0, np.pi / 2)
pa = random.uniform(0, 2 * np.pi)
raan = random.uniform(0, 2 * np.pi)
trueAnomaly = random.uniform(0, 2 * np.pi)
 
orbit_init = Orbit.fromKeplerianElements(*[a, e, i, pa, raan, trueAnomaly], t=137489562, propkw=dict(mass=250, area=0.22, CD=2.3, CR=1.3)) 
r_init, v_init = rv(orbit_init, np.arange(137489562,137489662, 1), propagator=SciPyPropagator(base_accel))

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.12%. Comparing base (9835bc4) to head (2dc2ca0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   64.13%   64.12%   -0.01%     
==========================================
  Files          19       18       -1     
  Lines        7028     6973      -55     
==========================================
- Hits         4507     4471      -36     
+ Misses       2521     2502      -19     
Flag Coverage Δ
unittests 64.12% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ssapy/__init__.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SuperdoerTrav
Copy link
Collaborator

The modifications to enable hosting data directly on PyPI are well-implemented and will greatly simplify package distribution by removing the need for previous workarounds. The adjustments to MANIFEST.in, pyproject.toml, and setup.py ensure consistent inclusion of data files, and the removal of the redundant data_utils.py files and related tests is appropriate.

@SuperdoerTrav SuperdoerTrav merged commit 7116956 into llnl:main Sep 9, 2025
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