From 8adf818901a4d078a12f6a62012688611f8ca00c Mon Sep 17 00:00:00 2001 From: Carlos Paniagua Date: Thu, 7 Mar 2024 20:27:10 +0000 Subject: [PATCH 1/4] chore: rename as per PEP 8 --- README.md | 4 ++-- pyproject.toml | 18 +++++++++--------- .../__init__.py | 0 .../analysis_db/A02c_IOWAGA_thredds_prior.py | 18 +++++++++--------- .../analysis_db/B01_SL_load_single_file.py | 14 +++++++------- .../analysis_db/B02_make_spectra_gFT.py | 18 +++++++++--------- .../analysis_db/B03_plot_spectra_ov.py | 12 ++++++------ .../analysis_db/B04_angle.py | 14 +++++++------- .../analysis_db/B05_define_angle.py | 14 +++++++------- .../analysis_db/B06_correct_separate_var.py | 12 ++++++------ .../analysis_db/__init__.py | 0 src/{icesat2_tracks => icesat2waves}/app.py | 16 ++++++++-------- .../clitools.py | 0 .../config/__init__.py | 0 .../config/color_def.ai | 0 .../config/color_def.ase | Bin .../config/color_def.json | 0 .../config/config.json | 0 .../config/generate_colors.py | 2 +- .../config/startup.py} | 4 ++-- .../local_modules/__init__.py | 0 .../local_modules/jonswap_gamma.py} | 0 .../local_modules/m_colormanager_ph3.py | 0 .../local_modules/m_general_ph3.py | 0 .../local_modules/m_spectrum_ph3.py | 2 +- .../local_modules/m_tools_ph3.py | 0 .../tools}/__init__.py | 0 .../tools}/angle_optimizer.py | 0 .../tools}/beam_stats.py | 4 ++-- .../tools}/convert_GPS_time.py | 0 .../tools}/convert_julian.py | 0 .../tools}/filter_regrid.py | 0 .../tools}/generalized_FT.py | 4 ++-- .../tools}/iotools.py | 4 ++-- .../tools}/lanczos.py | 0 .../tools}/read_ground_tracks.py | 0 .../tools}/sliderule_converter_tools.py | 0 .../tools}/spectral_estimates.py | 0 .../tools}/spicke_remover.py | 0 .../tools}/wave_tools.py | 0 tests/test_steps.py | 2 +- 41 files changed, 81 insertions(+), 81 deletions(-) rename src/{icesat2_tracks => icesat2waves}/__init__.py (100%) rename src/{icesat2_tracks => icesat2waves}/analysis_db/A02c_IOWAGA_thredds_prior.py (97%) rename src/{icesat2_tracks => icesat2waves}/analysis_db/B01_SL_load_single_file.py (96%) rename src/{icesat2_tracks => icesat2waves}/analysis_db/B02_make_spectra_gFT.py (97%) rename src/{icesat2_tracks => icesat2waves}/analysis_db/B03_plot_spectra_ov.py (98%) rename src/{icesat2_tracks => icesat2waves}/analysis_db/B04_angle.py (98%) rename src/{icesat2_tracks => icesat2waves}/analysis_db/B05_define_angle.py (97%) rename src/{icesat2_tracks => icesat2waves}/analysis_db/B06_correct_separate_var.py (98%) rename src/{icesat2_tracks => icesat2waves}/analysis_db/__init__.py (100%) rename src/{icesat2_tracks => icesat2waves}/app.py (89%) rename src/{icesat2_tracks => icesat2waves}/clitools.py (100%) rename src/{icesat2_tracks => icesat2waves}/config/__init__.py (100%) rename src/{icesat2_tracks => icesat2waves}/config/color_def.ai (100%) rename src/{icesat2_tracks => icesat2waves}/config/color_def.ase (100%) rename src/{icesat2_tracks => icesat2waves}/config/color_def.json (100%) rename src/{icesat2_tracks => icesat2waves}/config/config.json (100%) rename src/{icesat2_tracks => icesat2waves}/config/generate_colors.py (94%) rename src/{icesat2_tracks/config/IceSAT2_startup.py => icesat2waves/config/startup.py} (96%) rename src/{icesat2_tracks => icesat2waves}/local_modules/__init__.py (100%) rename src/{icesat2_tracks/local_modules/JONSWAP_gamma.py => icesat2waves/local_modules/jonswap_gamma.py} (100%) rename src/{icesat2_tracks => icesat2waves}/local_modules/m_colormanager_ph3.py (100%) rename src/{icesat2_tracks => icesat2waves}/local_modules/m_general_ph3.py (100%) rename src/{icesat2_tracks => icesat2waves}/local_modules/m_spectrum_ph3.py (99%) rename src/{icesat2_tracks => icesat2waves}/local_modules/m_tools_ph3.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/__init__.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/angle_optimizer.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/beam_stats.py (98%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/convert_GPS_time.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/convert_julian.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/filter_regrid.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/generalized_FT.py (99%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/iotools.py (99%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/lanczos.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/read_ground_tracks.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/sliderule_converter_tools.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/spectral_estimates.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/spicke_remover.py (100%) rename src/{icesat2_tracks/ICEsat2_SI_tools => icesat2waves/tools}/wave_tools.py (100%) diff --git a/README.md b/README.md index 083700d9..c0844480 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 607ebab7..dd57f910 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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. @@ -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"] diff --git a/src/icesat2_tracks/__init__.py b/src/icesat2waves/__init__.py similarity index 100% rename from src/icesat2_tracks/__init__.py rename to src/icesat2waves/__init__.py diff --git a/src/icesat2_tracks/analysis_db/A02c_IOWAGA_thredds_prior.py b/src/icesat2waves/analysis_db/A02c_IOWAGA_thredds_prior.py similarity index 97% rename from src/icesat2_tracks/analysis_db/A02c_IOWAGA_thredds_prior.py rename to src/icesat2waves/analysis_db/A02c_IOWAGA_thredds_prior.py index b8d45404..3137531f 100644 --- a/src/icesat2_tracks/analysis_db/A02c_IOWAGA_thredds_prior.py +++ b/src/icesat2waves/analysis_db/A02c_IOWAGA_thredds_prior.py @@ -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, diff --git a/src/icesat2_tracks/analysis_db/B01_SL_load_single_file.py b/src/icesat2waves/analysis_db/B01_SL_load_single_file.py similarity index 96% rename from src/icesat2_tracks/analysis_db/B01_SL_load_single_file.py rename to src/icesat2waves/analysis_db/B01_SL_load_single_file.py index 756ca3a8..fbbb0f6b 100644 --- a/src/icesat2_tracks/analysis_db/B01_SL_load_single_file.py +++ b/src/icesat2waves/analysis_db/B01_SL_load_single_file.py @@ -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, diff --git a/src/icesat2_tracks/analysis_db/B02_make_spectra_gFT.py b/src/icesat2waves/analysis_db/B02_make_spectra_gFT.py similarity index 97% rename from src/icesat2_tracks/analysis_db/B02_make_spectra_gFT.py rename to src/icesat2waves/analysis_db/B02_make_spectra_gFT.py index fca302da..99012270 100644 --- a/src/icesat2_tracks/analysis_db/B02_make_spectra_gFT.py +++ b/src/icesat2waves/analysis_db/B02_make_spectra_gFT.py @@ -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, diff --git a/src/icesat2_tracks/analysis_db/B03_plot_spectra_ov.py b/src/icesat2waves/analysis_db/B03_plot_spectra_ov.py similarity index 98% rename from src/icesat2_tracks/analysis_db/B03_plot_spectra_ov.py rename to src/icesat2waves/analysis_db/B03_plot_spectra_ov.py index 4dcd197f..92bb5b16 100644 --- a/src/icesat2_tracks/analysis_db/B03_plot_spectra_ov.py +++ b/src/icesat2waves/analysis_db/B03_plot_spectra_ov.py @@ -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, diff --git a/src/icesat2_tracks/analysis_db/B04_angle.py b/src/icesat2waves/analysis_db/B04_angle.py similarity index 98% rename from src/icesat2_tracks/analysis_db/B04_angle.py rename to src/icesat2waves/analysis_db/B04_angle.py index 6c85ec8a..16b33e10 100644 --- a/src/icesat2_tracks/analysis_db/B04_angle.py +++ b/src/icesat2waves/analysis_db/B04_angle.py @@ -6,7 +6,7 @@ import itertools -from icesat2_tracks.config.IceSAT2_startup import ( +from icesat2waves.config.startup import ( mconfig, color_schemes, font_for_print, @@ -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 @@ -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 @@ -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, diff --git a/src/icesat2_tracks/analysis_db/B05_define_angle.py b/src/icesat2waves/analysis_db/B05_define_angle.py similarity index 97% rename from src/icesat2_tracks/analysis_db/B05_define_angle.py rename to src/icesat2waves/analysis_db/B05_define_angle.py index 1ca15f87..aae612ff 100644 --- a/src/icesat2_tracks/analysis_db/B05_define_angle.py +++ b/src/icesat2waves/analysis_db/B05_define_angle.py @@ -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, diff --git a/src/icesat2_tracks/analysis_db/B06_correct_separate_var.py b/src/icesat2waves/analysis_db/B06_correct_separate_var.py similarity index 98% rename from src/icesat2_tracks/analysis_db/B06_correct_separate_var.py rename to src/icesat2waves/analysis_db/B06_correct_separate_var.py index fe84d31b..bf18e560 100644 --- a/src/icesat2_tracks/analysis_db/B06_correct_separate_var.py +++ b/src/icesat2waves/analysis_db/B06_correct_separate_var.py @@ -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 @@ -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, @@ -31,7 +31,7 @@ fig_sizes, ) -from icesat2_tracks.clitools import ( +from icesat2waves.clitools import ( echo, validate_batch_key, validate_output_dir, diff --git a/src/icesat2_tracks/analysis_db/__init__.py b/src/icesat2waves/analysis_db/__init__.py similarity index 100% rename from src/icesat2_tracks/analysis_db/__init__.py rename to src/icesat2waves/analysis_db/__init__.py diff --git a/src/icesat2_tracks/app.py b/src/icesat2waves/app.py similarity index 89% rename from src/icesat2_tracks/app.py rename to src/icesat2waves/app.py index 8c98a282..342a4a4f 100644 --- a/src/icesat2_tracks/app.py +++ b/src/icesat2waves/app.py @@ -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, diff --git a/src/icesat2_tracks/clitools.py b/src/icesat2waves/clitools.py similarity index 100% rename from src/icesat2_tracks/clitools.py rename to src/icesat2waves/clitools.py diff --git a/src/icesat2_tracks/config/__init__.py b/src/icesat2waves/config/__init__.py similarity index 100% rename from src/icesat2_tracks/config/__init__.py rename to src/icesat2waves/config/__init__.py diff --git a/src/icesat2_tracks/config/color_def.ai b/src/icesat2waves/config/color_def.ai similarity index 100% rename from src/icesat2_tracks/config/color_def.ai rename to src/icesat2waves/config/color_def.ai diff --git a/src/icesat2_tracks/config/color_def.ase b/src/icesat2waves/config/color_def.ase similarity index 100% rename from src/icesat2_tracks/config/color_def.ase rename to src/icesat2waves/config/color_def.ase diff --git a/src/icesat2_tracks/config/color_def.json b/src/icesat2waves/config/color_def.json similarity index 100% rename from src/icesat2_tracks/config/color_def.json rename to src/icesat2waves/config/color_def.json diff --git a/src/icesat2_tracks/config/config.json b/src/icesat2waves/config/config.json similarity index 100% rename from src/icesat2_tracks/config/config.json rename to src/icesat2waves/config/config.json diff --git a/src/icesat2_tracks/config/generate_colors.py b/src/icesat2waves/config/generate_colors.py similarity index 94% rename from src/icesat2_tracks/config/generate_colors.py rename to src/icesat2waves/config/generate_colors.py index b6a792b6..0eb653dd 100644 --- a/src/icesat2_tracks/config/generate_colors.py +++ b/src/icesat2waves/config/generate_colors.py @@ -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'] diff --git a/src/icesat2_tracks/config/IceSAT2_startup.py b/src/icesat2waves/config/startup.py similarity index 96% rename from src/icesat2_tracks/config/IceSAT2_startup.py rename to src/icesat2waves/config/startup.py index d1e27938..60564f11 100644 --- a/src/icesat2_tracks/config/IceSAT2_startup.py +++ b/src/icesat2waves/config/startup.py @@ -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__) diff --git a/src/icesat2_tracks/local_modules/__init__.py b/src/icesat2waves/local_modules/__init__.py similarity index 100% rename from src/icesat2_tracks/local_modules/__init__.py rename to src/icesat2waves/local_modules/__init__.py diff --git a/src/icesat2_tracks/local_modules/JONSWAP_gamma.py b/src/icesat2waves/local_modules/jonswap_gamma.py similarity index 100% rename from src/icesat2_tracks/local_modules/JONSWAP_gamma.py rename to src/icesat2waves/local_modules/jonswap_gamma.py diff --git a/src/icesat2_tracks/local_modules/m_colormanager_ph3.py b/src/icesat2waves/local_modules/m_colormanager_ph3.py similarity index 100% rename from src/icesat2_tracks/local_modules/m_colormanager_ph3.py rename to src/icesat2waves/local_modules/m_colormanager_ph3.py diff --git a/src/icesat2_tracks/local_modules/m_general_ph3.py b/src/icesat2waves/local_modules/m_general_ph3.py similarity index 100% rename from src/icesat2_tracks/local_modules/m_general_ph3.py rename to src/icesat2waves/local_modules/m_general_ph3.py diff --git a/src/icesat2_tracks/local_modules/m_spectrum_ph3.py b/src/icesat2waves/local_modules/m_spectrum_ph3.py similarity index 99% rename from src/icesat2_tracks/local_modules/m_spectrum_ph3.py rename to src/icesat2waves/local_modules/m_spectrum_ph3.py index f904b63c..0c997959 100644 --- a/src/icesat2_tracks/local_modules/m_spectrum_ph3.py +++ b/src/icesat2waves/local_modules/m_spectrum_ph3.py @@ -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 diff --git a/src/icesat2_tracks/local_modules/m_tools_ph3.py b/src/icesat2waves/local_modules/m_tools_ph3.py similarity index 100% rename from src/icesat2_tracks/local_modules/m_tools_ph3.py rename to src/icesat2waves/local_modules/m_tools_ph3.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/__init__.py b/src/icesat2waves/tools/__init__.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/__init__.py rename to src/icesat2waves/tools/__init__.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/angle_optimizer.py b/src/icesat2waves/tools/angle_optimizer.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/angle_optimizer.py rename to src/icesat2waves/tools/angle_optimizer.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/beam_stats.py b/src/icesat2waves/tools/beam_stats.py similarity index 98% rename from src/icesat2_tracks/ICEsat2_SI_tools/beam_stats.py rename to src/icesat2waves/tools/beam_stats.py index 3f815e15..096b170c 100644 --- a/src/icesat2_tracks/ICEsat2_SI_tools/beam_stats.py +++ b/src/icesat2waves/tools/beam_stats.py @@ -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 diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/convert_GPS_time.py b/src/icesat2waves/tools/convert_GPS_time.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/convert_GPS_time.py rename to src/icesat2waves/tools/convert_GPS_time.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/convert_julian.py b/src/icesat2waves/tools/convert_julian.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/convert_julian.py rename to src/icesat2waves/tools/convert_julian.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/filter_regrid.py b/src/icesat2waves/tools/filter_regrid.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/filter_regrid.py rename to src/icesat2waves/tools/filter_regrid.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/generalized_FT.py b/src/icesat2waves/tools/generalized_FT.py similarity index 99% rename from src/icesat2_tracks/ICEsat2_SI_tools/generalized_FT.py rename to src/icesat2waves/tools/generalized_FT.py index abec0dbc..9bfd0aaf 100644 --- a/src/icesat2_tracks/ICEsat2_SI_tools/generalized_FT.py +++ b/src/icesat2waves/tools/generalized_FT.py @@ -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): diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/iotools.py b/src/icesat2waves/tools/iotools.py similarity index 99% rename from src/icesat2_tracks/ICEsat2_SI_tools/iotools.py rename to src/icesat2waves/tools/iotools.py index 45444490..05faae5e 100644 --- a/src/icesat2_tracks/ICEsat2_SI_tools/iotools.py +++ b/src/icesat2waves/tools/iotools.py @@ -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): diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/lanczos.py b/src/icesat2waves/tools/lanczos.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/lanczos.py rename to src/icesat2waves/tools/lanczos.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/read_ground_tracks.py b/src/icesat2waves/tools/read_ground_tracks.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/read_ground_tracks.py rename to src/icesat2waves/tools/read_ground_tracks.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/sliderule_converter_tools.py b/src/icesat2waves/tools/sliderule_converter_tools.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/sliderule_converter_tools.py rename to src/icesat2waves/tools/sliderule_converter_tools.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/spectral_estimates.py b/src/icesat2waves/tools/spectral_estimates.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/spectral_estimates.py rename to src/icesat2waves/tools/spectral_estimates.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/spicke_remover.py b/src/icesat2waves/tools/spicke_remover.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/spicke_remover.py rename to src/icesat2waves/tools/spicke_remover.py diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/wave_tools.py b/src/icesat2waves/tools/wave_tools.py similarity index 100% rename from src/icesat2_tracks/ICEsat2_SI_tools/wave_tools.py rename to src/icesat2waves/tools/wave_tools.py diff --git a/tests/test_steps.py b/tests/test_steps.py index d477d202..c7d8faca 100644 --- a/tests/test_steps.py +++ b/tests/test_steps.py @@ -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 From 6d826253affe46d25c5424a88a1203fd1269942c Mon Sep 17 00:00:00 2001 From: Carlos Paniagua Date: Thu, 7 Mar 2024 16:48:09 -0500 Subject: [PATCH 2/4] chore: update pyproject.toml icesat2-tracks => icesat2waves min python ver => 3.10 TODO: rename repo --- pyproject.toml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dd57f910..b318f6e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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/ @@ -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 @@ -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", @@ -138,7 +137,7 @@ dependencies = [ # Optional dev = [ "check-manifest", "black", - "icesat2-tracks[test]" + "icesat2waves[test]" ] test = [ "coverage", @@ -157,9 +156,9 @@ 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. @@ -194,4 +193,4 @@ where = ["src"] requires = ["setuptools>=43.0.0", "setuptools_scm>=8", "wheel"] build-backend = "setuptools.build_meta" -[tool.setuptools_scm] \ No newline at end of file +[tool.setuptools_scm] From 99e31f4ee020ae5bc61405dda15bfa4fa032e4ba Mon Sep 17 00:00:00 2001 From: Carlos Paniagua Date: Fri, 8 Mar 2024 13:32:18 -0500 Subject: [PATCH 3/4] fix: icesat2_tracks => icesat2waves in spectral_estimates.py --- src/icesat2waves/tools/spectral_estimates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/icesat2waves/tools/spectral_estimates.py b/src/icesat2waves/tools/spectral_estimates.py index ed772575..1a8574dc 100644 --- a/src/icesat2waves/tools/spectral_estimates.py +++ b/src/icesat2waves/tools/spectral_estimates.py @@ -8,7 +8,7 @@ import pandas as pd from scipy import signal import lmfit as LM -import icesat2_tracks.local_modules.m_general_ph3 as M +import icesat2waves.local_modules.m_general_ph3 as M from matplotlib.gridspec import GridSpec import matplotlib.pyplot as plt @@ -65,7 +65,7 @@ def create_chunk_boundaries_unit_lengths(L_unit, data_limits, ov=None, iter_flag position_stancil = np.vstack( [xleft[0:max_size], xcenter_pos[0:max_size], xright[0:max_size]] ) - + return iter(position_stancil.T.tolist()) if iter_flag else position_stancil From 40d9116bb12820ed554f8d7c345eff66572bab63 Mon Sep 17 00:00:00 2001 From: Carlos Paniagua Date: Fri, 8 Mar 2024 18:25:30 -0500 Subject: [PATCH 4/4] fix: update README.md with python 3.10 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c0844480..0a6b1701 100644 --- a/README.md +++ b/README.md @@ -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)