Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename as per PEP 8 #189

Merged
merged 5 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ Installation:
> pip install --upgrade --editable ".[dev]"
> ```

- Check the module `icesat2_tracks` is available by loading the module:
- Check the module `icesat2waves` is available by loading the module:
```shell
python -c "import icesat2_tracks; print(icesat2_tracks.__version__)"
python -c "import icesat2waves; print(icesat2waves.__version__)"
```

## Command line interface
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
cpaniaguam marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ test = [
# which executes the function `main` from this package when invoked.
[project.scripts] # Optional
#TODO: ADD ANY SCRIPTS WE WANT TO HAVE
load-file = "icesat2_tracks.analysis_db.B01_SL_load_single_file:load_file_app"
make-spectra = "icesat2_tracks.analysis_db.B02_make_spectra_gFT:make_spectra_app"
plot-spectra = "icesat2_tracks.analysis_db.B03_plot_spectra_ov:plot_spectra"
make-iowaga-threads-prior = "icesat2_tracks.analysis_db.A02c_IOWAGA_thredds_prior:make_iowaga_threads_prior_app"
make-b04-angle = "icesat2_tracks.analysis_db.B04_angle:make_b04_angle_app"
define-angle = "icesat2_tracks.analysis_db.B05_define_angle:define_angle_app"
correct-separate = "icesat2_tracks.analysis_db.B06_correct_separate_var:correct_separate_app"
icesat2waves = "icesat2_tracks.app:app"
load-file = "icesat2waves.analysis_db.B01_SL_load_single_file:load_file_app"
make-spectra = "icesat2waves.analysis_db.B02_make_spectra_gFT:make_spectra_app"
plot-spectra = "icesat2waves.analysis_db.B03_plot_spectra_ov:plot_spectra"
make-iowaga-threads-prior = "icesat2waves.analysis_db.A02c_IOWAGA_thredds_prior:make_iowaga_threads_prior_app"
make-b04-angle = "icesat2waves.analysis_db.B04_angle:make_b04_angle_app"
define-angle = "icesat2waves.analysis_db.B05_define_angle:define_angle_app"
correct-separate = "icesat2waves.analysis_db.B06_correct_separate_var:correct_separate_app"
icesat2waves = "icesat2waves.app:app"


# This is configuration specific to the `setuptools` build backend.
Expand All @@ -181,7 +181,7 @@ icesat2waves = "icesat2_tracks.app:app"
# If there are data files included in your packages that need to be
# installed, specify them here.
# TODO: ADD ANY DATA FILES WE WANT TO HAVE
package-data = {"icesat2_tracks" = ["config/*.json"]}
package-data = {"icesat2waves" = ["config/*.json"]}

[tool.setuptools.packages.find]
where = ["src"]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
from siphon.catalog import TDSCatalog
import typer

from icesat2_tracks.config.IceSAT2_startup import mconfig
import icesat2_tracks.ICEsat2_SI_tools.iotools as io
import icesat2_tracks.ICEsat2_SI_tools.wave_tools as waves
import icesat2_tracks.local_modules.m_tools_ph3 as MT
import icesat2_tracks.local_modules.m_general_ph3 as M
from icesat2_tracks.config.IceSAT2_startup import color_schemes
from icesat2_tracks.config.IceSAT2_startup import font_for_print

from icesat2_tracks.clitools import (
from icesat2waves.config.startup import mconfig
import icesat2waves.tools.iotools as io
import icesat2waves.tools.wave_tools as waves
import icesat2waves.local_modules.m_tools_ph3 as MT
import icesat2waves.local_modules.m_general_ph3 as M
from icesat2waves.config.startup import color_schemes
from icesat2waves.config.startup import font_for_print

from icesat2waves.clitools import (
echo,
validate_batch_key,
validate_output_dir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
SettingWithCopyWarning,
) # TODO: remove when warnings are handled

from icesat2_tracks.config.IceSAT2_startup import (
from icesat2waves.config.startup import (
mconfig,
color_schemes,
font_for_pres,
plt,
)
import icesat2_tracks.ICEsat2_SI_tools.sliderule_converter_tools as sct
import icesat2_tracks.ICEsat2_SI_tools.iotools as io
import icesat2_tracks.ICEsat2_SI_tools.beam_stats as beam_stats
import icesat2_tracks.local_modules.m_tools_ph3 as MT
from icesat2_tracks.local_modules import m_general_ph3 as M
import icesat2waves.tools.sliderule_converter_tools as sct
import icesat2waves.tools.iotools as io
import icesat2waves.tools.beam_stats as beam_stats
import icesat2waves.local_modules.m_tools_ph3 as MT
from icesat2waves.local_modules import m_general_ph3 as M

from icesat2_tracks.clitools import (
from icesat2waves.clitools import (
validate_track_name,
validate_batch_key,
validate_output_dir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
from matplotlib import pyplot as plt
import typer

import icesat2_tracks.ICEsat2_SI_tools.generalized_FT as gFT
import icesat2_tracks.ICEsat2_SI_tools.iotools as io
import icesat2_tracks.ICEsat2_SI_tools.spectral_estimates as spec
import icesat2_tracks.local_modules.m_general_ph3 as M
import icesat2_tracks.local_modules.m_spectrum_ph3 as spicke_remover
import icesat2_tracks.local_modules.m_tools_ph3 as MT
from icesat2_tracks.config.IceSAT2_startup import mconfig

from icesat2_tracks.clitools import (
import icesat2waves.tools.generalized_FT as gFT
import icesat2waves.tools.iotools as io
import icesat2waves.tools.spectral_estimates as spec
import icesat2waves.local_modules.m_general_ph3 as M
import icesat2waves.local_modules.m_spectrum_ph3 as spicke_remover
import icesat2waves.local_modules.m_tools_ph3 as MT
from icesat2waves.config.startup import mconfig

from icesat2waves.clitools import (
echo,
validate_batch_key,
validate_output_dir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
from matplotlib.gridspec import GridSpec
import typer

import icesat2_tracks.ICEsat2_SI_tools.iotools as io
import icesat2_tracks.ICEsat2_SI_tools.generalized_FT as gFT
import icesat2_tracks.local_modules.m_tools_ph3 as MT
from icesat2_tracks.local_modules import m_general_ph3 as M
from icesat2_tracks.config.IceSAT2_startup import (
import icesat2waves.tools.iotools as io
import icesat2waves.tools.generalized_FT as gFT
import icesat2waves.local_modules.m_tools_ph3 as MT
from icesat2waves.local_modules import m_general_ph3 as M
from icesat2waves.config.startup import (
mconfig,
color_schemes,
plt,
font_for_print,
)

from icesat2_tracks.clitools import (
from icesat2waves.clitools import (
echo,
validate_batch_key,
validate_output_dir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import itertools

from icesat2_tracks.config.IceSAT2_startup import (
from icesat2waves.config.startup import (
mconfig,
color_schemes,
font_for_print,
Expand All @@ -15,7 +15,7 @@


import h5py
import icesat2_tracks.ICEsat2_SI_tools.iotools as io
import icesat2waves.tools.iotools as io
import xarray as xr
import numpy as np
from scipy.constants import g
Expand All @@ -25,11 +25,11 @@
import matplotlib.pyplot as plt
from numba import jit # maybe for later optimizations? # noqa: F401

from icesat2_tracks.ICEsat2_SI_tools import angle_optimizer
from icesat2waves.tools import angle_optimizer

import icesat2_tracks.local_modules.m_tools_ph3 as MT
import icesat2_tracks.local_modules.m_general_ph3 as M
from icesat2_tracks.ICEsat2_SI_tools import angle_optimizer
import icesat2waves.local_modules.m_tools_ph3 as MT
import icesat2waves.local_modules.m_general_ph3 as M
from icesat2waves.tools import angle_optimizer

import pandas as pd

Expand All @@ -38,7 +38,7 @@

from typer import Option

from icesat2_tracks.clitools import (
from icesat2waves.clitools import (
validate_batch_key,
validate_output_dir,
suppress_stdout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@
from matplotlib import pyplot as plt
from typer import Option

from icesat2_tracks.config.IceSAT2_startup import (
from icesat2waves.config.startup import (
mconfig,
color_schemes,
font_for_print,
)

from icesat2_tracks.ICEsat2_SI_tools.iotools import init_from_input, ID_to_str
import icesat2_tracks.ICEsat2_SI_tools.spectral_estimates as spec
from icesat2waves.tools.iotools import init_from_input, ID_to_str
import icesat2waves.tools.spectral_estimates as spec

import xarray as xr
import numpy as np
import time
import icesat2_tracks.ICEsat2_SI_tools.lanczos as lanczos
import icesat2_tracks.local_modules.m_tools_ph3 as MT
import icesat2_tracks.local_modules.m_general_ph3 as M
import icesat2waves.tools.lanczos as lanczos
import icesat2waves.local_modules.m_tools_ph3 as MT
import icesat2waves.local_modules.m_general_ph3 as M

from matplotlib.gridspec import GridSpec
from scipy.ndimage import label

from icesat2_tracks.clitools import (
from icesat2waves.clitools import (
validate_batch_key,
validate_output_dir,
suppress_stdout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import h5py
from pathlib import Path
import icesat2_tracks.ICEsat2_SI_tools.iotools as io
import icesat2_tracks.local_modules.m_tools_ph3 as MT
from icesat2_tracks.local_modules import m_general_ph3 as M
import icesat2waves.tools.iotools as io
import icesat2waves.local_modules.m_tools_ph3 as MT
from icesat2waves.local_modules import m_general_ph3 as M
import time
import copy
import icesat2_tracks.ICEsat2_SI_tools.generalized_FT as gFT
import icesat2waves.tools.generalized_FT as gFT
import pandas as pd
import xarray as xr
import numpy as np
Expand All @@ -22,7 +22,7 @@
import piecewise_regression
import typer

from icesat2_tracks.config.IceSAT2_startup import (
from icesat2waves.config.startup import (
mconfig,
color_schemes,
font_for_pres,
Expand All @@ -31,7 +31,7 @@
fig_sizes,
)

from icesat2_tracks.clitools import (
from icesat2waves.clitools import (
echo,
validate_batch_key,
validate_output_dir,
Expand Down
16 changes: 8 additions & 8 deletions src/icesat2_tracks/app.py → src/icesat2waves/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
Main CLI for icesat2waves.
"""
from typer import Typer, Option
from icesat2_tracks.analysis_db.B01_SL_load_single_file import (
from icesat2waves.analysis_db.B01_SL_load_single_file import (
run_B01_SL_load_single_file as _loadfile,
)

from icesat2_tracks.analysis_db.B02_make_spectra_gFT import (
from icesat2waves.analysis_db.B02_make_spectra_gFT import (
run_B02_make_spectra_gFT as _makespectra,
)

from icesat2_tracks.analysis_db.B03_plot_spectra_ov import (
from icesat2waves.analysis_db.B03_plot_spectra_ov import (
run_B03_plot_spectra_ov as _plotspectra,
)

from icesat2_tracks.analysis_db.A02c_IOWAGA_thredds_prior import (
from icesat2waves.analysis_db.A02c_IOWAGA_thredds_prior import (
run_A02c_IOWAGA_thredds_prior as _threddsprior,
)


from icesat2_tracks.analysis_db.B04_angle import run_B04_angle as _run_B04_angle
from icesat2waves.analysis_db.B04_angle import run_B04_angle as _run_B04_angle

from icesat2_tracks.analysis_db.B05_define_angle import define_angle as _define_angle
from icesat2waves.analysis_db.B05_define_angle import define_angle as _define_angle

from icesat2_tracks.analysis_db.B06_correct_separate_var import (
from icesat2waves.analysis_db.B06_correct_separate_var import (
run_B06_correct_separate_var as _run_correct_separate_var,
)


from icesat2_tracks.clitools import (
from icesat2waves.clitools import (
validate_track_name,
validate_batch_key,
validate_output_dir,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#%matplotlib inline
from icesat2_tracks.local_modules import m_colormanager_ph3 as M_color
from icesat2waves.local_modules import m_colormanager_ph3 as M_color

mconfig['paths']
path=mconfig['paths']['config']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import matplotlib.pyplot as plt

from icesat2_tracks.local_modules import m_colormanager_ph3 as M_color
from icesat2_tracks.local_modules import m_tools_ph3 as MT
from icesat2waves.local_modules import m_colormanager_ph3 as M_color
from icesat2waves.local_modules import m_tools_ph3 as MT

## Read folders and configuration paths
config_dir_path = os.path.dirname(__file__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from scipy.special import gammainc
from scipy import signal
import matplotlib.pyplot as plt
from icesat2_tracks.local_modules import m_general_ph3 as M
from icesat2waves.local_modules import m_general_ph3 as M

try:
import mkl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import pandas as pd
import icesat2_tracks.ICEsat2_SI_tools.spectral_estimates as spec
import icesat2_tracks.ICEsat2_SI_tools.iotools as io_local
import icesat2waves.tools.spectral_estimates as spec
import icesat2waves.tools.iotools as io_local

import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from scipy.signal import detrend
import lmfit as LM

from icesat2_tracks.ICEsat2_SI_tools import lanczos, spectral_estimates as spec
import icesat2_tracks.local_modules.JONSWAP_gamma as spectal_models
from icesat2waves.tools import lanczos, spectral_estimates as spec
import icesat2waves.local_modules.jonswap_gamma as spectal_models


def rebin(data, dk):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import pandas as pd
import h5py
from sliderule import icesat2
from icesat2_tracks.ICEsat2_SI_tools import sliderule_converter_tools as sct
from icesat2waves.tools import sliderule_converter_tools as sct
import icesat2_toolkit.utilities
import icesat2_tracks.ICEsat2_SI_tools.convert_GPS_time as cGPS
import icesat2waves.tools.convert_GPS_time as cGPS


def init_from_input(arguments):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def create_script(script_name, track_name="SH_20190502_05180312"):
"--verbose",
"--output-dir",
]
base_path = "src/icesat2_tracks/analysis_db/"
base_path = "src/icesat2waves/analysis_db/"
return head + [f"{base_path}{script_name}.py"] + tail


Expand Down