From 6215c83f674d0912aeee7776a0aef86f2bd95739 Mon Sep 17 00:00:00 2001 From: Valerie Becker Date: Wed, 30 Oct 2024 10:23:56 -0700 Subject: [PATCH 1/2] Update precommit discrepancies --- .pre-commit-config.yaml | 35 ----------------------------------- pyproject.toml | 3 --- 2 files changed, 38 deletions(-) delete mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 4d27bf8..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,35 +0,0 @@ -repos: - - repo: https://github.com/psf/black - rev: 24.4.2 - hooks: - - id: black - - id: black-jupyter - - - repo: https://github.com/pycqa/flake8 - rev: 7.1.0 - hooks: - - id: flake8 - - - repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort - name: isort (python) - - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 - hooks: - - id: check-yaml - exclude: conda/meta.yaml - - id: check-xml - - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 - hooks: - - id: check-yaml - - - repo: https://github.com/kynan/nbstripout - rev: 0.7.1 - hooks: - - id: nbstripout - diff --git a/pyproject.toml b/pyproject.toml index 081bca3..af61685 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,9 +35,6 @@ __all__ = ["__version__"] __version__ = "{version}" """ -[tool.black] -line-length = 89 - [tool.pytest.ini_options] asyncio_mode = "auto" From c0b3cff82942653e6840363be6058ab152c8f25f Mon Sep 17 00:00:00 2001 From: Valerie Becker Date: Wed, 30 Oct 2024 10:34:43 -0700 Subject: [PATCH 2/2] Add ts approved workflow --- .github/workflows/lint.yaml | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 67bef52..a18ffb0 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,34 +1,7 @@ -name: Python CI +name: lint -env: - PYTHON_VERSION: "3.12" # Default Python version - -"on": - merge_group: {} - pull_request: {} - push: - branches-ignore: - # These should always correspond to pull requests, so ignore them for - # the push trigger and let them be triggered by the pull_request - # trigger, avoiding running the workflow twice. This is a minor - # optimization so there's no need to ensure this is comprehensive. - - "dependabot/**" - - "renovate/**" - - "tickets/**" - - "u/**" +on: push jobs: - - lint: - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Run pre-commit - uses: pre-commit/action@v3.0.1 + call-workflow: + uses: lsst-ts/tssw_workflows/.github/workflows/lint.yaml@main \ No newline at end of file