Repository: jpmorganchase/py-avro-schema (language: python)

Issue:
Configure pre-commit hooks
at least:

- black
- flake8
- isort
- interrogate


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/release-package.yml
similarity index 57%
rename from .github/workflows/python-publish.yml
rename to .github/workflows/release-package.yml
index 8acdd03..310015e 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/release-package.yml
@@ -1,16 +1,26 @@
+# Copyright 2022 J.P. Morgan Chase & Co.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+
 # This workflow will upload a Python Package using Twine when a release is created
 # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
 
-name: Upload Python Package
+name: Upload Python Package to PyPI
 
 on:
   release:
-    types: 
+    types:
     - published
 
 jobs:
   deploy:
-
     runs-on: ubuntu-latest
 
     steps:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index b8e01c9..f1ab3db 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,24 +3,37 @@
 # See: https://pre-commit.com/
 
 repos:
-  - # Format code
-    repo: https://github.com/psf/black
+  - repo: https://github.com/psf/black
     rev: 22.3.0
     hooks:
-      - id: black
-  - # Apply linting rules
-    repo: https://github.com/PyCQA/flake8
+      - # Format code
+        id: black
+  - repo: https://github.com/PyCQA/flake8
     rev: 4.0.1
     hooks:
-      - id: flake8
-  - # Enforce documentation
-    repo: https://github.com/econchick/interrogate
+      - # Apply linting rules
+        id: flake8
+  - repo: https://github.com/econchick/interrogate
     rev: 1.5.0
     hooks:
-      - id: interrogate
+      - # Enforce documentation
+        id: interrogate
         exclude: ^tests
-  - # Sort imports
-    repo: https://github.com/PyCQA/isort
+  - repo: https://github.com/PyCQA/isort
     rev: 5.10.1
     hooks:
-      - id: isort
+      - # Sort imports
+        id: isort
+  - repo: https://github.com/Lucas-C/pre-commit-hooks
+    rev: v1.2.0
+    hooks:
+      - # Insert an OSS license header to all relevant files
+        id: insert-license
+        types_or:
+          - ini
+          - python
+          - toml
+          - yaml
+        args:
+          - --license-filepath
+          - LICENSE_HEADER.txt
diff --git a/LICENSE_HEADER.txt b/LICENSE_HEADER.txt
new file mode 100644
index 0000000..0006c39
--- /dev/null
+++ b/LICENSE_HEADER.txt
@@ -0,0 +1,10 @@
+Copyright 2022 J.P. Morgan Chase & Co.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.


Test patch:
diff --git a/.github/workflows/python-package.yml b/.github/workflows/test-package.yml
similarity index 97%
rename from .github/workflows/python-package.yml
rename to .github/workflows/test-package.yml
index 60e759c..300d7b9 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/test-package.yml
@@ -9,11 +9,10 @@
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations under the License.
 
-
 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
 
-name: Python package
+name: Test Python package with Tox
 
 on:
   push: