Skip to content

Commit

Permalink
Moved lanl, maven, mica to projects
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswilburlewis committed Aug 24, 2024
1 parent bc2a865 commit daf86b8
Show file tree
Hide file tree
Showing 50 changed files with 29 additions and 28 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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`
Expand Down
9 changes: 5 additions & 4 deletions pyspedas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyspedas/lanl/mpa.py → pyspedas/projects/lanl/mpa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyspedas.lanl.load import load
from .load import load

# This routine was originally in lanl/__init__.py.
def mpa(
Expand Down
2 changes: 1 addition & 1 deletion pyspedas/lanl/spa.py → pyspedas/projects/lanl/spa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyspedas.lanl.load import load
from .load import load

# This routine was originally in lanl/__init__.py.
def spa(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyspedas/maven/kp.py → pyspedas/projects/maven/kp.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyspedas/maven/mag.py → pyspedas/projects/maven/mag.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyspedas/maven/sep.py → pyspedas/projects/maven/sep.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyspedas/maven/sta.py → pyspedas/projects/maven/sta.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pyspedas/maven/swea.py → pyspedas/projects/maven/swea.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pyspedas/maven/swia.py → pyspedas/projects/maven/swia.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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()
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand All @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pyspedas/utilities/tests/plot_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand Down

0 comments on commit daf86b8

Please sign in to comment.