Skip to content

Commit

Permalink
add exclude to copyright enforcement pre-commit hook (#15)
Browse files Browse the repository at this point in the history
* add exclude to copyright enforcement pre-commit hook

* add pre-commit to actions ci

* insert copyright to satisfy the pre-commit action

---------

Co-authored-by: Matthew Warren <matt.warren+github-commits@cloudtruth.com>
  • Loading branch information
mattwwarren and mattwwarren authored Apr 18, 2024
1 parent 502d6a5 commit 1d48d3c
Show file tree
Hide file tree
Showing 21 changed files with 100 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run pre-commit checks
uses: pre-commit/action@v3.0.1

- name: Test with pytest
run: |
pytest
Expand Down
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ repos:
- id: mypy
additional_dependencies: [types-all]
args: [--explicit-package-bases, --ignore-missing-imports]
exclude: ^dynamic_importer/samples/|^files/
exclude: ^samples/|^files/
- repo: https://github.com/sbrunner/hooks
rev: 1.0.0
hooks:
- id: copyright
exclude: (^samples/|^files/|.*\.yaml|Dockerfile.*|LICENSE|.*\.md|\.gitignore|.*\.toml|\.flake8)
- id: copyright-required
exclude: (^samples/|^files/|.*\.yaml|Dockerfile.*|LICENSE|.*\.md|\.gitignore|.*\.toml|\.flake8)
6 changes: 6 additions & 0 deletions src/dynamic_importer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations
6 changes: 6 additions & 0 deletions src/dynamic_importer/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations
5 changes: 5 additions & 0 deletions src/dynamic_importer/api/client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import os
Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/api/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations


Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/api/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations


Expand Down
2 changes: 1 addition & 1 deletion src/dynamic_importer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _create_data(
if cur_time - start_time > CREATE_DATA_MSG_INTERVAL:
click.echo(f"Created {i} parameters, {total_params - i} remaining")
start_time = time()
click.echo(f"Usploading template: {template_name}")
click.echo(f"Uploading template: {template_name}")
client.upsert_template(project, name=template_name, body=template_data)


Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/processors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import importlib
Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/processors/dotenv.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import os
Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/processors/json.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import json
Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/processors/tf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import os
Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/processors/tfvars.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

from re import sub
Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/processors/yaml.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

from re import sub
Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/util.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import os
Expand Down
5 changes: 5 additions & 0 deletions src/dynamic_importer/walker.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import os
Expand Down
6 changes: 6 additions & 0 deletions src/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations
5 changes: 5 additions & 0 deletions src/tests/fixtures/requests.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations


Expand Down
5 changes: 5 additions & 0 deletions src/tests/processors/test_yaml.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import pathlib
Expand Down
5 changes: 5 additions & 0 deletions src/tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import os
Expand Down
4 changes: 4 additions & 0 deletions src/tests/test_directory_walking.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2024 CloudTruth, Inc.
# All Rights Reserved
#
from __future__ import annotations

import os
Expand Down

0 comments on commit 1d48d3c

Please sign in to comment.