Skip to content

Commit

Permalink
Merge pull request #191 from catalyst-cooperative/update-github-actions
Browse files Browse the repository at this point in the history
Update setup-micromamba and pre-commit hooks.
  • Loading branch information
zaneselvans authored Oct 7, 2024
2 parents 2d46fdf + b6e8868 commit 5f90871
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
1 change: 0 additions & 1 deletion .github/workflows/load-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
condarc: |
channels:
- conda-forge
- defaults
channel_priority: strict
- name: Get GitHub Action runner's IP Address
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/save_daily_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
condarc: |
channels:
- conda-forge
- defaults
channel_priority: strict
- name: Log conda environnment information
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tox-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ jobs:
condarc: |
channels:
- conda-forge
- defaults
channel_priority: strict
- name: Log conda environnment information
- name: Log VM and conda environnment information
run: |
lscpu
free -h
conda info
conda list
conda config --show-sources
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:

# Other file formatting, plus common Git mistakes & text file standardization:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files # Don't accidentally commit giant files.
- id: check-merge-conflict # Watch for lingering merge markers.
Expand All @@ -25,7 +25,7 @@ repos:
# Formatters: hooks that re-write Python and RST files
#####################################################################################
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
rev: v0.6.9
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -48,11 +48,11 @@ repos:
- id: doc8
args: ["--config", "pyproject.toml"]

# Lint Dockerfiles for errors and to ensure best practices
- repo: https://github.com/AleksaC/hadolint-py
rev: v2.12.1b3
# Check Github Actions
- repo: https://github.com/rhysd/actionlint
rev: v1.7.3
hooks:
- id: hadolint
- id: actionlint

########################################################################################
# Custom local hooks
Expand All @@ -62,7 +62,7 @@ repos:
# clear outputs from Jupyter notebooks
- id: nb-output-clear
name: nb-output-clear
stages: [commit]
stages: [pre-commit]
language: system
verbose: false
pass_filenames: false
Expand All @@ -71,7 +71,7 @@ repos:
# Run the unit tests
- id: unit-tests
name: unit-tests
stages: [commit]
stages: [pre-commit]
language: system
verbose: false
pass_filenames: false
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: pudl-usage-metrics
channels:
- conda-forge
- defaults
dependencies:
# Used to set up the environment
- pip>=21,<25
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"pandas-gbq>=0.23.1",
"pydata-google-auth>=1.8.2",
"jupyterlab>=4.2.3",
"psycopg2>=2.9.9",
"psycopg2-binary>=2.9.9",
"ipinfo>=5.0.1",
"joblib>=1.4.2",
"matplotlib>=3.9.0",
Expand Down Expand Up @@ -55,7 +55,7 @@ docs = [
tests = [
"coverage>=5.3,<8", # Lets us track what code is being tested
"doc8>=0.9,<1.2", # Ensures clean documentation formatting
"pre-commit>=3.7,<5", # Allow us to run pre-commit hooks in testing
"pre-commit>=4,<5", # Allow us to run pre-commit hooks in testing
"pydocstyle>=5.1,<7", # Style guidelines for Python documentation
"pytest>=8,<8.4", # Our testing framework
"pytest-asyncio>=0.20,<0.25", # Test async functions
Expand Down Expand Up @@ -177,4 +177,4 @@ max-complexity = 10
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
multiline-quotes = "double"

0 comments on commit 5f90871

Please sign in to comment.