Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
tomoscan
Commits
a77778dd
Commit
a77778dd
authored
Aug 24, 2020
by
payno
Committed by
payno
Sep 03, 2020
Browse files
[CI] add black hook
parent
89fb2905
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a77778dd
stages
:
-
style
-
build
-
test_library
-
test_notbooks
...
...
@@ -10,6 +11,19 @@ variables:
no_proxy
:
.esrf.fr,localhost
ORANGE_WEB_LOG
:
'
False'
# style
check_style
:
stage
:
style
image
:
docker-registry.esrf.fr/dau/tomwer:python3.8_buster_pyqt5_sphinx
before_script
:
-
pip install black
script
:
-
pip install -r requirements.txt
# run black
-
LC_ALL=C.UTF-8 black --check --safe .
# build
doc
:
stage
:
build
...
...
.pre-commit-config.yaml
0 → 100644
View file @
a77778dd
repos
:
-
repo
:
https://github.com/psf/black
rev
:
18.6b4
hooks
:
-
id
:
black
language_version
:
python3
pre-commit.sh
0 → 100755
View file @
a77778dd
#!/bin/bash
# This script installs a pre-commit hook on the local repository
# It allows black to run before any git commit.
# Install pre-commit, with a local install fallback
pip
install
--quiet
--upgrade
pre-commit 2>/dev/null
\
||
pip
install
--quiet
--user
--upgrade
pre-commit
# Install the pre-commit hook on the local repository
pre-commit
install
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment