Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add exclude to copyright enforcement pre-commit hook #15

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading