From 4e9153056676aa37afccccda1d5e6c8fbfda83d6 Mon Sep 17 00:00:00 2001 From: cyschneck <22159116+cyschneck@users.noreply.github.com> Date: Sun, 2 Jun 2024 00:16:45 -0600 Subject: [PATCH] pre-commit setup --- .../workflows/web_scrap_dynamic_csv_files.yml | 1 + .pre-commit-config.yaml | 24 +++++++++++++++++++ environment.yml | 1 + 3 files changed, 26 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/web_scrap_dynamic_csv_files.yml b/.github/workflows/web_scrap_dynamic_csv_files.yml index b8b0359..dbb7b7c 100644 --- a/.github/workflows/web_scrap_dynamic_csv_files.yml +++ b/.github/workflows/web_scrap_dynamic_csv_files.yml @@ -1,6 +1,7 @@ name: update-dynamic-csv-data-files on: + workflow_dispatch: schedule: - cron: '0 0 2 * *' # “At 00:00 on day-of-month 2” (on the 2nd of the month) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..48d9350 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +repos: + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-yaml + + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.0.1 + hooks: + - id: remove-tabs + name: remove tabs + exclude_types: [csv, tab] + + - repo: https://github.com/google/yapf + rev: v0.40.2 + hooks: + - id: yapf + name: yapf reformat + args: ['--in-place', '--recursive', '--style', 'pep8'] diff --git a/environment.yml b/environment.yml index 3973d0e..19ee0e5 100644 --- a/environment.yml +++ b/environment.yml @@ -6,6 +6,7 @@ dependencies: - beautifulsoup4 - pandas - pdr + - pre-commit # pre-commit hooks - pyproj - pytest - rasterio