-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.md.ffizer.hbs
More file actions
85 lines (58 loc) · 2.11 KB
/
README.md.ffizer.hbs
File metadata and controls
85 lines (58 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# {{ project_name }}
{{ project_description }}
## Table of contents
1. [Setup](#setup)
- [Local setup with pyenv and poetry](#local-setup-with-pyenv-and-poetry)
- [Docker setup](#docker-setup)
2. [Usage](#usage)
## Setup
### Local setup with pyenv and poetry
1. Install Python 3.x using [pyenv/pyenv: Simple Python version management](https://github.com/pyenv/pyenv#installation)
<details>
<summary>Install on Mac OS X</summary>
```sh
#eg on Mac Os X
brew update
brew install pyenv
pyenv install 3.6.12 # or any other ^3.6
```
</details>
<details>
<summary>Install on Ubuntu Desktop</summary>
```bash
git clone https://github.com/pyenv/pyenv ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc # or >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc # or >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc # or ~/.bash_profile
source ~/.zshrc # or >> ~/.bashrc
pyenv install 3.6.12 # or any other ^3.6
```
</details>
<details>
<summary>Install on Windows</summary>
Follow you prefered installation from [pyenv-win](https://github.com/pyenv-win/pyenv-win#get-pyenv-win)
```powershell
pyenv install 3.6.12 # or any other ^3.6
```
</details>
2. Install [Poetry](https://poetry.eustace.io/) for dependency management
```sh
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
source $HOME/.poetry/env
poetry --version
```
3. Install dependencies in virtual environement
```sh
poetry config virtualenvs.in-project true # Can be set globally
poetry shell # initialize `.venv/` virtualenv directory
poetry install
```
### Docker setup
You can use the script `dev.dockerfile.build.sh` in `.devcontainer/` to build an image with all the dependencies.
Then you can use the script `dev.dockerfile.run.sh` in `.devcontainer/` the other one to run and attach to a container.
Another way can be to use the built-in feature of [remote
container](https://code.visualstudio.com/docs/remote/containers) from vscode
## Usage
```sh
poetry run ...
```