Uh oh!
There was an error while loading. Please reload this page.
Conversation
Add shared environment files and update the tutorial documentation so users can clone the repository, create one environment, and run both the NetCDF and Cartopy tutorials without ad hoc package installation. Add repository-level dependency files: - Add environment.yml for the recommended Conda/Mamba workflow. - Use the cera-tutorials environment name. - Use conda-forge for geospatial/scientific dependencies. - Include Python 3.12, NumPy, pandas, Matplotlib, netCDF4, Cartopy, Pillow, ipywidgets, JupyterLab, notebook, and ipykernel. - Add requirements.txt as a pip fallback with the equivalent Python packages. Update documentation: - Add root README setup instructions for Conda/Mamba and pip fallback. - Add root README run commands for the NetCDF and Cartopy tutorials. - Update Cartopy README to point users at the shared root environment. - Update Analyzing_NetCDF README with local run instructions. - Fix stale NetCDF tutorial links to point at files in this repository. - Fix the "Jupiter Notebook" typo to "Jupyter Notebook". Clean up notebook environment handling: - Replace executable pip install cells in both notebooks with non-mutating setup guidance. - Document the shared cera-tutorials kernel inside the notebooks. - Keep pip fallback commands as commented examples only. - Standardize both notebooks on the Python (cera-tutorials) kernel. - Avoid automatic package installation when users run all notebook cells. Improve tutorial data handling: - Keep README download commands simple for copy/paste terminal usage. - Add notebook-only checks before downloading tutorial data files. - Skip re-downloading water_level_stations.csv in the Cartopy notebook when it already exists. - Skip re-downloading maxele.63.nc in the NetCDF notebook when it already exists. Update ignore rules: - Ignore Python cache files and notebook checkpoints. - Ignore local virtual environments and .env files. - Ignore Cartopy generated map images. - Ignore NetCDF tutorial output text files. - Ignore downloaded NetCDF sample files, including repeated wget suffixes. Validation: - Verified both notebooks are valid JSON with jq. - Verified no active notebook pip install commands remain. - Ran git diff --check successfully. - Ran py_compile successfully for the Cartopy and NetCDF Python scripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR makes the tutorial repository easier to run and publish by improving the Cartopy command-line tutorial and adding shared environment setup for the NetCDF and Cartopy tutorials.
Changes
Cartopy/cera_cartopy.pyinto a clearer command-line workflow.station_id,lat, andlon.--output--no-show--titleenvironment.yml.requirements.txt.pip installcells with non-mutating setup guidance.Python (cera-tutorials)kernel..gitignorefor generated files, local environments, downloaded sample data, and output images.Testing
python3 -m py_compile Cartopy/cera_cartopy.py.python3 -m py_compile Analyzing_NetCDF/NetCDF_Tutorial/net_CDF4.py.jq empty.pip installcommands remain.git diff --check.cera-tutorialsConda environment.python3 cera_cartopy.py water_level_stations.csvpython3 cera_cartopy.py water_level_stations.csv --output station_map.pngpython3 cera_cartopy.py water_level_stations.csv --output station_map.png --no-showpython3 cera_cartopy.py water_level_stations.csv --title "Water level stations"Notes
Downloaded tutorial data files remain local and ignored by git:
Cartopy/water_level_stations.csvAnalyzing_NetCDF/NetCDF_Tutorial/maxele.63.nc