diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index affe7dc5..05d0f34b 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -151,7 +151,7 @@ jobs: echo Starting MTH5 load_fdsn test at `date` coverage run -a -m pyspedas.mth5.tests.test_load_fdsn echo Starting maven tests at `date` - coverage run -a -m pyspedas.maven.tests.tests + coverage run -a -m pyspedas.projects.maven.tests.tests echo Starting cluster tests at `date` coverage run -a -m pyspedas.projects.cluster.tests.tests #echo Starting akebono tests at `date` @@ -179,7 +179,7 @@ jobs: echo Starting st5 tests at `date` coverage run -a -m pyspedas.st5.tests.tests echo Starting lanl tests at `date` - coverage run -a -m pyspedas.lanl.tests.tests + coverage run -a -m pyspedas.projects.lanl.tests.tests echo Starting cotrans quaternion tests at `date` coverage run -a -m pyspedas.cotrans.tests.quaternions echo Starting cnofs tests at `date` @@ -292,7 +292,7 @@ jobs: echo Starting goes tests at `date` coverage run -a -m pyspedas.projects.goes.tests.tests echo Starting mica tests at `date` - coverage run -a -m pyspedas.mica.tests.tests + coverage run -a -m pyspedas.projects.mica.tests.tests echo Starting ulysses tests at `date` coverage run -a -m pyspedas.ulysses.tests.tests echo Starting solo tests at `date` diff --git a/pyspedas/__init__.py b/pyspedas/__init__.py index 723ca098..3a345c2a 100644 --- a/pyspedas/__init__.py +++ b/pyspedas/__init__.py @@ -77,7 +77,6 @@ from .mms.plots.mms_overview_plot import mms_overview_plot from .mms.particles.mms_part_getspec import mms_part_getspec from .mms.particles.mms_part_slice2d import mms_part_slice2d -from .maven import maven_load from .noaa import noaa_load_kp # Make mission-specific namespaces available under pyspedas @@ -100,9 +99,11 @@ # for backward compatibility from .projects.kompsat.load import load as kompsat_load from .projects import kyoto -from . import lanl -from . import maven -from . import mica +from .projects import lanl +from .projects import maven +# for backward compatibility +from .projects.maven import maven_load +from .projects import mica from . import omni from . import poes from . import polar diff --git a/pyspedas/lanl/README.md b/pyspedas/projects/lanl/README.md similarity index 100% rename from pyspedas/lanl/README.md rename to pyspedas/projects/lanl/README.md diff --git a/pyspedas/lanl/__init__.py b/pyspedas/projects/lanl/__init__.py similarity index 100% rename from pyspedas/lanl/__init__.py rename to pyspedas/projects/lanl/__init__.py diff --git a/pyspedas/lanl/config.py b/pyspedas/projects/lanl/config.py similarity index 100% rename from pyspedas/lanl/config.py rename to pyspedas/projects/lanl/config.py diff --git a/pyspedas/lanl/datasets.py b/pyspedas/projects/lanl/datasets.py similarity index 100% rename from pyspedas/lanl/datasets.py rename to pyspedas/projects/lanl/datasets.py diff --git a/pyspedas/lanl/load.py b/pyspedas/projects/lanl/load.py similarity index 100% rename from pyspedas/lanl/load.py rename to pyspedas/projects/lanl/load.py diff --git a/pyspedas/lanl/mpa.py b/pyspedas/projects/lanl/mpa.py similarity index 98% rename from pyspedas/lanl/mpa.py rename to pyspedas/projects/lanl/mpa.py index 613ed973..fa703d2f 100644 --- a/pyspedas/lanl/mpa.py +++ b/pyspedas/projects/lanl/mpa.py @@ -1,4 +1,4 @@ -from pyspedas.lanl.load import load +from .load import load # This routine was originally in lanl/__init__.py. def mpa( diff --git a/pyspedas/lanl/spa.py b/pyspedas/projects/lanl/spa.py similarity index 98% rename from pyspedas/lanl/spa.py rename to pyspedas/projects/lanl/spa.py index 4c67f1e0..3b8aba75 100644 --- a/pyspedas/lanl/spa.py +++ b/pyspedas/projects/lanl/spa.py @@ -1,4 +1,4 @@ -from pyspedas.lanl.load import load +from .load import load # This routine was originally in lanl/__init__.py. def spa( diff --git a/pyspedas/lanl/tests/__init__.py b/pyspedas/projects/lanl/tests/__init__.py similarity index 100% rename from pyspedas/lanl/tests/__init__.py rename to pyspedas/projects/lanl/tests/__init__.py diff --git a/pyspedas/lanl/tests/tests.py b/pyspedas/projects/lanl/tests/tests.py similarity index 100% rename from pyspedas/lanl/tests/tests.py rename to pyspedas/projects/lanl/tests/tests.py diff --git a/pyspedas/maven/README.md b/pyspedas/projects/maven/README.md similarity index 100% rename from pyspedas/maven/README.md rename to pyspedas/projects/maven/README.md diff --git a/pyspedas/maven/__init__.py b/pyspedas/projects/maven/__init__.py similarity index 85% rename from pyspedas/maven/__init__.py rename to pyspedas/projects/maven/__init__.py index 56c630c8..9197dd55 100644 --- a/pyspedas/maven/__init__.py +++ b/pyspedas/projects/maven/__init__.py @@ -1,4 +1,4 @@ -import pyspedas.maven.spdf as spdf_load +import pyspedas.projects.maven.spdf as spdf_load from .maven_load import load_data maven_load = load_data from .euv import euv diff --git a/pyspedas/maven/access.txt b/pyspedas/projects/maven/access.txt similarity index 100% rename from pyspedas/maven/access.txt rename to pyspedas/projects/maven/access.txt diff --git a/pyspedas/maven/config.py b/pyspedas/projects/maven/config.py similarity index 100% rename from pyspedas/maven/config.py rename to pyspedas/projects/maven/config.py diff --git a/pyspedas/maven/download_files_utilities.py b/pyspedas/projects/maven/download_files_utilities.py similarity index 100% rename from pyspedas/maven/download_files_utilities.py rename to pyspedas/projects/maven/download_files_utilities.py diff --git a/pyspedas/maven/euv.py b/pyspedas/projects/maven/euv.py similarity index 100% rename from pyspedas/maven/euv.py rename to pyspedas/projects/maven/euv.py diff --git a/pyspedas/maven/file_regex.py b/pyspedas/projects/maven/file_regex.py similarity index 100% rename from pyspedas/maven/file_regex.py rename to pyspedas/projects/maven/file_regex.py diff --git a/pyspedas/maven/interp_utilities.py b/pyspedas/projects/maven/interp_utilities.py similarity index 100% rename from pyspedas/maven/interp_utilities.py rename to pyspedas/projects/maven/interp_utilities.py diff --git a/pyspedas/maven/iuv.py b/pyspedas/projects/maven/iuv.py similarity index 100% rename from pyspedas/maven/iuv.py rename to pyspedas/projects/maven/iuv.py diff --git a/pyspedas/maven/kp.py b/pyspedas/projects/maven/kp.py similarity index 98% rename from pyspedas/maven/kp.py rename to pyspedas/projects/maven/kp.py index 95b36026..007529c1 100644 --- a/pyspedas/maven/kp.py +++ b/pyspedas/projects/maven/kp.py @@ -1,5 +1,5 @@ from .maven_load import load_data -import pyspedas.maven.spdf as spdf_load +import pyspedas.projects.maven.spdf as spdf_load # This routine was originally in maven/__init__.py, until being moved to its own file. # Please refer to __init__.py if you need to see the revision history before it was moved. diff --git a/pyspedas/maven/kp_utilities.py b/pyspedas/projects/maven/kp_utilities.py similarity index 100% rename from pyspedas/maven/kp_utilities.py rename to pyspedas/projects/maven/kp_utilities.py diff --git a/pyspedas/maven/list_utilities.py b/pyspedas/projects/maven/list_utilities.py similarity index 100% rename from pyspedas/maven/list_utilities.py rename to pyspedas/projects/maven/list_utilities.py diff --git a/pyspedas/maven/lpw.py b/pyspedas/projects/maven/lpw.py similarity index 100% rename from pyspedas/maven/lpw.py rename to pyspedas/projects/maven/lpw.py diff --git a/pyspedas/maven/mag.py b/pyspedas/projects/maven/mag.py similarity index 98% rename from pyspedas/maven/mag.py rename to pyspedas/projects/maven/mag.py index ba2fdfe4..d6d3a3c5 100644 --- a/pyspedas/maven/mag.py +++ b/pyspedas/projects/maven/mag.py @@ -1,5 +1,5 @@ from .maven_load import load_data -import pyspedas.maven.spdf as spdf_load +import pyspedas.projects.maven.spdf as spdf_load # This routine was originally in maven/__init__.py, until being moved to its own file. # Please refer to __init__.py if you need to see the revision history before it was moved. diff --git a/pyspedas/maven/maven_kp_to_tplot.py b/pyspedas/projects/maven/maven_kp_to_tplot.py similarity index 100% rename from pyspedas/maven/maven_kp_to_tplot.py rename to pyspedas/projects/maven/maven_kp_to_tplot.py diff --git a/pyspedas/maven/maven_load.py b/pyspedas/projects/maven/maven_load.py similarity index 100% rename from pyspedas/maven/maven_load.py rename to pyspedas/projects/maven/maven_load.py diff --git a/pyspedas/maven/ngi.py b/pyspedas/projects/maven/ngi.py similarity index 100% rename from pyspedas/maven/ngi.py rename to pyspedas/projects/maven/ngi.py diff --git a/pyspedas/maven/orbit_time.py b/pyspedas/projects/maven/orbit_time.py similarity index 100% rename from pyspedas/maven/orbit_time.py rename to pyspedas/projects/maven/orbit_time.py diff --git a/pyspedas/maven/read_iuvs_file.py b/pyspedas/projects/maven/read_iuvs_file.py similarity index 100% rename from pyspedas/maven/read_iuvs_file.py rename to pyspedas/projects/maven/read_iuvs_file.py diff --git a/pyspedas/maven/read_iuvs_file_unused_modes.py b/pyspedas/projects/maven/read_iuvs_file_unused_modes.py similarity index 100% rename from pyspedas/maven/read_iuvs_file_unused_modes.py rename to pyspedas/projects/maven/read_iuvs_file_unused_modes.py diff --git a/pyspedas/maven/rse.py b/pyspedas/projects/maven/rse.py similarity index 100% rename from pyspedas/maven/rse.py rename to pyspedas/projects/maven/rse.py diff --git a/pyspedas/maven/sep.py b/pyspedas/projects/maven/sep.py similarity index 98% rename from pyspedas/maven/sep.py rename to pyspedas/projects/maven/sep.py index dc35bdaa..798fc02d 100644 --- a/pyspedas/maven/sep.py +++ b/pyspedas/projects/maven/sep.py @@ -1,5 +1,5 @@ from .maven_load import load_data -import pyspedas.maven.spdf as spdf_load +import pyspedas.projects.maven.spdf as spdf_load # This routine was originally in maven/__init__.py, until being moved to its own file. # Please refer to __init__.py if you need to see the revision history before it was moved. diff --git a/pyspedas/maven/spdf/README.md b/pyspedas/projects/maven/spdf/README.md similarity index 100% rename from pyspedas/maven/spdf/README.md rename to pyspedas/projects/maven/spdf/README.md diff --git a/pyspedas/maven/spdf/__init__.py b/pyspedas/projects/maven/spdf/__init__.py similarity index 100% rename from pyspedas/maven/spdf/__init__.py rename to pyspedas/projects/maven/spdf/__init__.py diff --git a/pyspedas/maven/spdf/config.py b/pyspedas/projects/maven/spdf/config.py similarity index 100% rename from pyspedas/maven/spdf/config.py rename to pyspedas/projects/maven/spdf/config.py diff --git a/pyspedas/maven/spdf/load.py b/pyspedas/projects/maven/spdf/load.py similarity index 100% rename from pyspedas/maven/spdf/load.py rename to pyspedas/projects/maven/spdf/load.py diff --git a/pyspedas/maven/sta.py b/pyspedas/projects/maven/sta.py similarity index 98% rename from pyspedas/maven/sta.py rename to pyspedas/projects/maven/sta.py index 10521699..3c12ab74 100644 --- a/pyspedas/maven/sta.py +++ b/pyspedas/projects/maven/sta.py @@ -1,5 +1,5 @@ from .maven_load import load_data -import pyspedas.maven.spdf as spdf_load +import pyspedas.projects.maven.spdf as spdf_load # This routine was originally in maven/__init__.py, until being moved to its own file. # Please refer to __init__.py if you need to see the revision history before it was moved. diff --git a/pyspedas/maven/swea.py b/pyspedas/projects/maven/swea.py similarity index 98% rename from pyspedas/maven/swea.py rename to pyspedas/projects/maven/swea.py index aa8cb8f4..2c804793 100644 --- a/pyspedas/maven/swea.py +++ b/pyspedas/projects/maven/swea.py @@ -1,5 +1,5 @@ from .maven_load import load_data -import pyspedas.maven.spdf as spdf_load +import pyspedas.projects.maven.spdf as spdf_load # This routine was originally in maven/__init__.py, until being moved to its own file. # Please refer to __init__.py if you need to see the revision history before it was moved. diff --git a/pyspedas/maven/swia.py b/pyspedas/projects/maven/swia.py similarity index 98% rename from pyspedas/maven/swia.py rename to pyspedas/projects/maven/swia.py index 5446d2ba..d2c6812d 100644 --- a/pyspedas/maven/swia.py +++ b/pyspedas/projects/maven/swia.py @@ -1,5 +1,5 @@ from .maven_load import load_data -import pyspedas.maven.spdf as spdf_load +import pyspedas.projects.maven.spdf as spdf_load # This routine was originally in maven/__init__.py, until being moved to its own file. # Please refer to __init__.py if you need to see the revision history before it was moved. diff --git a/pyspedas/maven/tests/__init__.py b/pyspedas/projects/maven/tests/__init__.py similarity index 100% rename from pyspedas/maven/tests/__init__.py rename to pyspedas/projects/maven/tests/__init__.py diff --git a/pyspedas/maven/tests/tests.py b/pyspedas/projects/maven/tests/tests.py similarity index 95% rename from pyspedas/maven/tests/tests.py rename to pyspedas/projects/maven/tests/tests.py index 611c9a06..21678d9f 100644 --- a/pyspedas/maven/tests/tests.py +++ b/pyspedas/projects/maven/tests/tests.py @@ -2,12 +2,12 @@ import unittest from pytplot import data_exists, tplot_names, del_data from pyspedas import maven -from pyspedas.maven.download_files_utilities import get_orbit_files, merge_orbit_files, get_file_from_site -from pyspedas.maven.maven_kp_to_tplot import maven_kp_to_tplot -from pyspedas.maven.utilities import get_latest_iuvs_files_from_date_range +from pyspedas.projects.maven.download_files_utilities import get_orbit_files, merge_orbit_files, get_file_from_site +from pyspedas.projects.maven.maven_kp_to_tplot import maven_kp_to_tplot +from pyspedas.projects.maven.utilities import get_latest_iuvs_files_from_date_range import time import collections -from pyspedas.maven.config import CONFIG +from pyspedas.projects.maven.config import CONFIG from datetime import datetime # We need sleep time to avoid "HTTP Error 429: Too Many Requests" @@ -32,7 +32,7 @@ def get_kp_dict(): class OrbitTestCases(unittest.TestCase): def test_get_merge_orbit_files(self): - from pyspedas.maven.config import CONFIG + from pyspedas.projects.maven.config import CONFIG get_orbit_files() merge_orbit_files() @@ -91,7 +91,7 @@ def test_load_kp_iuvs_corona_data(self): time.sleep(sleep_time) def test_kp_param_errors(self): - from pyspedas.maven.kp_utilities import param_list, param_range, range_select + from pyspedas.projects.maven.kp_utilities import param_list, param_range, range_select # bad value in kp dict kp = {} kp["foo"] = "bar" @@ -124,13 +124,13 @@ def test_kp_param_errors(self): i = len(log.output) def test_kp_utilities(self): - from pyspedas.maven.kp_utilities import ( + from pyspedas.projects.maven.kp_utilities import ( param_list, param_range, range_select, get_inst_obs_labels, ) - from pyspedas.maven.kp_utilities import find_param_from_index + from pyspedas.projects.maven.kp_utilities import find_param_from_index kp = get_kp_dict() self.assertTrue(type(kp) is collections.OrderedDict) @@ -306,7 +306,7 @@ def test_get_file_from_site_private(self): pass def test_load_mag_data(self): - from pyspedas.maven.utilities import get_l2_files_from_date + from pyspedas.projects.maven.utilities import get_l2_files_from_date del_data("*") data = maven.mag(datatype="ss1s") @@ -317,7 +317,7 @@ def test_load_mag_data(self): time.sleep(sleep_time) def test_load_mag_data_private(self): - from pyspedas.maven.utilities import get_l2_files_from_date + from pyspedas.projects.maven.utilities import get_l2_files_from_date del_data("*") # We don't have credentials to the private site yet, so this is expected to fail diff --git a/pyspedas/maven/utilities.py b/pyspedas/projects/maven/utilities.py similarity index 100% rename from pyspedas/maven/utilities.py rename to pyspedas/projects/maven/utilities.py diff --git a/pyspedas/mica/README.md b/pyspedas/projects/mica/README.md similarity index 100% rename from pyspedas/mica/README.md rename to pyspedas/projects/mica/README.md diff --git a/pyspedas/mica/__init__.py b/pyspedas/projects/mica/__init__.py similarity index 100% rename from pyspedas/mica/__init__.py rename to pyspedas/projects/mica/__init__.py diff --git a/pyspedas/mica/config.py b/pyspedas/projects/mica/config.py similarity index 100% rename from pyspedas/mica/config.py rename to pyspedas/projects/mica/config.py diff --git a/pyspedas/mica/load.py b/pyspedas/projects/mica/load.py similarity index 100% rename from pyspedas/mica/load.py rename to pyspedas/projects/mica/load.py diff --git a/pyspedas/mica/tests/__init__.py b/pyspedas/projects/mica/tests/__init__.py similarity index 100% rename from pyspedas/mica/tests/__init__.py rename to pyspedas/projects/mica/tests/__init__.py diff --git a/pyspedas/mica/tests/tests.py b/pyspedas/projects/mica/tests/tests.py similarity index 100% rename from pyspedas/mica/tests/tests.py rename to pyspedas/projects/mica/tests/tests.py diff --git a/pyspedas/utilities/tests/plot_tests.py b/pyspedas/utilities/tests/plot_tests.py index ee86b2e5..6616efd7 100644 --- a/pyspedas/utilities/tests/plot_tests.py +++ b/pyspedas/utilities/tests/plot_tests.py @@ -238,7 +238,7 @@ def test_erg_specplot(self): def test_maven_specplot(self): del_data("*") - from pyspedas.maven.spdf import load + from pyspedas.projects.maven.spdf import load sta_vars = load(trange=['2020-12-30', '2020-12-31'], instrument='static', datatype='c0-64e2m') print(sta_vars) timespan('2020-12-30',1,'days') @@ -251,7 +251,7 @@ def test_maven_specplot(self): #@unittest.skip(reason="Failing until we establish a default for spec_dim_to_plot") def test_maven_fluxes_specplot(self): del_data("*") - from pyspedas.maven.spdf import load + from pyspedas.projects.maven.spdf import load swe_vars = load(trange=['2014-10-18', '2014-10-19'], instrument='swea') print(swe_vars) timespan('2014-10-18',1,'days')