Skip to content

Commit d3aa842

Browse files
committed
move contributing to docs folder
1 parent 13f80f7 commit d3aa842

1 file changed

Lines changed: 75 additions & 30 deletions

File tree

docs/CONTRIBUTING.md

Lines changed: 75 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,86 @@
1-
# Contributing guidelines
1+
# processing
22

3-
We welcome any kind of contribution to our software, from simple comment or question to a full fledged [pull request](https://help.github.com/articles/about-pull-requests/). Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
3+
This repositary includes python modules for running the STEMMUS-SCOPE model in a
4+
notebook.
45

5-
A contribution can be one of the following cases:
6+
The workflow is executed using python and MATLAB on a Unix-like system.
7+
The python packages are listed in the
8+
[`environment.yml`](https://github.com/EcoExtreML/processing/blob/main/environment.yml)
9+
file. Follow the instructions below to create conda environment and install
10+
MATLAB Runtime.
611

7-
1. you have a question;
8-
1. you think you may have found a bug (including unexpected behavior);
9-
1. you want to make some kind of change to the code base (e.g. to fix a bug, to add a new feature, to update documentation);
10-
1. you want to make a new release of the code base.
12+
<details>
13+
<summary>Create conda environment </summary>
1114

12-
The sections below outline the steps in each case.
15+
Run the commands below in a terminal:
1316

14-
## You have a question
17+
```sh
18+
# Download and install Conda
19+
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-x86_64.sh
20+
bash Mambaforge-pypy3-Linux-x86_64.sh
21+
-b -p ~/mamba
1522

16-
1. use the search functionality [here](https://github.com/EcoExtreML/stemmus_scope_processing/issues) to see if someone already filed the same issue;
17-
2. if your issue search did not yield any relevant results, make a new issue;
18-
3. apply the "Question" label; apply other labels when relevant.
23+
# Update base environment
24+
. ~/mamba/bin/activate
25+
mamba update --name base mamba
1926

20-
## You think you may have found a bug
27+
# Clone this repository
28+
git clone https://github.com/EcoExtreML/processing.git
2129

22-
1. use the search functionality [here](https://github.com/EcoExtreML/stemmus_scope_processing/issues) to see if someone already filed the same issue;
23-
1. if your issue search did not yield any relevant results, make a new issue, making sure to provide enough information to the rest of the community to understand the cause and context of the problem. Depending on the issue, you may want to include:
24-
- the [SHA hashcode](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas) of the commit that is causing your problem;
25-
- some identifying information (name and version number) for dependencies you're using;
26-
- information about the operating system;
27-
1. apply relevant labels to the newly created issue.
30+
# Create a conda environment called 'stemmus' with all required dependencies
31+
cd processing
32+
mamba env create
2833

29-
## You want to make some kind of change to the code base
34+
# The environment can be activated with
35+
. ~/mamba/bin/activate stemmus
3036

31-
1. (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue;
32-
1. (**important**) wait until some kind of consensus is reached about your idea being a good idea;
33-
1. if needed, fork the repository to your own Github profile and create your own feature branch off of the latest master commit. While working on your feature branch, make sure to stay up to date with the master branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions [here](https://help.github.com/articles/configuring-a-remote-for-a-fork/) and [here](https://help.github.com/articles/syncing-a-fork/));
34-
1. make sure the existing tests still work by running ``pytest``;
35-
1. add your own tests (if necessary);
36-
1. update or expand the documentation;
37-
1. update the `CHANGELOG.md` file with change;
38-
1. push your feature branch to (your fork of) the PyStemmusScope repository on GitHub;
39-
1. create the pull request, e.g. following the instructions [here](https://help.github.com/articles/creating-a-pull-request/).
37+
```
38+
</details>
4039

41-
In case you feel like you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation: don't let this discourage you from making the pull request; we can help you! Just go ahead and submit the pull request, but keep in mind that you might be asked to append additional commits to your pull request.
40+
<details>
41+
<summary>Use MATLAB </summary>
42+
43+
To run the STEMMUS_SCOPE, you need MATLAB version `>=2019`.
44+
45+
**On Snellius:**
46+
47+
[Snellius](https://servicedesk.surfsara.nl/wiki/display/WIKI/Snellius) is the
48+
Dutch National supercomputer hosted at SURF. MATLAB Runtime is installed on
49+
Snellius, see the script
50+
[`run_jupyter_lab_snellius_dev.sh`](https://github.com/EcoExtreML/processing/blob/main/run_jupyter_lab_snellius_dev.sh)
51+
on how to load the module.
52+
</details>
53+
54+
# Run jupyter notebook
55+
56+
**On Snellius:**
57+
58+
Use the script
59+
[`run_jupyter_lab_snellius_dev.sh`](https://github.com/EcoExtreML/processing/blob/main/run_jupyter_lab_snellius_dev.sh)
60+
to create a jupyter lab server on Snellius for running the notebook
61+
interactively.
62+
63+
**On CRIB:**
64+
65+
[CRIB](https://crib.utwente.nl/) is the ITC Geospatial Computing Platform.
66+
67+
1. Log in CRIB with your username and password and select a proper compute unit.
68+
2. Check `config_file_crib.txt` and change the paths if needed, specifically
69+
"InputPath" and "OutputPath".
70+
3. click on the `Remote Desktop` in the
71+
Launcher. Click on the `Applications`. You will find the 'MATLAB' software under
72+
the `Research`.
73+
4. After clicking on 'MATLAB', it asks for your account information that is
74+
connected to a MATLAB license.
75+
5. Open the file `run_model_in_matlab_dev.m` and set the paths inside the script.
76+
6. Then, run the main script `run_model_in_matlab_dev.m`.
77+
78+
# Recipe of model execution
79+
80+
The execution of the model includes following steps:
81+
82+
- Update/set config files
83+
- Create input directories, prepare input files
84+
- Run the model
85+
- Create output directories, prepare output files
86+
- Create exe file

0 commit comments

Comments
 (0)