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

Rename notebooks #39

Open
megies opened this issue Dec 3, 2019 · 0 comments
Open

Rename notebooks #39

megies opened this issue Dec 3, 2019 · 0 comments

Comments

@megies
Copy link
Member

megies commented Dec 3, 2019

I think we should get back useful names on the notebooks, soon.
The naming of individual files in the live website is not what we want there, ultimately, I think:

Screenshot from 2019-12-03 17-28-05

Two obvious options:

  • A) rename the jupytext files. this will cause filenames with spaces etc in the source repo (preferred I guess)
  • B) add a mapping file that renames the jupytext file during the conversion to .ipynb files (kinda like the ugly index.html reinvented)

I guess we're doing A) but I'll hear opinions @krischer @heinerigel

Here's a code snippet to extract naming of notebook items on the old LRZ cloud version:

from bs4 import BeautifulSoup


with open('notebooks/share/overview/index.html') as fh: 
    soup = BeautifulSoup(fh.read(), 'html.parser')


nodes = soup.findAll('a', attrs={'class': "btn"})

for node in nodes:
    if '.ipynb' not in node.attrs['href']:
        continue
    if 'solution' in node.attrs['href']:
        continue
    print('%s       "%s"' % (node.attrs['href'].split('/', 4)[-1].ljust(120),
                             node.parent.parent.findChildren()[0].text))

And here's the output, which could be a good starting point for renaming jupytext files:

Ambient%20Seismic%20Noise/Probabilistic%20Power%20Spectral%20Densities.ipynb                                                   "Ambient Seismic Noise"
Ambient%20Seismic%20Noise/NoiseCorrelation.ipynb                                                                               "Noise Correlations"
Computational%20Seismology/Wave%20Propagation%20%26%20Analytical%20Solutions/Greens_function_acoustic_1-3D.ipynb               "Acoustic Green's Function"
Computational%20Seismology/Wave%20Propagation%20%26%20Analytical%20Solutions/Double_couple_homogeneous_3D/Double_couple_homogeneous_3D.ipynb       "Double Couple"
Computational%20Seismology/Wave%20Propagation%20%26%20Analytical%20Solutions/Lambs_problem_3D/lambs_problem.ipynb              "Lamb's Problem"
Computational%20Seismology/Wave%20Propagation%20%26%20Analytical%20Solutions/time_reversal_reciprocity.ipynb                   "Reciprocity"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_first_derivative.ipynb                                          "Numerical First Derivative"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_taylor_operators.ipynb                                          "Taylor operators"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_taylor_operators_advanced.ipynb                                 "Taylor operators"
Computational%20Seismology/The%20Finite-Difference%20Method/ac1d_optimal_operator.ipynb                                        "Optimal Operators"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_ac1d.ipynb                                                      "FD Acoustic 1D"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_ac2d_homogeneous.ipynb                                          "FD Acoustic 2D"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_ac3d_homogeneous.ipynb                                          "FD Acoustic 3D"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_ac2d_heterogeneous.ipynb                                        "FD Acoustic 2D Hetero"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_advection_1d.ipynb                                              "Advection in 1D"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_advection_diffusion_reaction.ipynb                              "Advection Diffusion Reaction"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_elastic1d_staggered.ipynb                                       "Staggered Grid 1D"
Computational%20Seismology/The%20Finite-Difference%20Method/fd_seismometer.ipynb                                               "Seismometer Equation"
Computational%20Seismology/The%20Pseudospectral%20Method/ps_fourier_derivative.ipynb                                           "Fourier Derivatives"
Computational%20Seismology/The%20Pseudospectral%20Method/ps_cheby_derivative.ipynb                                             "Chebyshev Derivatives"
Computational%20Seismology/The%20Pseudospectral%20Method/ps_fourier_acoustic_1d.ipynb                                          "PS Acoustic 1D"
Computational%20Seismology/The%20Pseudospectral%20Method/ps_fourier_acoustic_2d.ipynb                                          "PS Acoustic 2D"
Computational%20Seismology/The%20Pseudospectral%20Method/ps_cheby_elastic_1d.ipynb                                             "Cheby Elastic 1D"
Computational%20Seismology/The%20Finite-Element%20Method/fe_elastic_1d.ipynb                                                   "FE Elastic 1D"
Computational%20Seismology/The%20Finite-Element%20Method/fe_static_elasticity.ipynb                                            "Static Elasticity"
Computational%20Seismology/The%20Spectral-Element%20Method/se_Lagrange_interpolation.ipynb                                     "Lagrange Interpolation"
Computational%20Seismology/The%20Spectral-Element%20Method/se_numerical_integration_GLL.ipynb                                  "Numerical Integration"
Computational%20Seismology/The%20Spectral-Element%20Method/se_homo_1d.ipynb                                                    "Homogeneous 1D"
Computational%20Seismology/The%20Spectral-Element%20Method/se_hetero_1d.ipynb                                                  "Heterogeneous 1D"
Computational%20Seismology/The%20Finite-Volume%20Method/fv_scalar_advection_1d.ipynb                                           "Scalar Advection"
Computational%20Seismology/The%20Finite-Volume%20Method/fv_elastic_homo_1d.ipynb                                               "Elastic 1D"
Computational%20Seismology/The%20Finite-Volume%20Method/fv_elastic_hetero_1d.ipynb                                             "Elastic 1D Hetero"
Computational%20Seismology/The%20Discontinuous%20Galerkin%20Method/dg_scalar_advection_1d.ipynb                                "Scalar Advection"
Computational%20Seismology/The%20Discontinuous%20Galerkin%20Method/dg_elastic_homo_1d.ipynb                                    "Elastic 1D"
Computational%20Seismology/The%20Discontinuous%20Galerkin%20Method/dg_elastic_hetero_1d.ipynb                                  "Elastic 1D Hetero"
Computational%20Seismology/Summation-by-Parts/1d/sp_advection1D.ipynb                                                          "1D Advection"
Computational%20Seismology/Summation-by-Parts/1d/sp_elasticwave1D.ipynb                                                        "1D Elastic Wave Equation"
Computational%20Seismology/Summation-by-Parts/2d/sp_acousticWave2D.ipynb                                                       "2D Acoustic Wave Equation"
Computational%20Seismology/Summation-by-Parts/2d/sp_elasticwave2D.ipynb                                                        "2D Elastic Wave Equation"
Data%20Visualization/Intro_to_visualization.ipynb                                                                              "Intro to data visualization"
Earthquake%20Physics/DiscontinuousGalerkin/dg_elastic_nonlinearfriction.ipynb                                                  "DG Non-Linear Friction Laws"
Earthquake%20Physics/DiscontinuousGalerkin/dg_elastic_physicalfluxes.ipynb                                                     "DG 1D Elastic Wave Equation"
Earthquake%20Physics/rupturedynamics_1D/rupture_1D.ipynb                                                                       "Rupture dynamics in 1D"
Earthquake%20Physics/rupturedynamics_2D/rupture_2D.ipynb                                                                       "Rupture dynamics in 2D"
Earthquake%20Physics/rsf_widgets_dashboard.ipynb                                                                               "The Rate and State Friction Toolkit"
General%20Seismology/instrument_response.ipynb                                                                                 "Instrument Correction"
Glacial%20Seismology/hydro_and_calving.ipynb                                                                                   "Calving and hydrology seismicity"
Glacial%20Seismology/hydro_and_calving-complete.ipynb                                                                          "Calving and hydrology seismicity"
Instaseis-Syngine/Instaseis_Tutorial_01_introduction.ipynb                                                                     "Instaseis Introduction"
Instaseis-Syngine/Instaseis_Tutorial_02_basis.ipynb                                                                            "Instaseis Basics"
Instaseis-Syngine/Instaseis_Tutorial_03_record_section.ipynb                                                                   "Instaseis Record Section"
Instaseis-Syngine/Instaseis_Tutorial_04_finite_source.ipynb                                                                    "Instaseis Finite Sources"
Instaseis-Syngine/syngine_tutorial.ipynb                                                                                       "Syngine Tutorial"
ObsPy/00_Introduction.ipynb                                                                                                    "0. Introduction"
ObsPy/01_File_Formats.ipynb                                                                                                    "1. File Formats"
ObsPy/02_UTCDateTime.ipynb                                                                                                     "2. UTCDateTime"
ObsPy/03_waveform_data.ipynb                                                                                                   "3. Waveform Data"
ObsPy/04_Station_metainformation.ipynb                                                                                         "4. Station Metainformation"
ObsPy/05_Event_metadata.ipynb                                                                                                  "5. Event Metadata"
ObsPy/06_FDSN.ipynb                                                                                                            "6. FDSN"
ObsPy/07_Basic_Processing_Exercise.ipynb                                                                                       "7. Exercise: Basic Processing"
ObsPy/08_Exercise__2008_MtCarmel_Earthquake_and_Aftershock_Series.ipynb                                                        "8. Exercise: Aftershock Series"
Python%20Introduction/Python_Crash_Course.ipynb                                                                                "Python Crash Course"
Rotational%20Seismology/download+preprocess_data.ipynb                                                                         "Downloading and Preprocessing"
Rotational%20Seismology/estimate_backazimuth.ipynb                                                                             "Backazimuth Estimation"
Rotational%20Seismology/estimate_phase_velocity.ipynb                                                                          "Phase Velocity Estimation"
Reproducible%20Papers/Syngine_2016/figure_1_phase_relative_times.ipynb                                                         "Figure 1"
Reproducible%20Papers/Syngine_2016/figure_2_source_width.ipynb                                                                 "Figure 2"
Reproducible%20Papers/Syngine_2016/figure_3_finite_source_seismograms.ipynb                                                    "Figure 3"
Reproducible%20Papers/Syngine_2016/figure_4_earth_models.ipynb                                                                 "Figure 4"
Reproducible%20Papers/Syngine_2016/figure_5_compare_seismograms_for_models.ipynb                                               "Figure 5"
Reproducible%20Papers/Syngine_2016/figure_6_data_quality.ipynb                                                                 "Figure 6"
Reproducible%20Papers/Syngine_2016/figure_8_education.ipynb                                                                    "Figure 8"
Seismic%20Inverse%20Problems/Earthquake%20Location/el_hypocenter.ipynb                                                         "Hypocenter Estimation"
Seismic%20Inverse%20Problems/Probabilistic%20Inversion/pi_simann.ipynb                                                         "Simulated Annealing"
Seismic%20Inverse%20Problems/Probabilistic%20Inversion/pi_metropolis.ipynb                                                     "Metropolis Algorithm"
Signal%20Processing/filter_basics.ipynb                                                                                        "Filter Basics"
Signal%20Processing/fourier_transform.ipynb                                                                                    "Fourier Transform"
Signal%20Processing/spectral_analysis+preprocessing.ipynb                                                                      "Spectral Analysis and Preprocessing"
Workshops/ORFEUS_lisbon_2017_EIDA_webservices.ipynb                                                                            "ORFEUS Workshop - Lisbon 2017"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/00_Python_Crash_Course.ipynb                                                        "0. Python Crash Course"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/01_File_Formats.ipynb                                                               "1. ObsPy -- File Formats"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/02_UTCDateTime.ipynb                                                                "2. ObsPy -- UTCDateTime"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/03_waveform_data.ipynb                                                              "3. ObsPy -- Waveform Data"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/04_Station_metainformation.ipynb                                                    "4. ObsPy -- Station Metainformation"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/05_Event_metadata.ipynb                                                             "5. ObsPy -- Event Metadata"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/06_FDSN.ipynb                                                                       "6. ObsPy -- FDSN Web Services"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/07_Basic_Processing_Exercise.ipynb                                                  "7. ObsPy -- Basic Exercise"
Workshops/2017_Baku_STCU_IRIS_ObsPy_course/08_Exercise__2008_MtCarmel_Earthquake_and_Aftershock_Series.ipynb                   "8. ObsPy -- Advanced Exercise"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant