Skip to content

Commit 2998ead

Browse files
authored
Add contributing guidelines and clean up makefile (#17)
* Add contributing guidelines and clean up makefile * Add citation file and more docs * Actually add file * Remove citation.cff link in readme
1 parent bc2a4db commit 2998ead

File tree

5 files changed

+51
-7
lines changed

5 files changed

+51
-7
lines changed

CITATION.cff

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
authors:
4+
- family-names: "Dokken"
5+
given-names: "Jørgen S."
6+
orcid: "https://orcid.org/0000-0001-6489-8858"
7+
title: "Template for reproducible research"
8+
version: 0.1.0
9+
date-released: 2022-09-13

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Contributing
2+
3+
To contribute to this repository:
4+
1. Create a [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) of the repository.
5+
2. [Clone](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) the forked repository.
6+
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`.
7+
4. Add your contribution and push it to your fork.
8+
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).
9+

Makefile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
doc: # Generate Sphinx HTML documentation, including API docs
2-
# We want to use the README.md file from the folder as the front page of the book.
3-
# It has been added to _toc.yml as root
4-
cp README.md docs/README.md
5-
# We want to use the demos in the book, we convert them with jupytext and copy them to the documentation
6-
jupytext --to=ipynb demo/demo.py --output=docs/demo.ipynb
7-
jupyter book build docs
1+
# We want to use the README.md and contributing.md file from this folder
2+
# in the Jupter book. These files should be listed in `docs/_toc.yml`
3+
DOCS = README.md CONTRIBUTING.md
4+
5+
# List of Python demos (without file extenion) from the repo `demo` to include in the jupyterbook.
6+
# These files should be listed in `docs/_toc.yml`
7+
DEMOS = demo
8+
9+
doc: # Generate Sphinx HTML documentation, including API docs
10+
@for file in ${DOCS}; do \
11+
cp $$file docs/. ;\
12+
done
13+
@for demo in ${DEMOS}; do \
14+
jupytext --to=ipynb demo/$$demo.py --output=docs/$$demo.ipynb ;\
15+
jupyter book build -W docs ;\
16+
done
817

918
clean-pytest: # Remove output from pytest
1019
rm -rf .pytest_cache

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
# Reproducible workflow for researchers
22
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://jorgensd.github.io/reproducibility)
3+
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
34

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

67
## Python-packaging
78

89
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.
10+
11+
12+
## Make a repository citable
13+
The easiest way to make your repository citable is to add a `CITATION.cff` file to the repository, as it is supported by both
14+
[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.
15+
16+
## Contributing
17+
18+
Contributions are always welcome!
19+
20+
See [CONTRIBUTING.md](CONTRIBUTING.md) for ways to get started.
21+
22+
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.
23+
24+
If you find a bug in the source code, please [open an issue](https://github.com/jorgensd/reproducibility/issues/new).

docs/_toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ root: README
44
chapters:
55
- file: "demo"
66
- file: "api"
7+
- file: "CONTRIBUTING"

0 commit comments

Comments
 (0)