Skip to content

Commit

Permalink
Add git to first section
Browse files Browse the repository at this point in the history
  • Loading branch information
rantahar committed Feb 27, 2024
1 parent 7c3241b commit fd7e7cd
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 17 deletions.
60 changes: 44 additions & 16 deletions content/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,60 @@
Reproducible research - Preparing code to be usable by you and others in the future
===================================================================================

Have you ever spent days **trying to repeat the results from few weeks or months
ago**? Or you have to do paper revisions, but you just can't get the results to
match up? It's unpleasant for both you and science.

.. admonition:: Notes for the instructor:

This course is for new researchers, bachelors and masters students, summer
workers and so on. The do not have a lot of experience with programming and
will not write long programs to start with. Emphasize reproducability of
workflows and saving your work (instead of just running commands and getting
results).

Reproducability:
- record computational steps and dependencies
- keep data as raw as possible (in case of FIONA, raw data cannot be exported)
- keep data and code in the same place.
- write a workflow to reproduce the entrie paper

Quick timings:
- intro and motivation: 10 minutes
- organizing-projects + git demo: 15 minutes
- workflow-management: 15 minutes
- dependencies and publishing: 10 minutes
- exercises and discussion: 10 minutes

10 + 15 + 15 + 10 + 10 = 60 minutes

Have you ever **lost hours of work** when your computer decided to update itself?
Or a program crashed when you clicked save? Did you maybe delete a file by mistake?

In this section we will look at ways of saving your work for yourself and saving
effort by making computational steps easy to repeat, share and modify. Making you
research project reproducable increase the quality of your work, but the main
motivation should be to make your life easier in the long run.

In this lesson we will explore different methods and tools for better
reproducibility in research software and data. We will demonstrate how version
control, workflows, containers, and package managers can be used to **record
reproducible environments and computational steps** for our future selves.
control, workflows, and package managers can be used to **record
reproducible environments and computational steps** for our future selves
and share those with other researchers.


.. admonition:: Learning outcomes

By the end of this lesson, learners should:
- be able to apply well organized directory structure for their project
- remember the FAIR principles
- be able to document and reproduce computational steps
- understand that code can have dependencies, and know how to document them
- if a computational studies contains several steps, be able to document them
- know about use cases for containers
- knowing the pros and cons of manual documentation vs. scripted automation vs. workflow management
- if a computational study contains several steps, be able to document them


.. prereq::

You need to install
In examples and demonstrations, we use
`Git, Python, and Snakemake <https://coderefinery.github.io/installation/>`__.
These are not required to follow the lesson, but trying them yourself is very
useful


.. toctree::
Expand All @@ -39,22 +68,21 @@ reproducible environments and computational steps** for our future selves.
organizing-projects.md
workflow-management.md
dependencies.md
environments.md
where-to-go.md


.. toctree::
:maxdepth: 1
:caption: Reference
:caption: For Reference

exercises
guide


.. toctree::
:maxdepth: 1
:caption: About
:caption: See Also

All lessons <https://coderefinery.org/lessons/core/>
CodeRefinery <https://coderefinery.org/>
Reusing <https://coderefinery.org/lessons/reusing/>
Codefinery Lessons <https://coderefinery.org/lessons/core/>
This lesson is based on the `Reproducibility lesson <https://coderefinery.org/lessons/core/>`__
CodeRefinery Organization <https://coderefinery.org/>
23 changes: 22 additions & 1 deletion content/organizing-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,28 @@ project_name/
```
---

## Tracking files with git

### Demonstration with graphical user interface

````{challenge} Demonstration
We use a simple word-count repository in demonstrations and exercises
(<https://github.com/coderefinery/word-count>). We should clone the
repository already to prepare to work on it.
On VSCode (many other interfaces exist and are just as good)
- Open command palette and type clone
- paste the URL of the repository to clone
- use the file dialog to find a place for it
- Create a new file and make a change to an existing one.
- Add them to the repository and push online.
- See the changes online.
````

* Check the [Git-intro lesson](https://coderefinery.github.io/git-intro/) for a lot more details.



## Tracking source code, data, and results

- All code is version controlled and goes in the `src/` or `source/` directory
Expand All @@ -55,7 +77,6 @@ project_name/
```console
$ git tag -a thesis-submitted -m "this is the submitted version of my thesis"
```
* Check the [Git-intro lesson](https://coderefinery.github.io/git-intro/) for a reminder.

---

Expand Down

0 comments on commit fd7e7cd

Please sign in to comment.