Skip to content

Commit

Permalink
allow modification dependent packages
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Dec 7, 2024
1 parent fbdd7f2 commit 9cafacf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions py/rvspecfit/desi/desi_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class GlobalConfig:
model_prefix = 'rvmod'


DEPEND_PACKAGES = [
'numpy', 'astropy', 'matplotlib', 'rvspecfit', 'pandas', 'scipy', 'yaml',
'numdifftools', 'h5py', 'torch', 'cffi', 'desitarget'
]

bitmasks = {
'CHISQ_WARN': 1, # delta chi-square vs continuum is too larger
'RV_WARN': 2, # rv is to close to the edge
Expand Down Expand Up @@ -71,13 +76,9 @@ def get_dep_versions():
"""
Get Packages versions
"""
packages = [
'numpy', 'astropy', 'matplotlib', 'rvspecfit', 'pandas', 'scipy',
'yaml', 'numdifftools', 'h5py', 'torch', 'cffi'
]
# Ideally you need to check that the list here matches the requirements.txt
ret = {}
for curp in packages:
for curp in DEPEND_PACKAGES:
try:
ret[curp] = importlib.import_module(curp).__version__
except ImportError: # this should not really be happening
Expand Down

0 comments on commit 9cafacf

Please sign in to comment.