Skip to content

Commit

Permalink
Merge pull request #189 from brown-ccv/30-rename-icesat2_si_tools-folder
Browse files Browse the repository at this point in the history
chore: rename as per PEP 8
  • Loading branch information
cpaniaguam authored Mar 11, 2024
2 parents fb6fec5 + 40d9116 commit c9ee0f3
Show file tree
Hide file tree
Showing 41 changed files with 91 additions and 92 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Prerequisites:
- A POSIX-compatible system (Linux or macOS)
- Python 3.9 (run `python --version` to check that your version of python is correct)
- Python 3.10 (run `python --version` to check that your version of python is correct)
- MPI (e.g. from `brew install open-mpi` on macOS)
- HDF5 (e.g. from `brew install hdf5` on macOS)

Expand Down 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
33 changes: 16 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# There are some restrictions on what makes a valid project name
# specification here:
# https://packaging.python.org/specifications/core-metadata/#name
name = "icesat2-tracks" # Required
name = "icesat2waves" # Required

# Versions should comply with PEP 440:
# https://www.python.org/dev/peps/pep-0440/
Expand Down Expand Up @@ -39,7 +39,7 @@ readme = "README.md" # Optional
# 'Programming Language' classifiers above, 'pip install' will check this
# and refuse to install the project if the version does not match. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
requires-python = ">=3.9"
requires-python = ">=3.10"

# This is either text indicating the license for the distribution, or a file
# that contains the license
Expand Down Expand Up @@ -92,7 +92,6 @@ classifiers = [ # Optional
# Specify the Python versions you support here. In particular, ensure
# that you indicate you support Python 3. These classifiers are *not*
# checked by "pip install". See instead "python_requires" below.
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
Expand Down Expand Up @@ -140,7 +139,7 @@ dependencies = [ # Optional
dev = [
"check-manifest",
"black",
"icesat2-tracks[test]"
"icesat2waves[test]"
]
test = [
"coverage",
Expand All @@ -159,22 +158,22 @@ test = [
# maintainers, and where to support the project financially. The key is
# what's used to render the link text on PyPI.
[project.urls] # Optional
"Homepage" = "https://github.com/brown-ccv/icesat2-tracks"
"Bug Reports" = "https://github.com/brown-ccv/icesat2-tracks/issues"
"Source" = "https://github.com/brown-ccv/icesat2-tracks"
"Homepage" = "https://github.com/brown-ccv/icesat2waves"
"Bug Reports" = "https://github.com/brown-ccv/icesat2waves/issues"
"Source" = "https://github.com/brown-ccv/icesat2waves"

# The following would provide a command line executable called `sample`
# 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 @@ -183,7 +182,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 All @@ -196,4 +195,4 @@ where = ["src"]
requires = ["setuptools>=43.0.0", "setuptools_scm>=8", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
[tool.setuptools_scm]
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
File renamed without changes.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c9ee0f3

Please sign in to comment.