Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Dokken"
given-names: "Jørgen S."
orcid: "https://orcid.org/0000-0001-6489-8858"
title: "Template for reproducible research"
version: 0.1.0
date-released: 2022-09-13
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing

To contribute to this repository:
1. Create a [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) of the repository.
2. [Clone](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) the forked repository.
3. Checkout a new branch (using `git checkout -b name_of_branch`), where name of branch should be replaced by `your_github_username/description_of_feature`. For instance, `jorgensd/add_guidelines`.
4. Add your contribution and push it to your fork.
5. Make a [pull request from your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).

23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
doc: # Generate Sphinx HTML documentation, including API docs
# We want to use the README.md file from the folder as the front page of the book.
# It has been added to _toc.yml as root
cp README.md docs/README.md
# We want to use the demos in the book, we convert them with jupytext and copy them to the documentation
jupytext --to=ipynb demo/demo.py --output=docs/demo.ipynb
jupyter book build docs
# We want to use the README.md and contributing.md file from this folder
# in the Jupter book. These files should be listed in `docs/_toc.yml`
DOCS = README.md CONTRIBUTING.md

# List of Python demos (without file extenion) from the repo `demo` to include in the jupyterbook.
# These files should be listed in `docs/_toc.yml`
DEMOS = demo

doc: # Generate Sphinx HTML documentation, including API docs
@for file in ${DOCS}; do \
cp $$file docs/. ;\
done
@for demo in ${DEMOS}; do \
jupytext --to=ipynb demo/$$demo.py --output=docs/$$demo.ipynb ;\
jupyter book build -W docs ;\
done

clean-pytest: # Remove output from pytest
rm -rf .pytest_cache
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# Reproducible workflow for researchers
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://jorgensd.github.io/reproducibility)
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)

This repository is a template for how to set up a reproducible python environment with GitHub.

## Python-packaging

To be able to create a python package, we need a folder with the name of the package (in this repository `mypackage`), and a `pyproject.toml` file.


## Make a repository citable
The easiest way to make your repository citable is to add a `CITATION.cff` file to the repository, as it is supported by both
[Zenodo's](https://zenodo.org/) and it's [Github integration](https://docs.github.com/en/repositories/archiving-a-github-repository/referencing-and-citing-content) and [Github](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files) itself.

## Contributing

Contributions are always welcome!

See [CONTRIBUTING.md](CONTRIBUTING.md) for ways to get started.

A good idea is to look at the [issue tracker](https://github.com/jorgensd/reproducibility/issues) and see if you can resolve any open issues.

If you find a bug in the source code, please [open an issue](https://github.com/jorgensd/reproducibility/issues/new).
1 change: 1 addition & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ root: README
chapters:
- file: "demo"
- file: "api"
- file: "CONTRIBUTING"