HEGSRR / HEGSRR-Template

Template documents and packages for study pre-registration, reproductions, and replications
https://hegsrr.github.io/HEGSRR-Manual
BSD 3-Clause "New" or "Revised" License
13 stars 5 forks source link

template code #12

Closed josephholler closed 1 year ago

josephholler commented 1 year ago
doabell commented 1 year ago

Preliminary work done in commit 8209ab8 - soliciting comments.

josephholler commented 1 year ago

Good start!

Let's strip out the default content, as I just did in 028ffb4ab75d5addf3e27b55e32c2ec041b628a8 and add in creation of the main here() paths in both the .rmd and .ipynb ?

Is there a more foolproof option for a jupyter notebook to write environment info as the notebook is run, without requiring folks to remember to run something afterward?

josephholler commented 1 year ago

over the next week, can we:

josephholler commented 1 year ago

@doabell : I'm curious what you think about having a separate environment set-up script / instruction file for python, which would install pipenv, pigar, and pyhere and contain the instructions for cleaning the environment.txt file?

Then the computational environment section of the python notebook would contain the normally-skipped code to 1) install packages using environment.txt and 2) generate the environment.txt, as well as code that will always be run to load packages and set pyhere paths analogous to the R here paths in the rmd template.

Separating these initial installs would declutter the notebook from the one-time tasks of setting up the basic python environment. However, would dividing it up like this make it any more difficult to use services like Binder?

If we split into two, it'd be:

00-Python-environment-setup.py (easier as script or as notebook?) 01-Jupyter_notebook.ipynb

doabell commented 1 year ago

@josephholler Sure, that does indeed makes more sense 00-Python-environment-setup.ipynb would still be a notebook, perhaps with "record" and "install" chunks.

josephholler commented 1 year ago

Ok, you can try doing it. I think the record step still needs to be in the main 01-Jupyter_notebook.ipynb notebook, because that is where the packages will be loaded. Also, the package loading makes sense in the main notebook as part of the documentation of the computational environment.

josephholler commented 1 year ago

@doabell

Wrapping up some final edits to this template, there are a few more things /w the jupyter notebook:

# Acknowledgements

- `Funding Name`: name of funding for the project
- `Funding Title`: title of project grant
- `Award info URI`: web address for award information
- `Award number`: award number

This report is based upon the template for Reproducible and Replicable Research in Human-Environment and Geographical Sciences, DOI:[10.17605/OSF.IO/W29MQ](https://doi.org/10.17605/OSF.IO/W29MQ)
josephholler commented 1 year ago

Seems like notebook metadata may not be straightforward... we can pause that thought and the related heading levels.

josephholler commented 1 year ago

Done, until there's a neat package for generating a .bib file for python packages used in a compendium.