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

DemARKs to Examples #472

Merged
merged 8 commits into from
Feb 5, 2020
Merged

DemARKs to Examples #472

merged 8 commits into from
Feb 5, 2020

Conversation

@sbenthall
Copy link
Contributor Author

These two appear to be near duplicates. Also, the DemARK here is a submodule pulled in to the ReadTheDocs, which adds another wrinkle of complexity to the transfer.
https://github.com/econ-ark/DemARK/blob/master/notebooks/Gentle-Intro-To-HARK.ipynb
https://github.com/econ-ark/DemARK/blob/master/notebooks/Gentle-Intro-To-HARK-PerfForesightCRRA.ipynb

These three notebooks are definitely documentation and linked, as they are each documentation for a model within ConsIndShockModel
https://github.com/econ-ark/DemARK/blob/master/notebooks/PerfForesightConsumerType.ipynb
https://github.com/econ-ark/DemARK/blob/master/notebooks/IndShockConsumerType.ipynb
https://github.com/econ-ark/DemARK/blob/master/notebooks/KinkedRconsumerType.ipynb

The last of these is currently included as a submodule, along with the Gentle Introduction.

For the purpose of this PR, until I hear otherwise, I'll assume that the scope of this work is to:

  • move all these notebooks into the HARK/examples directory
  • figure out how to get Sphinx pointed at them from the HARK directory, which would remove the need for the submodules in the Documentation/ directory.

@sbenthall
Copy link
Contributor Author

The differences between the two Gentle Introduction notebooks is:

  • One uses Aleph for surival probability, the other uses 1 - D.
  • The Gentle-Intro-To-HARK.ipynb has a second model, adding Income shocks.

This extended one is the one pulled into RTD. So I think the Gentle-Intro-To-HARK-PerfForesightCRRA.ipynb must be an artifact that can be deleted.

@sbenthall
Copy link
Contributor Author

What remains for this PR is getting Sphinx to read in the notebooks from the examples/ directory instead of from Documentation/submodules/.

I haven't figured out how to do this yet--it's tricky.

But I think it will be easier to do after PR's #469 (changing the RTD index) and #455 (refactoring ConsumptionSaving) have been merged.

@sbenthall
Copy link
Contributor Author

Rule of Thumb: If the name of a notebook is a name of a type, then that notebook is just documentation of that type, and can go into the examples directory.

@MridulS
Copy link
Member

MridulS commented Jan 23, 2020

@sbenthall to add the examples (from DemARK) to sidebar https://github.com/econ-ark/HARK/blame/master/Documentation/index.rst#L31

@sbenthall
Copy link
Contributor Author

Reviewing the DemARKs in light of this rule of thumb, I'm now slating the following notebooks for moving to examples/

  • ConsPortfolioModelDoc.ipynb
  • GenIncProcessModel.ipynb
  • TractableBufferStockQuickDemo.ipynb

@llorracc
Copy link
Collaborator

llorracc commented Feb 4, 2020 via email

@sbenthall
Copy link
Contributor Author

sbenthall commented Feb 4, 2020

Here is the current build of the documentation on this branch:
https://hark-sb.readthedocs.io/en/i459/

There's one trick about the documentation build.
I couldn't figure out how to get Sphinx to look outside of the Documentation/ directory for notebooks.
So in this PR, there is a directory Documentation/example_notebooks/ that contains symbolic links to the notebooks in the examples directory.

As you can see on my RTD build, Sphinx is able to follow these links, which are maintained in the git checkout.

@sbenthall
Copy link
Contributor Author

econ-ark/DemARK#86 for the TractableBufferstock rename issue. That can't be resolved in this PR because it's a DemARK issue.

@sbenthall
Copy link
Contributor Author

Made issue for the points about the notebook names here #488
I think it's better to address this in a systematic way rather than whack-a-moling.

@sbenthall sbenthall changed the title [WIP] DemARKs to Examples DemARKs to Examples Feb 4, 2020
@sbenthall
Copy link
Contributor Author

This is ready for review. Requesting one from @MridulS

@sbenthall sbenthall requested a review from MridulS February 4, 2020 20:27
@sbenthall sbenthall self-assigned this Feb 4, 2020
@MridulS
Copy link
Member

MridulS commented Feb 5, 2020

all links on readthedocs look happy!

@MridulS MridulS merged commit ecb8867 into econ-ark:master Feb 5, 2020
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.

3 participants