Skip to content

Commit b03e884

Browse files
committed
update docs
1 parent a1fbbbf commit b03e884

1 file changed

Lines changed: 63 additions & 7 deletions

File tree

content/en/contributing-to-harmony.md

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ There are two ways you can use Harmony in your work:
4949

5050
Some academic users start off on the web tool, and then switch to the [Python](https://github.com/harmonydata/harmony) or [R library](https://github.com/harmonydata/harmony_r) and work in Jupyter Notebooks or R Markdown to use the tool as part of their workflow.
5151

52+
#### Python installation
53+
54+
1. In your command line (terminal), type `pip install harmonydata`
55+
2. In your Python code you can import Harmony with `import harmony`
56+
57+
#### R installation
58+
59+
1. Run `install.packages("harmonydata")` to install the package
60+
2. Import it with `library(harmonydata)`
61+
62+
#### Example walkthrough notebooks in Python and R
63+
5264
We have some example notebooks to help you get started with the Python and R libraries:
5365
* [Python Colab notebook](https://colab.research.google.com/github/harmonydata/harmony/blob/main/Harmony_example_walkthrough.ipynb)
5466
* [R markdown](https://harmonydata.ac.uk/harmony_r_example.nb.html)
@@ -65,7 +77,7 @@ Here’s how you can help the project:
6577
5. Attend events or invite us to talk. Please come to some of our in-person [events](/events/), and we are also interested in any opportunities to speak at your event.
6678
6. Share data. If you have any data that you’re trying to harmonise with Harmony and it’s not sensitive or restricted, please share it with us so that we can see how people are using the tool and understand what kind of input it should expect.
6779
7. Share example notebooks and scripts. If you have a Jupyter notebook, R markdown, R Studio files or similar, please upload them to https://github.com/harmonydata/harmony_examples and other people can see how you’ve been using Harmony.
68-
80+
8. Engage with the community - write posts on Discord, LinkedIn, etc, and share how you think the tool could be used or improved.
6981

7082

7183
## Contributing to Harmony as a developer
@@ -99,13 +111,57 @@ You can use Windows, Linux or Mac. We have made some videos to help you install
99111

100112
Here are the steps to get started:
101113

102-
* First clone the repository from Git. If you're not familiar with Git and Github, we recommend you watch a tutorial on Git first ([example video tutorial on Git](https://www.youtube.com/watch?v=USjZcfj8yxE))
103-
* Install Python 3.11
114+
#### Working on Harmony in Python
115+
116+
If you just want to use the Python library without editing it, you can install it with `pip install harmonydata`. However, if you want to edit the source code, you will need to get it running from source.
117+
118+
* First clone the [Python repository](https://github.com/harmonydata/harmony) from Git: `git clone git@github.com:harmonydata/harmony.git`. If you're not familiar with Git and Github, we recommend you watch a tutorial on Git first ([example video tutorial on Git](https://www.youtube.com/watch?v=USjZcfj8yxE))
119+
* Install Python 3.11 or later (we recommend using Anaconda and Jupyter Notebook)
104120
* Install Pycharm
105121
* Install Jupyter Notebooks
106-
* Run the [example Colab notebook](https://colab.research.google.com/github/harmonydata/harmony/blob/main/Harmony_example_walkthrough.ipynb)
107-
* We recommend Anaconda and Jupyter Notebook
108-
* Then you can do `pip install harmonydata` to install Harmony once Python has been installed.
122+
* Run the [example Colab notebook](https://colab.research.google.com/github/harmonydata/harmony/blob/main/Harmony_example_walkthrough.ipynb) to get a feel for how Harmony can be used
123+
* If the code is set up correctly, you should be able to run the unit tests in the Python repository correctly.
124+
125+
126+
#### Working on Harmony API in Python
127+
128+
The API repository depends on the Python repository, which it contains as a submodule. So when you clone the API repository, please make sure to include `--recurse-submodules`:
129+
130+
```
131+
git clone --recurse-submodules git@github.com:harmonydata/harmonyapi.git
132+
```
133+
134+
The API builds as a Docker container, so in addition to the Python library's dependencies, you will need to install FastAPI and Docker. There is a separate `requirements.txt` file for the API repository.
135+
136+
You can run the API with
137+
138+
```
139+
python main.py
140+
```
141+
142+
#### Working on Harmony front end
143+
144+
Clone the [front end repository](https://github.com/harmonydata/app):
145+
146+
```
147+
git clone git@github.com:harmonydata/app.git
148+
```
149+
150+
Follow the instructions in the `.env` file to connect it to the Harmony API - you can connect either to the remote API, or to a local API.
151+
152+
#### Working on Harmony R
153+
154+
Clone the [R repository](https://github.com/harmonydata/harmony_r):
155+
156+
```
157+
git clone git@github.com:harmonydata/harmony_r.git
158+
```
159+
160+
Harmony R connects to an API instance. By default it will connect to the remote API at `https://api.harmonydata.ac.uk`, but you can configure this with
161+
162+
```
163+
harmonydata::set_url()
164+
```
109165

110166
### What should I work on?
111167

@@ -193,7 +249,7 @@ git checkout -b <feature-branch>
193249
```
194250

195251
Always use a feature branch. It’s good practice to never work on the main branch! Name the feature branch after your contribution.
196-
252+
197253
7. Develop your contribution on your feature branch. Add changed files using git add and then git commit files to record your changes in Git:
198254
`git add <modified_files>`;
199255
`git commit`

0 commit comments

Comments
 (0)