diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..9addc9b --- /dev/null +++ b/CITATION.cff @@ -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 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4a3811a --- /dev/null +++ b/CONTRIBUTING.md @@ -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). + diff --git a/Makefile b/Makefile index ba34edd..75906e5 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index de199b2..a701549 100644 --- a/README.md +++ b/README.md @@ -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). \ No newline at end of file diff --git a/docs/_toc.yml b/docs/_toc.yml index 171dc8f..eb1293b 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -4,3 +4,4 @@ root: README chapters: - file: "demo" - file: "api" + - file: "CONTRIBUTING" \ No newline at end of file