Skip to content

Commit 3620d31

Browse files
committed
Add initial setup for developers explanations
1 parent 7c44bdd commit 3620d31

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Diff for: README.md

+46
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,52 @@ Read more [here](/docs/general/roles.md).
152152

153153
## Development
154154

155+
### Initial setup
156+
157+
#### Python and Poetry installatioon
158+
159+
We use Python 3.8. If your operating system does not provide Python 3.8 out of the
160+
box, it is best installed using [`pyenv`](https://github.com/pyenv/pyenv/).
161+
162+
For Mac users, see [here](https://opensource.com/article/19/5/python-3-default-mac) for more info.
163+
```bash
164+
$ brew install pyenv
165+
$ pyenv init # follow instructions to add run commands to your environment
166+
```
167+
After editing your environment file, reload your shell and navigate to this repo, then install `3.8.17` to be used locally:
168+
```bash
169+
$ pyenv install 3.8.17
170+
$ cd ...your../open-event-server/
171+
$ pyenv local 3.8.17
172+
```
173+
Now the Python version should automatically change when used within open-event-server.
174+
175+
176+
We also expect [poetry](https://python-poetry.org/) being available.
177+
178+
#### Package setup
179+
180+
Change into the `open-event-server` directory, and execute the following commands:
181+
182+
Activate Python 3.8.17 locally
183+
```bash
184+
$ pyenv local 3.8.17
185+
```
186+
187+
Install dependencies using poetry
188+
```bash
189+
$ poetry install --with dev
190+
```
191+
192+
Activate the pre-commit hook
193+
```bash
194+
$ poetry run pre-commit install
195+
```
196+
197+
With that every git commit will be checked/formatted with various tools before
198+
being actually committed.
199+
200+
155201
### Development Mode
156202

157203
To enable development mode (development Flask config), set `APP_CONFIG` environment variable to "config.DevelopmentConfig".

0 commit comments

Comments
 (0)