Skip to content

Migrate nsidc data tutorials content #70

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

Merged
merged 24 commits into from
Jun 12, 2025

Conversation

trey-stafford
Copy link
Contributor

@trey-stafford trey-stafford commented Jun 3, 2025

Resolves #69 and addresses feedback in nsidc/NSIDC-Data-Tutorials#80

Doc preview can be seen here: https://iceflow--70.org.readthedocs.build/en/70/

Juptyter notebooks have been placed into their own section, "Jupyter Notebooks": https://iceflow--70.org.readthedocs.build/en/70/notebooks/index.html

This distinguishes these notebooks from the iceflow library
* Stop splitting notebooks into those that are rendered and those that are
not. It requires remembering to render the notebooks for the docs
separately. Now the docs notebooks are just symlinks to the notebooks in the
`notebooks/` dir.

* Update text/language around notebooks, and nest all notebooks under one
section in the docs
Sphinx/myst_nb seems to have problems with including the extension. I get xref
missing warnings when they are present. It also causes relative links with
`.ipynb` to not render at all in the docs.

This represents a trade-off: the docs will have nicely rendered links to the
other notebooks. For users who download the files themselves and execute them as
notebooks locally, the links will not work. However, it should be clear enough
what they refer to.
* Remove bolding of some headings. This is more consistent with the other notebooks
* Increase heading level of subheadings. Keep only top-level title as h1. This
makes navigation in the doc TOC a little cleaner.
Confusing to have the same text hyperlinked to two separate locations.
The headings markdown itself (`#`) and the order content is presented already
provides structure without needing to add and maintain numbered headings. This
is consistent with the other iceflow notebooks.
@trey-stafford
Copy link
Contributor Author

Thought: the 0_introduction.ipynb notebook could be converted into a markdown page and displayed as a separate section on mission background in RTD. It doesn't need to be in notebook format due to it's lack of any code cells. Is there an advantage to maintaining the content as a notebook?

* Move challenges about data use to after overview of missions.
* Include references to other companion notebooks.
@trey-stafford
Copy link
Contributor Author

TODO: once we settle on titles of notebooks and if the intro notebook should remain as a notebook, rename to correspond wtih their titles. E.g., 0_introduction could become altimetry-data-at-NSIDC.

Eliminates confusion around notebooks "living" in two separate
locations. Although the symlinks did work, it was still a bit
confusing. Importantly, clicking on the "view this page" link at the top that
takes the user to GitHub directs users to the symlink, which might be
confusing. Users should be able to click on that button to directly go to and
download the notebook and run it themselves.

This also makes it clearer that the notebooks are part of the documentation.

It still may be worth considering letting `myst_nb` execute the notebooks
at build time, but I worry about very long execution times for the icepyx
notebook in particular. It might be better to have the developer execute the
cells manually. Also, it would require our CI pipeline to have earthdata login
creds to download the necessary data.
@trey-stafford trey-stafford force-pushed the 69-migrate-nsidc-data-tutorials-content branch from 4e84333 to 5eac08e Compare June 4, 2025 20:18
@trey-stafford trey-stafford marked this pull request as ready for review June 4, 2025 20:21
@trey-stafford trey-stafford requested a review from asteiker June 4, 2025 20:22
trey-stafford added a commit to nsidc/NSIDC-Data-Tutorials that referenced this pull request Jun 4, 2025
Migrated to the `iceflow` standalone repository in
nsidc/iceflow#70
Copy link
Member

@asteiker asteiker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without running the notebooks myself, all of these changes look good to me. I would like to do another pass with the actual notebook execution since some of the existing notebooks had some modifications, so I will do this and then approve!

@asteiker
Copy link
Member

Should the 0_introduction.ipynb be retained as a notebook? There are only markdown cells here, so this content can be authored as a regular markdown file.

I had the same thought. I don't see any reason not to convert to markdown. I would also suggest updated the title to be consistent with the others. It could be renamed to something lke altimetry-data-intro.

Formatting and consistency: should we remove the "NSIDC" logo from the top of the 0_introduction.ipynb?

Yes the logo can be removed. I agree it's a bit funny to have it appear in this notebook but not the others.

Should we draft some instructions on how to download the notebooks from github?

I don't think this is critical but certainly couldn't hurt. It could be as simple as mentioning that there are several tutorial notebooks located in the /docs/notebooks folder that can be executed locally, and these same notebooks can be viewed via the documentation site: https://iceflow.readthedocs.io/en/latest/.

Review notebook titles and rename notebooks to correspond to those titles.

Agreed! Though these don't necessarily need to be 1:1. Let me know what you have in mind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trey-stafford I also received an error when running this notebook at the following line:

downloaded_files = download_iceflow_results(search_results, output_dir=OUTPUT_DIR)

PermissionError: User: arn:aws:sts::695478930278:assumed-role[/s3-same-region-access-role/amy.steiker](https://openscapes.2i2c.cloud/s3-same-region-access-role/amy.steiker) is not authorized to perform: s3:ListBucket on resource: "arn:aws:s3:::nsidc-cumulus-prod-protected" with an explicit deny in a resource-based policy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, are you running this locally? Or in a cloud environment?

I suspect this is might have been a temporary problem with EDL. Would you be willing to re-try and confirm if this problem persists? I just re-ran this notebook after deleting the downloaded-data/ folder to ensure that the data were re-downloaded, and it succeeded.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We attempted to troubleshoot this and determined it is likely an EDL issue on my end, not anything to do with the library. So let's move forward with the merge and we can continue to investigate where this issue is stemming from.

Top-level website displays logo
@trey-stafford trey-stafford force-pushed the 69-migrate-nsidc-data-tutorials-content branch from f0d59ea to 06af3e5 Compare June 10, 2025 17:12
@trey-stafford
Copy link
Contributor Author

Yes the logo can be removed. I agree it's a bit funny to have it appear in this notebook but not the others.

Removed in 06af3e5

Easier to maintain this as markdown than a jupyter notebook, esp. since it's
just markdown!
@trey-stafford
Copy link
Contributor Author

I had the same thought. I don't see any reason not to convert to markdown. I would also suggest updated the title to be consistent with the others. It could be renamed to something lke altimetry-data-intro.

Implemented in 636349a . I named the markdown file altimetry-data-overview.md.

@asteiker asteiker self-requested a review June 12, 2025 14:27
@trey-stafford trey-stafford merged commit 4a6415d into main Jun 12, 2025
4 checks passed
@trey-stafford trey-stafford deleted the 69-migrate-nsidc-data-tutorials-content branch June 12, 2025 14:36
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

Successfully merging this pull request may close these issues.

Migrate notebooks from NSIDC-Data-Tutorials
2 participants