File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 66.dependencies.done.log
77.git_submodule_init.done.log
88.venv.done.log
9+ .venv-pre-commit
910vendor /bundle
1011venv
1112__pycache__
Original file line number Diff line number Diff line change 1+ repos :
2+ - repo : https://github.com/psf/black
3+ rev : 22.3.0
4+ hooks :
5+ - id : black
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ $(error python3 not found)
2323endif
2424
2525all : \
26+ .venv-pre-commit/var/.pre-commit-built.log \
2627 all-examples \
2728 all-migration-0.2.0 \
2829 all-ontology
@@ -71,6 +72,30 @@ all: \
7172 --requirement requirements.txt
7273 touch $@
7374
75+ # This virtual environment is meant to be built once and then persist, even through 'make clean'.
76+ # If a recipe is written to remove this flag file, it should first run `pre-commit uninstall`.
77+ .venv-pre-commit/var/.pre-commit-built.log :
78+ rm -rf .venv-pre-commit
79+ test -r .pre-commit-config.yaml \
80+ || (echo " ERROR:Makefile:pre-commit is expected to install for this repository, but .pre-commit-config.yaml does not seem to exist." >&2 ; exit 1)
81+ $(PYTHON3 ) -m venv \
82+ .venv-pre-commit
83+ source .venv-pre-commit/bin/activate \
84+ && pip install \
85+ --upgrade \
86+ pip \
87+ setuptools \
88+ wheel
89+ source .venv-pre-commit/bin/activate \
90+ && pip install \
91+ pre-commit
92+ source .venv-pre-commit/bin/activate \
93+ && pre-commit install
94+ mkdir -p \
95+ .venv-pre-commit/var
96+ touch $@
97+
98+
7499all-examples : \
75100 .dependencies.done.log
76101 $(MAKE) \
@@ -86,6 +111,7 @@ all-ontology: \
86111 --directory ontology
87112
88113check : \
114+ .venv-pre-commit/var/.pre-commit-built.log \
89115 check-examples \
90116 check-migration-0.2.0 \
91117 check-ontology
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ exclude:
4949 - vendor/ruby/
5050# customer excludes
5151 - .venv.done.log
52+ - .venv-pre-commit/
5253 - CONTRIBUTE.md
5354 - Makefile
5455 - README.md
You can’t perform that action at this time.
0 commit comments