From 2ff7dcaff2294ae6a6e469eefa7b8ef6ad144f91 Mon Sep 17 00:00:00 2001 From: jorgensd Date: Tue, 13 Sep 2022 11:31:11 +0200 Subject: [PATCH 1/4] Add contributing guidelines and clean up makefile --- CONTRIBUTING.md | 9 +++++++++ Makefile | 23 ++++++++++++++++------- README.md | 13 +++++++++++++ docs/_toc.yml | 1 + 4 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 CONTRIBUTING.md 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..4a95d2c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,21 @@ # 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. + + + +## 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 From 4d85317a0e1ef22b010871dac3e3f9163d1e5355 Mon Sep 17 00:00:00 2001 From: jorgensd Date: Tue, 13 Sep 2022 11:42:11 +0200 Subject: [PATCH 2/4] Add citation file and more docs --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 4a95d2c..183b1e8 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ This repository is a template for how to set up a reproducible python environmen 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](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 From 024406dbd1a730cd8b551f54b6fa0cae6e2d39e1 Mon Sep 17 00:00:00 2001 From: jorgensd Date: Tue, 13 Sep 2022 11:42:22 +0200 Subject: [PATCH 3/4] Actually add file --- CITATION.cff | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CITATION.cff 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 From 0e18b20e1572449000861876e3a652d15bdd911e Mon Sep 17 00:00:00 2001 From: jorgensd Date: Tue, 13 Sep 2022 11:46:33 +0200 Subject: [PATCH 4/4] Remove citation.cff link in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 183b1e8..a701549 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To be able to create a python package, we need a folder with the name of the pac ## Make a repository citable -The easiest way to make your repository citable is to add a [CITATION.cff](CITATION.cff) file to the repository, as it is supported by both +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