|
| 1 | +# Re-Pro |
| 2 | + |
| 3 | +This repository helps you set up a reproducibility proof for your project. It's pretty simple, trust me. |
| 4 | + |
| 5 | +## About provable reproducibility |
| 6 | + |
| 7 | +There is an age-old saying in the Swiss army: |
| 8 | + |
| 9 | +> Vertrauen ist gut; Kontrolle ist besser. |
| 10 | +
|
| 11 | +> Trust is good; checking is better. |
| 12 | +
|
| 13 | +How can scientists unmistakably know whether their results can be reproduced by other people? How can reviewers verify that a certain numerical experiment in an article is correct? And how can collaborators quickly understand how to use the source code you have written for your project? |
| 14 | + |
| 15 | +Provable reproducibility is an initiative, which pursues the goal of making results published in articles, theses, and software packages easy to reproduce and verify. No more ambiguity, data manipulation, cherry-picked parameters, and hand-crafted results. Every figure, plot, and table in a provably reproducible project can be unequivocally traced back to where it originated from. |
| 16 | + |
| 17 | +## Quick start |
| 18 | + |
| 19 | +To add provable reproducibility to your GitHub repository, run the following command: |
| 20 | + |
| 21 | +```[bash] |
| 22 | +git pull https://github.com/FMatti/Re-Pro <preset> |
| 23 | +``` |
| 24 | + |
| 25 | +You may choose from the following presets: |
| 26 | + |
| 27 | +| Preset | Description | |
| 28 | +| ------ | ------------- | |
| 29 | +| python-latex | Python scripts and LaTeX project | |
| 30 | +| python-latex-bibtex | Python scripts and LaTeX project with BibTeX bibliography component | |
| 31 | +| matlab-latex | MATLAB scripts and LaTeX project | |
| 32 | +| julia-latex | Julia scripts and LaTeX project | |
| 33 | + |
| 34 | +In the `.github/workflows` directory, you may have to modify the `reproduce.yml` file as follows: |
| 35 | + |
| 36 | +- Change the `LATEX_PROJECT` variable to the name/path of your LaTeX main file (without the `.tex` extension) |
| 37 | +- Change the `PYTHON_SCRIPT` variable to the location of the Python script(s) you want to execute with the pipeline (glob patterns supported) |
| 38 | +- Change the Python package imports to the packages you use in your Python scripts |
| 39 | +- Change the LaTeX setup to the packages/compilers your project requires |
| 40 | + |
| 41 | +Finally, commit and push the changes to GitHub: |
| 42 | + |
| 43 | +```[bash] |
| 44 | +git commit --all -m "add reproducibility proof" |
| 45 | +git push |
| 46 | +``` |
| 47 | + |
| 48 | +## Explanations |
| 49 | + |
| 50 | +On your GitHub repository, every time you push to main branch, a pipeline will be executed. If everything goes well, a green check mark will appear next to the commit message. |
| 51 | + |
| 52 | +[Check mark image] |
| 53 | + |
| 54 | +You can view all the GitHub actions in the Actions tab. Click on one to see all the details. This is also where you can download a ZIP archive with the generated PDF in it. |
| 55 | + |
| 56 | +[PDF artifact generated.] |
| 57 | + |
| 58 | +If something goes wrong, a red cross appears and you can click it and display more details about where the failure happened. |
| 59 | + |
| 60 | +[Failed image] |
| 61 | + |
| 62 | +## Example |
| 63 | + |
| 64 | +This repository serves as an example for how a provably reproducible project may look like. [Elaborate more in detail what is done] |
| 65 | + |
| 66 | +## The Re-Pro badge |
| 67 | + |
| 68 | +The Re-Pro badge is the seal of reproducibility which can be displayed in a document. It certifies that a document was indeed produced based on the given commit. |
| 69 | + |
| 70 | +[Image of badge] |
| 71 | + |
| 72 | +## Extended setup |
| 73 | + |
| 74 | +Unless you are using some extraordinary dependencies or features in your project, your repository should now be configured for provable reproducibility. |
| 75 | + |
| 76 | +- Non-default main branch -> change in `reproduce.yml`. |
| 77 | +- Add packages in TexLive installation |
| 78 | +- Commit to repository using |
| 79 | + |
| 80 | +```[bash] |
| 81 | +... |
| 82 | +
|
| 83 | +jobs: |
| 84 | + build: |
| 85 | + permissions: |
| 86 | + contents: write |
| 87 | +... |
| 88 | +``` |
| 89 | +and subsequently adding the step |
| 90 | +```[bash] |
| 91 | +... |
| 92 | +
|
| 93 | +- name: Commit and push generated files to repository |
| 94 | + run: | |
| 95 | + git config --global user.name "github-actions[bot]" |
| 96 | + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 97 | + git add [FILES] |
| 98 | + git commit -m "reproduce thesis" |
| 99 | + git push |
| 100 | +``` |
| 101 | + |
| 102 | +## About PGF plots |
| 103 | + |
| 104 | +This example repository also serves as a demonstration of how matplotlib plots are to be exported and included in LaTeX projects. Any other way than using .pgf files for this purpose should be pursued as a criminal offence. |
| 105 | + |
| 106 | +## Opening GitHub repository with Overleaf |
| 107 | + |
| 108 | +Another advantage of tracking your code in a GitHub repository is that you can view and edit your project from Overleaf. The process for setting this up is described in the [Overleaf guide on GitHub Synchronisation](https://www.overleaf.com/learn/how-to/GitHub_Synchronization). |
0 commit comments