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
To activate the new virtual environment, execute the following from your shell
20
+
source venv/bin/activate
21
+
```
22
+
4. Source the virtual environment
23
+
```shell
24
+
source venv/bin/activate
25
+
```
26
+
5. Development workflow is driven through `Makefile`. Use `make` to list show all targets.
27
+
```
28
+
> make
29
+
clean remove all build, test, coverage and Python artifacts
30
+
clean-build remove build artifacts
31
+
clean-pyc remove Python file artifacts
32
+
clean-test remove test and coverage artifacts
33
+
lint check style with flake8
34
+
behave run the behave tests, generate and serve report
35
+
pytest run tests quickly with the default Python
36
+
test run all(BDD and unit) tests
37
+
coverage check code coverage quickly with the default Python
38
+
dist builds source and wheel package
39
+
docker-build build a docker image for the service
40
+
docker build a docker image for the service
41
+
install install the package to the active Python's site-packages
42
+
venv creates a Python3 virtualenv environment in venv
43
+
activate activate a virtual environment. Run `make venv` before activating.
44
+
```
45
+
6. Install all the development dependencies. Will install packages from all `requirements-*.txt` files.
46
+
```shell
47
+
make install
48
+
```
49
+
7. The Gherkin Feature files, step files and pytest files go in `tests` directory:
50
+
```
51
+
tests
52
+
|-- features
53
+
| |-- algorithm
54
+
| | `-- SLUG\ Match.feature
55
+
| `-- definition
56
+
| `-- Class\ I\ HLA\ Alleles.feature
57
+
|-- steps
58
+
| |-- HLA_alleles.py
59
+
| `-- SLUG_match.py
60
+
`-- unit
61
+
`-- test_my_project_template.py
62
+
```
63
+
8. Package Module files go in the `my_project_template` directory.
64
+
```
65
+
my_project_template
66
+
|-- __init__.py
67
+
|-- algorithm
68
+
| `-- match.py
69
+
|-- model
70
+
| |-- allele.py
71
+
| `-- slug.py
72
+
`-- my_project_template.py
73
+
```
74
+
9. Run all tests with `make test` or different tests with `make behave` or `make pytest`. `make behave` will generate report files and open the browser to the report.
75
+
10. Use `python app.py` to run the Flask service app in debug mode. Service will be available at http://localhost:8080/
76
+
11. Use `make docker-build` to build a docker image using the current `Dockerfile`.
77
+
12. `make docker` will build and run the docker image with the service. Service will be available at http://localhost:8080/
0 commit comments