Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5da0ace

Browse filesBrowse files
Add pre-commit hooks (empa-scientific-it#132)
Co-authored-by: Edoardo Baldi <edoardo.baldi@empa.ch>
1 parent 525b2e2 commit 5da0ace
Copy full SHA for 5da0ace
Expand file treeCollapse file tree

34 files changed

+593
-382
lines changed

‎.flake8

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[flake8]
2+
ignore =
3+
E501
4+
W503
5+
E203
6+
per-file-ignores =
7+
binder/ipython_config.py:E266

‎.pre-commit-config.yaml

Copy file name to clipboard
+67Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
ci:
3+
autoupdate_schedule: quarterly
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.4.0
8+
hooks:
9+
- id: end-of-file-fixer
10+
- id: trailing-whitespace
11+
exclude: miscellaneous/structures/SiO2.xyz
12+
- id: check-yaml
13+
- id: check-added-large-files
14+
- repo: https://github.com/pycqa/isort
15+
rev: 5.12.0
16+
hooks:
17+
- id: isort
18+
args: [--profile, black, --filter-files]
19+
- repo: https://github.com/PyCQA/autoflake
20+
rev: v2.2.0
21+
hooks:
22+
- id: autoflake
23+
- repo: https://github.com/asottile/pyupgrade
24+
rev: v3.9.0
25+
hooks:
26+
- id: pyupgrade
27+
args: [--py38-plus]
28+
- repo: https://github.com/psf/black
29+
rev: 23.7.0
30+
hooks:
31+
- id: black
32+
language_version: python3 # Should be a command that runs python3.6+
33+
- repo: https://github.com/PyCQA/flake8
34+
rev: 6.0.0
35+
hooks:
36+
- id: flake8
37+
args: [--count, --show-source, --statistics]
38+
additional_dependencies:
39+
- flake8-bugbear
40+
- flake8-builtins
41+
- flake8-comprehensions
42+
- flake8-debugger
43+
- flake8-logging-format
44+
- pep8-naming
45+
- pyflakes
46+
- tryceratops
47+
- repo: https://github.com/pre-commit/mirrors-mypy
48+
rev: v1.4.1
49+
hooks:
50+
- id: mypy
51+
additional_dependencies:
52+
- types-click-spinner
53+
- types-requests
54+
- types-tabulate
55+
- types-toml
56+
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
57+
rev: 0.2.3
58+
hooks:
59+
- id: yamlfmt
60+
- repo: https://github.com/asottile/setup-cfg-fmt
61+
rev: v2.4.0
62+
hooks:
63+
- id: setup-cfg-fmt
64+
- repo: https://github.com/kynan/nbstripout
65+
rev: 0.6.1
66+
hooks:
67+
- id: nbstripout

‎FAQ.md

Copy file name to clipboardExpand all lines: FAQ.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ A couple of things worth reminding about Slack:
6262
1. Do a quick search in the channel before posting. It might be that someone already started a discussion on the same topic.
6363
2. **Always** reply within [threads](https://slack.com/help/articles/115000769927-Use-threads-to-organize-discussions-) (or open a new one) when you want to join a conversation. The [purpose](https://slack.com/resources/using-slack/tips-on-how-best-to-use-threaded-messages) is to avoid too many unrelated messages that are difficult to navigate in the long run.
6464

65-
For a few more tips about using Slack effectively, check out [this link](https://slack.com/blog/collaboration/etiquette-tips-in-slack).
65+
For a few more tips about using Slack effectively, check out [this link](https://slack.com/blog/collaboration/etiquette-tips-in-slack).

‎binder/environment.yml

Copy file name to clipboard
+15-13Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
---
12
name: python-tutorial
23
channels:
3-
- conda-forge
4+
- conda-forge
45
dependencies:
5-
- python
6-
- pip
7-
- pip:
8-
- numpy
9-
- matplotlib
10-
- pandas
11-
- ipywidgets
12-
- ipynbname
13-
- jupyterlab
14-
- pytest
15-
- pytest-timeout
16-
- markdown
6+
- python
7+
- pip
8+
- pip:
9+
- numpy
10+
- matplotlib
11+
- pandas
12+
- ipywidgets
13+
- ipynbname
14+
- jupyterlab
15+
- pytest
16+
- pytest-timeout
17+
- markdown
18+
- pre-commit

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.