From e0837c1eb9e6eee72d2eb5336b0084215a2b4b3b Mon Sep 17 00:00:00 2001
From: David Hendriks <davidhendriks93@gmail.com>
Date: Sat, 19 Nov 2022 22:00:56 +0000
Subject: [PATCH] added precommit config

---
 .pre-commit-config.yaml | 60 +++++++++++++++++++++++++++++++++++++++++
 test_push_mirror.txt    |  0
 2 files changed, 60 insertions(+)
 create mode 100644 .pre-commit-config.yaml
 delete mode 100644 test_push_mirror.txt

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 000000000..228466c23
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,60 @@
+# exclude: '.run_PPISN_population.py|.run_PPISN_population_new.py'
+# See https://pre-commit.com for more information
+# See https://pre-commit.com/hooks.html for more hooks
+repos:
+- repo: https://github.com/pre-commit/pre-commit-hooks
+  rev: v4.3.0
+  hooks:
+  -   id: trailing-whitespace
+  -   id: end-of-file-fixer
+  -   id: check-yaml
+  -   id: check-added-large-files
+
+- repo: https://github.com/psf/black
+  rev: 22.10.0
+  hooks:
+  - id: black
+    language_version: python3.9
+    # https://pre-commit.com/#arguments-pattern-in-hooks
+    exclude: |
+                (?x)^(
+                    grav_waves/run_population_scripts/run_PPISN_population.py|
+                    grav_waves/run_population_scripts/run_PPISN_population_new.py|
+                )$
+
+# - repo: https://github.com/pycqa/isort
+#   rev: 5.10.1
+#   hooks:
+#     - id: isort
+#       files: "\\.(py)$"
+#       args: [--settings-path=pyproject.toml]
+- repo: https://github.com/pycqa/isort
+  rev: 5.5.4
+  hooks:
+  - id: isort
+    args: ["--profile", "black"]
+
+
+
+- repo: https://github.com/hadialqattan/pycln
+  rev: v2.1.1 # Possible releases: https://github.com/hadialqattan/pycln/releases
+  hooks:
+    - id: pycln
+      args: [--config=pyproject.toml]
+
+# - repo: https://github.com/pycqa/pydocstyle
+#   rev: 6.1.1  # pick a git hash / tag to point to
+#   hooks:
+#   - id: pydocstyle
+#     args: [--config=pyproject.toml]
+
+-   repo: https://github.com/pycqa/flake8
+    rev: 5.0.4
+    hooks:
+    -   id: flake8
+        args: ['--ignore=E129,E2,E501,W503,E722,binarycpython/tests/main.py,docs/source/examples/']
+        exclude: |
+                    (?x)^(
+                        binarycpython/tests/main.py|
+                        docs/source/examples/example_plotting_distributions.py
+                    )$
diff --git a/test_push_mirror.txt b/test_push_mirror.txt
deleted file mode 100644
index e69de29bb..000000000
-- 
GitLab