diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 15470d4..1464c90 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python 3.11 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.11 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1520f8..2585393 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] runs-on: ${{ matrix.os }} @@ -24,8 +24,8 @@ jobs: shell: bash -l {0} steps: - - uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v2 + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: python-version: "${{ matrix.python-version }}" miniforge-variant: Mambaforge @@ -46,9 +46,9 @@ jobs: name: Test the notebooks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 with: python-version: "3.11" miniforge-variant: Mambaforge @@ -60,4 +60,5 @@ jobs: - name: Test env: MPLBACKEND: "Agg" + OPENTOPOGRAPHY_API_KEY: ${{ secrets.OPENTOPOGRAPHY_API_KEY }} run: nox -s test-notebooks --python "3.11" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 71b194a..e3d776d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,20 +70,13 @@ repos: files: \.py$ - repo: https://github.com/mcflugen/heartfelt-hooks - rev: v0.3.2 + rev: v1.3.3 hooks: - - id: file-name-check-whitespace - - id: nb-check-kernel - args: [ - --verbose, - --fix, - --kernel-name=ivy, - --kernel-display-name=Ivy, - --kernel-language=python - ] - - id: nb-check-hidden-cells - args: [--tags=solution, --solution-suffix=.a.ipynb, --diff] - - id: notebook-check-heading-levels + - id: check-whitespace + # - id: check-mixed-case + # - id: check-snake-case + - id: check-heading-levels + # - id: hide-solution-cells - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 diff --git a/AUTHORS.rst b/AUTHORS.rst index dead175..ba5e03b 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -15,6 +15,7 @@ Contributors * Jordan Adams * Katy Barnhart +* Tian Gan * Eric Hutton * Albert Kettner * Allen Lee diff --git a/CITATION.cff b/CITATION.cff index b38e9c1..c9721f5 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -17,6 +17,9 @@ authors: - family-names: Hutton given-names: Eric orcid: 'https://orcid.org/0000-0002-5864-6459' + - family-names: Gan + given-names: Tian + orcid: 'https://orcid.org/0000-0003-3624-6910' - family-names: Overeem given-names: Irina orcid: 'https://orcid.org/0000-0002-8422-580X' diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md new file mode 100644 index 0000000..6fd8e08 --- /dev/null +++ b/CODE-OF-CONDUCT.md @@ -0,0 +1,5 @@ +# Code of Conduct + +Everyone participating in this project is governed by +the CSDMS [Code of Conduct](https://github.com/csdms/project/blob/main/CODE-OF-CONDUCT.md). +By participating, you are expected to uphold this code. diff --git a/CODE-OF-CONDUCT.rst b/CODE-OF-CONDUCT.rst deleted file mode 100644 index 90a7c19..0000000 --- a/CODE-OF-CONDUCT.rst +++ /dev/null @@ -1,83 +0,0 @@ -Contributor Covenant Code of Conduct -==================================== - -Our Pledge ----------- - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -Our Standards -------------- - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -Our Responsibilities --------------------- - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -Scope ------ - -This Code of Conduct applies within all project spaces, and it also applies when -an individual is representing the project or its community in public spaces. -Examples of representing a project or community include using an official -project e-mail address, posting via an official social media account, or acting -as an appointed representative at an online or offline event. Representation of -a project may be further defined and clarified by project maintainers. - -Enforcement ------------ - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at csdms@colorado.edu. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -Attribution ------------ - -This Code of Conduct is adapted from the -`Contributor Covenant `_, version 1.4, -available at -``_. - -For answers to common questions about this code of conduct, see -``_. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..cd03e85 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,6 @@ +# Contributing + +We welcome, and greatly appreciate, contributions +to [CSDMS Workbench](https://csdms.colorado.edu/wiki/Workbench) tools. +For recommendations on how you can contribute, +please see the CSDMS project [CONTRIBUTING](https://github.com/csdms/project/blob/main/CONTRIBUTING.md) document. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index d7b1568..0000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,103 +0,0 @@ -.. highlight:: shell - -============ -Contributing -============ - -Contributions are welcome, and they are greatly appreciated! Every little bit -helps, and credit will always be given. - -You can contribute in many ways: - -Types of Contributions ----------------------- - -Report Bugs -~~~~~~~~~~~ - -Report bugs at https://github.com/csdms/ivy/issues. - -If you are reporting a bug, please include: - -* Your operating system name and version. -* Any details about your local setup that might be helpful in troubleshooting. -* Detailed steps to reproduce the bug. - -Fix Bugs -~~~~~~~~ - -Look through the GitHub issues for bugs. Anything tagged with "bug" and "help -wanted" is open to whoever wants to implement it. - -Implement Features -~~~~~~~~~~~~~~~~~~ - -Look through the GitHub issues for features. Anything tagged with "enhancement" -and "help wanted" is open to whoever wants to implement it. - -Write Documentation -~~~~~~~~~~~~~~~~~~~ - -CSDMS Ivy could always use more documentation, whether as part of the -official docs, in docstrings, or even on the web in blog posts, -articles, and such. - -Submit Feedback -~~~~~~~~~~~~~~~ - -The best way to send feedback is to file an issue at -https://github.com/csdms/ivy/issues. - -If you are proposing a feature: - -* Explain in detail how it would work. -* Keep the scope as narrow as possible, to make it easier to implement. -* Remember that this is a volunteer-driven project, and that contributions - are welcome :) - -Get Started! ------------- - -Ready to contribute? Here's how to set up CSDMS Ivy for local development. - -1. Fork the CSDMS Ivy repo on GitHub. -2. Clone your fork locally:: - - $ git clone git@github.com:your_name_here/ivy.git - -3. Create a branch for local development:: - - $ git checkout -b name-of-your-bugfix-or-feature - - Now you can make your changes locally. - -4. Commit your changes and push your branch to GitHub:: - - $ git add . - $ git commit -m "Your detailed description of your changes." - $ git push origin name-of-your-bugfix-or-feature - -5. Submit a pull request through the GitHub website. - -Pull Request Guidelines ------------------------ - -Before you submit a pull request, check that it meets these guidelines: - -1. The pull request should include tests. -2. If the pull request adds functionality, the docs should be updated. Put - your new functionality into a function with a docstring, and add the - feature to the list in README.md. -3. The pull request should work for Python 3.8, 3.9, and 3.10. - Make sure that the tests pass for all supported Python versions. - -Deploying ---------- - -A reminder for the maintainers on how to deploy. -Make sure all your changes are committed (including an entry in HISTORY.rst). -Then run:: - -$ git tag v.. -$ git push -$ git push --tags diff --git a/README.ipynb b/README.ipynb index bdb9741..12f365d 100644 --- a/README.ipynb +++ b/README.ipynb @@ -23,7 +23,7 @@ "[permamodel]: ./lessons/permamodel/index.ipynb\n", "[best-practices]: ./lessons/best-practices/index.md\n", "[hpc]: ./lessons/hpc/index.md\n", - "[jhub-link]: https://lab.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fivy&urlpath=lab%2Ftree%2Fivy%2FREADME.ipynb%3Fautodecode&branch=main\n", + "[jhub-link]: https://explore.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fivy&urlpath=lab%2Ftree%2Fivy%2FREADME.ipynb%3Fautodecode&branch=main\n", "[jhub-info]: https://csdms.colorado.edu/wiki/JupyterHub\n", "[swc]: http://software-carpentry.org\n", "[swc-license]: https://github.com/swcarpentry/python-novice-inflammation/blob/gh-pages/LICENSE.md\n", @@ -72,17 +72,17 @@ "\n", "[![Run on EarthscapeHub][badge]][jhub-link]\n", "\n", - "to open the lessons directly on the EarthscapeHub *lab* instance!\n", + "to open the lessons directly on the EarthscapeHub *explore* instance!\n", "\n", - "> **Note:** The EarthscapeHub *lab* instance is password-protected.\n", + "> **Note:** The EarthscapeHub *explore* instance is password-protected.\n", " Please contact your instructor about obtaining a login,\n", " or visit [this][jhub-info] CSDMS wiki page for more information.\n", "\n", "## Contributing\n", "\n", "CSDMS Ivy is an open source project;\n", - "[contributions](./CONTRIBUTING.rst) that follow\n", - "the [contributor code of conduct](./CODE-OF-CONDUCT.rst) are welcomed\n", + "[contributions](./CONTRIBUTING.md) that follow\n", + "the [contributor code of conduct](./CODE-OF-CONDUCT.md) are welcomed\n", "and are [acknowledged](./AUTHORS.rst).\n", "All CSDMS Ivy course material is\n", "released under [CC BY 4.0 and MIT licenses](./LICENSE.md).\n", diff --git a/README.md b/README.md index 618b073..1381a7f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ [permamodel]: ./lessons/permamodel/index.ipynb [best-practices]: ./lessons/best-practices/index.md [hpc]: ./lessons/hpc/index.md -[jhub-link]: https://lab.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fivy&urlpath=lab%2Ftree%2Fivy%2FREADME.ipynb%3Fautodecode&branch=main +[jhub-link]: https://explore.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fivy&urlpath=lab%2Ftree%2Fivy%2FREADME.ipynb%3Fautodecode&branch=main [jhub-info]: https://csdms.colorado.edu/wiki/JupyterHub [swc]: http://software-carpentry.org [swc-license]: https://github.com/swcarpentry/python-novice-inflammation/blob/gh-pages/LICENSE.md @@ -65,17 +65,17 @@ Click this button: [![Run on EarthscapeHub][badge]][jhub-link] -to open the lessons directly on the EarthscapeHub *lab* instance! +to open the lessons directly on the EarthscapeHub *explore* instance! -> **Note:** The EarthscapeHub *lab* instance is password-protected. +> **Note:** The EarthscapeHub *explore* instance is password-protected. Please contact your instructor about obtaining a login, or visit [this][jhub-info] CSDMS wiki page for more information. ## Contributing CSDMS Ivy is an open source project; -[contributions](./CONTRIBUTING.rst) that follow -the [contributor code of conduct](./CODE-OF-CONDUCT.rst) are welcomed +[contributions](./CONTRIBUTING.md) that follow +the [contributor code of conduct](./CODE-OF-CONDUCT.md) are welcomed and are [acknowledged](./AUTHORS.rst). All CSDMS Ivy course material is released under [CC BY 4.0 and MIT licenses](./LICENSE.md). diff --git a/environment.yaml b/environment.yaml index f39f7d2..d0d9cd9 100644 --- a/environment.yaml +++ b/environment.yaml @@ -29,7 +29,6 @@ dependencies: - scipy - terrainbento - tqdm - - coverage # testing - - pytest # testing + - nox - pip: - git+https://github.com/csdms/bmi-example-python.git diff --git a/lessons/best-practices/collaboration-etiquette.md b/lessons/best-practices/collaboration-etiquette.md index 7ab66be..8cb44ea 100644 --- a/lessons/best-practices/collaboration-etiquette.md +++ b/lessons/best-practices/collaboration-etiquette.md @@ -2,10 +2,10 @@ # Collaborative projects ("Gitiquette") -This lesson describes some best practices -for working on a collaborative project[1](#cp-fn1). +This lesson describes some recommended[1](#cp-fn1) best practices +for working on a collaborative project. -Some recommendations: +## Issues 1. Use issues. A good issue should describe a problem. If an error is thrown, the text of the error message should be included. Don't screenshot the @@ -20,6 +20,12 @@ Some recommendations: repository owner gets to make the final decision on what solution should be implemented. +1. Avoid responding to GitHub issues by email--it + obscures the context of the issue and adds extra + text to the thread on GitHub. + +## Branches + 1. Create a new branch to make any changes to source code. Avoid working on the default branch, if possible. @@ -27,6 +33,8 @@ Some recommendations: on your local repository and pull down changes from the remote, if necessary. +## Tests + 1. Write new tests to address any changes you make. Don't remove old tests; if necessary, modify them, e.g., if the changes aren't backward compatible. Any new code added shouldn't cause old tests to @@ -40,6 +48,8 @@ Some recommendations: 1. Writing good tests is a learned skill. It takes time. +## Pull requests + 1. When you've finished making changes, and all your tests pass, make a pull request back to the upstream repository. Be sure to argue your case in your pull @@ -48,17 +58,13 @@ Some recommendations: 1. It's a good idea to request a reviewer on a pull request. -1. Avoid responding to GitHub issues and pull requests by email--it - obscures the context of the issue or pull request, and adds extra - text to the thread on GitHub. - 1. It's good to review the the test results from continuous integration on each pull request, even when successful. 1. If you're the repository owner, only merge pull requests when all tests pass. The default branch of a repository should always be clean and working. -And here are a few recommendations for software development: +## Python distribution 1. Avoid using the system Python on a computer. It's usually a dependency for other operating system tools, which makes it hard to update. For stability, it's also often a few releases behind the current version. @@ -72,19 +78,23 @@ And here are a few recommendations for software development: 1. Tools installed with the operating system, like `git` or `make`, may also be out of date and hard to update. They can be installed through `conda`. +## General + +1. Avoid including data (input or output) in a source code repository. There's some gray area for data + used in an example, but the data should be small. + 1. Build scientific visualizations programmatically, ideally using an open source language or, secondarily, a scriptable open source visualization tool. 1. Don't alter a visualization manually (e.g., using commercial software such as Adobe Illustrator) after creating it. This breaks reproducibility. -1. Avoid including data in a source code repository. There's some gray area for data - used in an example, but the data should be small. +1. Don't use ChatGPT. It provides answer-shaped objects, not answers. Use collected wisdom sites like Stack Overflow instead. 1. Software isn't finished until it has tests and documentation. 1. Write code for your future self. -If you have suggestions for other best practices, -please submit them as an [issue](https://github.com/csdms/ivy/issues) +If you have a suggestion for a best practice, +please submit it as an [issue](https://github.com/csdms/ivy/issues) to the Ivy repository! @@ -102,7 +112,7 @@ If all else fails, just remember: be kind. * A GitHub [blog post](https://github.blog/2015-01-21-how-to-write-the-perfect-pull-request/) on writing a good pull request -1: Many of these recommended behaviors are +1: Many of these recommendations are the result of mistakes I've made. *--MP* ___ diff --git a/lessons/best-practices/continuous-integration.md b/lessons/best-practices/continuous-integration.md index 8987785..d83337a 100644 --- a/lessons/best-practices/continuous-integration.md +++ b/lessons/best-practices/continuous-integration.md @@ -26,51 +26,70 @@ on: [push, pull_request] jobs: test: - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. Without this if check, checks are duplicated since - # internal PRs match both the push and pull_request events. if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.9", "3.10", "3.11", "3.12"] + + runs-on: ${{ matrix.os }} + + defaults: + run: + shell: bash -l {0} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 + with: + python-version: "${{ matrix.python-version }}" + miniforge-variant: Mambaforge + miniforge-version: latest - - name: Install dependencies - run: pip install pytest coverage + - name: Install nox + run: pip install nox - - name: Test for files - run: | - test -d ./lessons/best-practices - test -f ./lessons/best-practices/examples.py - test -f ./lessons/best-practices/test_examples.py + - name: Test + run: nox -s test - - name: Run pytest and coverage - run: coverage run -m pytest + test-notebooks: + + if: + github.event_name == 'push' || + github.event.pull_request.head.repo.full_name != github.repository - - name: Show coverage report - run: coverage report + name: Test the notebooks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: conda-incubator/setup-miniconda@v3 + with: + python-version: "3.11" + miniforge-variant: Mambaforge + miniforge-version: latest + + - name: Install nox + run: pip install nox + + - name: Test + env: + MPLBACKEND: "Agg" + OPENTOPOGRAPHY_API_KEY: ${{ secrets.OPENTOPOGRAPHY_API_KEY }} + run: nox -s test-notebooks --python "3.11" ``` + In this configuration file, -we instruct Actions to run the "test" job on Linux, -only on pushes and external pull requests to the repository, -using a default Python distribution. -We have very little code to test in the Ivy repository, -but we do have the unit testing example from the previous section. -Use `pip` to install the *pytest* and *coverage* packages -into the default Python distribution. -Run `pytest` and `coverage` from the root of the repository, -checking beforehand that the sample files exist. -Afterward, -view the coverage report. +we instruct Actions to run the *test* and *test-notebooks* jobs on Linux, macOS, and Windows, +for a set of Python versions, +but only on pushes and external pull requests to the repository. If anything fails in this process, Actions stops and issues an error message. -The first run of the "test" job on the Ivy repository [passed](https://github.com/csdms/ivy/runs/2558250304?check_suite_focus=true). -Success! +Check the [history of runs](https://github.com/csdms/ivy/actions/workflows/test.yml) of the *test* and *test-notebooks* jobs on the Ivy repository. For more comprehensive examples of Actions configuration files, including multiple jobs, diff --git a/lessons/conda/index.md b/lessons/conda/index.md index 78e27c5..51b5a3a 100644 --- a/lessons/conda/index.md +++ b/lessons/conda/index.md @@ -77,8 +77,7 @@ dependencies: - scipy - terrainbento - tqdm - - coverage # testing - - pytest # testing + - nox - pip: - git+https://github.com/csdms/bmi-example-python.git ``` diff --git a/lessons/editors/index.md b/lessons/editors/index.md index 9d74569..df05562 100644 --- a/lessons/editors/index.md +++ b/lessons/editors/index.md @@ -54,7 +54,6 @@ text editors that are typically installed on a UNIX-based operating system inclu A sampling of other prominent text editors (some of which you have to pay for) includes [VS Code][code], [Sublime Text][sublime], -[Atom][atom], [TextMate][textmate] (macOS), [Nova][nova] (macOS), and [Notepad++][nppp] (Windows). @@ -116,7 +115,6 @@ Don't get so attached to your text editor that you think your choice is superior -[atom]: https://en.wikipedia.org/wiki/Atom_(text_editor) [code]: https://en.wikipedia.org/wiki/Visual_Studio_Code [editor-war]: https://en.wikipedia.org/wiki/Editor_war [emacs]: https://en.wikipedia.org/wiki/Emacs diff --git a/lessons/git/configuring-git.md b/lessons/git/configuring-git.md index caa7c09..76482f9 100644 --- a/lessons/git/configuring-git.md +++ b/lessons/git/configuring-git.md @@ -1,8 +1,8 @@ ![Ivy logo](https://raw.githubusercontent.com/csdms/ivy/main/media/logo.png) -# Configuring git +# Configuring Git -When using `git` for the first time on a computer, +When using Git for the first time on a computer, some setup is required. Start by opening a terminal (your preferred terminal app on Linux or macOS; @@ -31,10 +31,8 @@ You can also set the default editor used with `git`: $ git config --global core.editor "nano -w" ``` We'll use `nano` by default, -but if you prefer a different editor, -the Software Carpentry [lesson](https://swcarpentry.github.io/git-novice/02-setup/index.html) -on version control has a summary table -with configuration commands for various editors. +but if you prefer a different editor (like `vim` or `emacs`), +this is how it can be set. Check the configuration you set: ``` @@ -86,7 +84,7 @@ the full [git documentation](https://git-scm.com/docs) is available online. `git`: -* needs to be configured on a computer before it's used +* should be configured on a computer before it's used * uses subcommands * provides several ways to get help diff --git a/lessons/git/index.md b/lessons/git/index.md index ffd670d..c3dfeee 100644 --- a/lessons/git/index.md +++ b/lessons/git/index.md @@ -1,10 +1,10 @@ ![Ivy logo](https://raw.githubusercontent.com/csdms/ivy/main/media/logo.png) -# Introduction to version control with git and GitHub +# Introduction to version control with Git and GitHub In this lesson we'll learn about *version control*, a process for tracking changes to files on a computer. -We'll use [git](https://git-scm.com/), +We'll use [Git](https://git-scm.com/), a free and open source distributed version control system, and [GitHub](https://github.com/), a company that provides hosting for software development and version control @@ -13,7 +13,7 @@ built on `git`. *Learning objectives:* * Understand version control concepts -* Configure `git` and GitHub on a computer +* Configure Git and GitHub on a computer * Understand basic `git` commands * Get exposure to some intermediate/advanced `git` commands * Know where to get help, or more information @@ -49,20 +49,21 @@ Here are some examples... This lesson on version control continues in the following sections. -1. [Configuring git and GitHub](./configuring-git.md) +1. [Configuring Git and GitHub](./configuring-git.md) 1. [GitHub authentication](./github-authentication.md) 1. [A version control workflow](./git-workflow.md) ## Resources -* A [git command cheatsheet](https://education.github.com/git-cheat-sheet-education.pdf) from GitHub -* The full [git documentation](https://git-scm.com/docs) +* The full [Git documentation](https://git-scm.com/docs) * The full [GitHub documentation](https://docs.github.com) * In the GitHub documentation: * [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) * [Generating a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) * [Adding a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) +* A [git command cheatsheet](https://education.github.com/git-cheat-sheet-education.pdf) from GitHub * A (great) BSSw blog post: [A Different Way of Looking at Git](https://bssw.io/blog_posts/a-different-way-of-looking-at-git) * [The Basics of Git and GitHub](https://github.com/comses-education/github-starter-course) from [CoMSES Net](https://comses.net/) +* [Top 12 Git commands every developer must know](https://github.blog/2024-06-10-top-12-git-commands-every-developer-must-know/) from the [GitHub blog](https://github.blog/) * Software Carpentry [lesson](https://swcarpentry.github.io/git-novice/) on version control diff --git a/lessons/hpc/cluster-computing-overview.md b/lessons/hpc/cluster-computing-overview.md index e0f2a2d..8209e78 100644 --- a/lessons/hpc/cluster-computing-overview.md +++ b/lessons/hpc/cluster-computing-overview.md @@ -18,10 +18,12 @@ Through the use of specially designed software, the nodes of a cluster act as a single computer. -A typical cluster is diagrammed here: +A typical cluster is diagrammed Figure 1: ![A typical cluster computer configuration. (Public domain image from https://en.wikipedia.org/wiki/File:Beowulf.png)](https://upload.wikimedia.org/wikipedia/commons/4/40/Beowulf.png) +*Figure 1: A typical cluster computer configuration, showing head and compute nodes. (Public domain image from https://en.wikipedia.org/wiki/File:Beowulf.png).* + Note how the outside world can only communicate with the cluster through the server (i.e., the head node, in the terminology we're using); the compute nodes are hidden. diff --git a/lessons/jupyter/index.md b/lessons/jupyter/index.md index ab9af2a..338463e 100644 --- a/lessons/jupyter/index.md +++ b/lessons/jupyter/index.md @@ -29,9 +29,9 @@ Click this button: [![Run on EarthscapeHub][badge]][jhub-link] -to open the lessons directly on the EarthscapeHub *lab* instance! +to open the lessons directly on the EarthscapeHub *explore* instance! -> **Note:** The EarthscapeHub *lab* instance is password-protected. +> **Note:** The EarthscapeHub *explore* instance is password-protected. Please contact your instructor about obtaining a login, or visit [this][jhub-info] CSDMS wiki page for more information. @@ -88,8 +88,8 @@ The majority of the CSDMS Ivy course material is built as notebooks. [badge]: https://img.shields.io/badge/Run%20on-EarthscapeHub-orange -[jhub]: https://lab.openearthscape.org -[jhub-link]: https://lab.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fivy&urlpath=lab%2Ftree%2Fivy%2FREADME.ipynb%3Fautodecode&branch=main +[jhub]: https://explore.openearthscape.org +[jhub-link]: https://explore.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fivy&urlpath=lab%2Ftree%2Fivy%2FREADME.ipynb%3Fautodecode&branch=main [jhub-info]: https://csdms.colorado.edu/wiki/JupyterHub [ipython]: https://ipython.org/ [jupyter]: https://jupyter.org/ diff --git a/lessons/python/modules.md b/lessons/python/modules.md index 6029821..a11de58 100644 --- a/lessons/python/modules.md +++ b/lessons/python/modules.md @@ -307,6 +307,7 @@ The [Modules](https://docs.python.org/3/tutorial/modules.html) section of the Python documentation was used to write this lesson. While this lesson introduces the basics of packaging, -there's much more to learn, -and the best place to look for more information -is the PyPA's [Python Packaging User Guide](https://packaging.python.org/). +there's much more to learn. +For more information, +see the PyPA's [Python Packaging User Guide](https://packaging.python.org/) +and pyOpenSci's [Python Package Guide](https://www.pyopensci.org/python-package-guide/). diff --git a/lessons/shell/nbgitpuller-link.sh b/lessons/shell/nbgitpuller-link.sh index 26bedc3..44a4e73 100644 --- a/lessons/shell/nbgitpuller-link.sh +++ b/lessons/shell/nbgitpuller-link.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash # Make links through the nbgitpuller-link CLI. -HUB=https://lab.openearthscape.org +HUB=https://explore.openearthscape.org REPO=https://github.com/csdms/ivy BRANCH=main FILE=lessons/pymt/index.ipynb diff --git a/lessons/shell/short-shell.md b/lessons/shell/short-shell.md index e569bc7..15f836c 100644 --- a/lessons/shell/short-shell.md +++ b/lessons/shell/short-shell.md @@ -51,9 +51,11 @@ We can drill down through directories by providing arguments to `ls`. For example, to see the contents of the **ivy** directory, type: ``` $ ls ivy -AUTHORS.rst CONTRIBUTING.rst README.md lessons pytest.ini -CITATION.cff LICENSE.md environment.unix.yaml media -CODE-OF-CONDUCT.rst README.ipynb environment.yaml noxfile.py +AUTHORS.rst LICENSE.md lessons +CHANGES.md README.ipynb media +CITATION.cff README.md noxfile.py +CODE-OF-CONDUCT.md environment.unix.yaml pyproject.toml +CONTRIBUTING.md environment.yaml pytest.ini ``` You can see that the CSDMS Ivy lesson files @@ -62,8 +64,10 @@ We can drill further; for example, to see into the directory containing lessons, type: ``` $ ls ivy/lessons -best-practices conda git jupyter permamodel python shell -bmi editors hpc landlab pymt requirements.in +best-practices git permamodel shell +bmi hpc pymt +conda jupyter python +editors landlab requirements.in ``` ## Changing directories diff --git a/pytest.ini b/pytest.ini index f65547a..a9afe8f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -20,3 +20,4 @@ addopts = --ignore-glob=*/create_a_component.ipynb --ignore-glob=*/landlab-fault-scarp-for-espin.ipynb --ignore-glob=*/intro-to-grids.ipynb + --ignore-glob=*/pymt/*.ipynb