Giter VIP home page Giter VIP logo

tutorials's People

Contributors

davidlitwin avatar giuseppecipolla95 avatar gregtucker avatar jadams15 avatar jennyknuth avatar kbarnhart avatar margauxmouchene avatar mcflugen avatar nathanlyons avatar nicgaspar avatar siccarpoint avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tutorials's Issues

Update all tutorial's to point to tutorial page on RTFD instead of the wiki

As part of the LL2.0 update of the tutorials (to occur after @gregtucker 's marathon updating of the tutorials 🏃 !), we will need to remove the references to the wiki

Most of them contain the following text:

For more Landlab tutorials, click here: https://github.com/landlab/landlab/wiki/Tutorials

and this points to the wiki. This URL will need to change to the url on RTFD for the tutorials.

We will also want to make sure that all links between notebooks are relative (e.g., don't reference binder, or nbviewer, or local...) which will mean they will work everywhere.

Similar to @gregtucker 's current 1.x best practices improvements, this can be a pre 2.0 improvement.

New notebooks break the CI tests

@ChristinaB - your merge for PR #40 broke the tutorials continuous integration. One of the reasons for this is that the notebooks rely on geopandas but nowhere is the dependency described (e.g. in a requirements.txt file). Since the builds fail on that line, its hard to tell if that is the only place there is a problem or if there are others (e.g. if these notebooks take a long time to run, the tests will time out and fail).

I've assigned @saisiddu only because I can't seem to assign @ChristinaB

Link to `landlab-fault-scarp.py` is broken

The link to landlab-fault-scarp.py in this tutorial is broken and needs to be removed or replaced. Line 401.

Minor inconvenience but if anybody knows where this file went (I tried searching the landlab repos), do throw it into this tutorial to fix this.

MatplotlibDeprecationWarning on gca() in the FlowDirector and FlowAccumulator nbks

The function surf_plot() in the three notebooks compare_FlowDirectors, the_FlowAccumulator, the_FlowDirectors, instantiate the axes of a figure by the call
ax = fig.gca(projection='3d').

This call raises the following warning:
/srv/conda/envs/notebook/lib/python3.7/site-packages/ipykernel_launcher.py:26: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().

Running tests locally

I don't appear to be able to run the tests locally using the unix script (or the python script come to that, as the error below indicates). The shell script throws:

Traceback (most recent call last):
Traceback (most recent call last):
  File "./run_notebook.py", line 14, in <module>
  File "./run_notebook.py", line 14, in <module>
    from scripting.unix import system, check_output
    from scripting.unix import system, check_output
ImportError: ImportErrorNo module named scripting.unix: 
No module named scripting.unix

I tried conda install scripting, but it claimed such a package doesn't exist.

What's up here? I should note I'm running zsh, not bash, if that's relevant.

CI broken

Around the time 3.8 was released, everything started breaking.

I'm on vacation, so I'm not going to deal with this, but the issue serves to put a pin in it.

Unexpanded and Python script tutorials

In most of the tutorial folders we have three versions of each tutorial. Two are Jupyter notebooks that should be the same except one is unexpanded (ends in _unexpanded.ipynb) and the other expanded. The third is the notebook saved as a .py file.

I propose we get rid of the _unexpanded.ipynb and .py files and just keep a single version of the tutorial in our repository. The main reasons being it's easier to maintain one version and reduces the risk of the three files falling out of sync.

What do folks think?

Is topographic__gradient really an input field in making_components.ipynb?

In the component making tutorial, topographic__gradient doesn’t appear to be an input field. I say that because:

  1. It’s created if it’s missing.
  2. Even if it isn’t missing, it automatically gets immediately overwritten during instantiation with a new set of values.

That sounds like an output field to me, not an input field. It might be ambiguous if there was some testing performed to use the values if provided but to calculate gradients if not, but that's not happening. Ergo, this is a straight-up output field as written.

Probably needs to be fixed by @gregtucker, as he wrote this and it feels a bit cheeky just to change.

user warning in flexure tutorial

at step 3 get this user warning:

/Users/jennyknuth/anaconda/lib/python2.7/site-packages/matplotlib/init.py:1350: UserWarning: This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called before pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

warnings.warn(_use_error_msg)

Is there any way to produce less channels?

I created a 500*1000 grid. After evolving over thousands of years, almost 30 channels formed. But the more rivers there are, the easier it is to river capture. So I want tu focus on just about 5 rivers. Is there any way to control the number of rivers?

Tutorial teaches creating blank grid fields

But this seems not to be the preferred approach in polished Landlab components. The tutorial should reflect whichever approach (create a blank field, throw an error, whatever) is preferred.

Better tests for next

Rather than testing PRs that want to merge into next against the conda install (which we should expect to break). We should test these PRs against the developer version master branch.

Unable to import FlowAccumulator

It appears that the flow direction and accumulation tutorials are not working with the latest landlab release. The error that I get is,

>>> from landlab.components import FlowAccumulator 
ImportError: cannot import name FlowAccumulator

I think the problem is probably just that the tutorials under flow_direction_and_accumulation were written for the development version of landlab that's in master - not the latest release (v1.0.3). I propose we move these tutorials to a new branch (and remove them from master) until we have a new release that fixes this problem.

All the tutorials on the master branch should work with the latest released version of landlab. (at least that's what I remember us agreeing to)

Or we could do something like we do with landlab and have a release branch with tags that point to the version of landlab that the tutorials work with and have master work with the development version of landlab. But that that's another issue.

Binder: dask module absent, which make lithology_and_litholayers nbk fail

When I try to run the landlab notebook lithology_and_litholayers
(https://hub.gke2.mybinder.org/user/landlab-landlab-2wyz3sai/notebooks/notebooks/tutorials/lithology/lithology_and_litholayers.ipynb) on binder, an error is raised:

ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_640/3503426862.py in
5 import numpy as np
6 import xarray as xr
----> 7 import dask
8
9 import matplotlib

ModuleNotFoundError: No module named 'dask'

Is there any way to produce less channels?

I created a 500*1000 grid. After evolving over thousands of years, almost 30 channels formed. But the more rivers there are, the easier it is to river capture. So I want tu focus on just about 5 rivers. Is there any way to control the number of rivers?

Adding a note to install landlab_dev wiki

I recently did a re-install of anaconda and the landlab development code as per the instructions on:
https://github.com/landlab/landlab/wiki/Installing-Landlab-from-source-code-(%22developer-install%22)

It took a hint from @kbarnhart, though, to realize that I needed to run conda install spyder (and then spyder) while in the landlab_dev environment in order run an instance of spyder that can access landlab. It might be nice to include a more generalized note about this on the landlab source code wiki page.

wrong link to Lithology docs

In the Lithology and LithoLayers tutorial the link to the full Litholayers documentation is incorrect. It points to layers.litholayers. I think it should be components.litholayers.

clarify Part 3 example in Lithology tutorial

This is really just a suggestion, but I spent a while trying to understand the use of the rock_id keyword in lith2.run_one_step(). While it may seem repetitive, I think it will help the reader to follow if you add comments before the run_one_step() calls in Part 3. Of course, I had read in the text above that you were doing this because LinearDiffuser() may deposit material. But, by the time I got down to the code I had forgotten this and spent about 15 min in the docs sorting it out (then ultimately remembering I had seen that above). I think it will save folks a bit of time if you: 1) make an explicit statement in the text at the start of part 3 that you have to use rock_id in run_one_step any time material is deposited. 2) Insert comments above the three calls to run_one_step that remind the reader why that parameter is there, as well as why it is changing from 0 to 1 to 0. In general, clarity would probably be improved by scattering more comments throughout the tutorial code.

Update tutorials for Landlab 2.0

Prior to the release of Landlab 2.0, we need to:

  • update tutorial notebooks for current (1.x) usage where needed
  • update tutorials to work with 2.0 where needed
  • verify each tutorial (either it will work with 2.0 or has a version ready for 2.0)

Update animation tutorial

The animation tutorial seems to be producing blank output in some cases. I recommend modifying it to use MPL's FuncAnimation, which I've had good luck with recently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.