File tree Expand file tree Collapse file tree 1 file changed +25
-22
lines changed Expand file tree Collapse file tree 1 file changed +25
-22
lines changed Original file line number Diff line number Diff line change 1
- #
2
- #
3
- #
1
+ _targets := setup python-version pyenv-info test cover lint run clean
2
+ .PHONY : help $( _targets )
3
+ .DEFAULT_GOAL := help
4
4
5
- all :
6
- echo No default target - try ve, test, lint, run
7
- false
5
+ version-python : # # Echos the version of Python in use
6
+ python --version
8
7
8
+ help :
9
+ @echo Targets: $(_targets )
10
+ @false
9
11
10
- # FIXME:
11
- # - depends on python > 3.6 (bad news for RHEL7 /and/ RHEL8)
12
- # - Add a check for correct version and fail fast
12
+ setup :
13
+ poetry install
13
14
14
- ve : ve/pyvenv.cfg
15
- ve/pyvenv.cfg : requirements.txt
16
- python3 -m venv ve
17
- . ve/bin/activate; pip install -r requirements.txt
15
+ python-version :
16
+ @which python
17
+ @python --version
18
18
19
- test : ve
20
- . ve/bin/activate ; pytest
19
+ pyenv-info : setup
20
+ poetry env info
21
21
22
- cover : ve
23
- . ve/bin/activate; pytest \
22
+ test : setup
23
+ poetry run pytest
24
+
25
+ cover : setup
26
+ poetry run pytest \
24
27
--cov=pyth_observer \
25
28
--cov-report=html \
26
29
--cov-report=term
27
30
28
- lint : lint.python
29
- # lint: lint.yaml - argh, RHEL is too old to do this by default
31
+ lint : setup lint.python lint.yaml
30
32
31
33
lint.python :
32
34
poetry run isort pyth_observer/
@@ -37,8 +39,9 @@ lint.python:
37
39
lint.yaml :
38
40
yamllint .
39
41
40
- run : ve
41
- . ve/bin/activate ; python3 ./ observer.py -l debug --network devnet
42
+ run : setup
43
+ poetry run pyth- observer -l debug --network devnet
42
44
43
45
clean :
44
- rm -rf ve htmlcov
46
+ poetry env remove --all
47
+ rm -rf htmlcov
You can’t perform that action at this time.
0 commit comments