You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/contributing-to-harmony.md
+63-7Lines changed: 63 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,18 @@ There are two ways you can use Harmony in your work:
49
49
50
50
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.
51
51
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
+
52
64
We have some example notebooks to help you get started with the Python and R libraries:
@@ -65,7 +77,7 @@ Here’s how you can help the project:
65
77
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.
66
78
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.
67
79
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.
69
81
70
82
71
83
## 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
99
111
100
112
Here are the steps to get started:
101
113
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)
104
120
* Install Pycharm
105
121
* 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`:
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):
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
0 commit comments