From 9dec912d4508bf039a2b9bc28fa7c2c3428fbe8a Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi Date: Tue, 27 Jan 2026 13:14:47 -0500 Subject: [PATCH] Copier update, and mechanical updates. --- .copier-answers.yml | 7 ++++--- .github/ISSUE_TEMPLATE/1-bug_report.md | 7 +++++++ .github/workflows/pre-commit-ci.yml | 9 +++++---- .github/workflows/smoke-test.yml | 9 +++++---- .github/workflows/testing-and-coverage.yml | 9 +++++---- .pre-commit-config.yaml | 12 ++++++------ pyproject.toml | 4 ++-- requirements.txt | 0 src/.pylintrc | 2 +- src/lf_workflow_dash/github_request.py | 4 ++-- tests/.pylintrc | 2 +- 11 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 requirements.txt diff --git a/.copier-answers.yml b/.copier-answers.yml index 7490ff53d28..f1b7f44b1ef 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,10 +1,10 @@ # Changes here will be overwritten by Copier -_commit: v2.1.0 +_commit: v2.2.0 _src_path: gh:lincc-frameworks/python-project-template author_email: lincc-frameworks-team@lists.lsst.org author_name: LINCC Frameworks create_example_module: false -custom_install: true +custom_install: custom enforce_style: - pylint - black @@ -15,11 +15,12 @@ include_benchmarks: false include_docs: false mypy_type_checking: none package_name: lf_workflow_dash +project_description: Solution for monitoring and managing GitHub Actions workflows project_license: MIT project_name: lf_workflow_dash project_organization: lincc-frameworks python_versions: -- '3.9' - '3.10' - '3.11' +- '3.12' test_lowest_version: none diff --git a/.github/ISSUE_TEMPLATE/1-bug_report.md b/.github/ISSUE_TEMPLATE/1-bug_report.md index bc85e1b9e18..f8f4a5f38d3 100644 --- a/.github/ISSUE_TEMPLATE/1-bug_report.md +++ b/.github/ISSUE_TEMPLATE/1-bug_report.md @@ -12,6 +12,13 @@ assignees: '' **Environment Information** +
+Traceback + +FILL IN YOUR STACK TRACE HERE + +
+ **Before submitting** Please check the following: diff --git a/.github/workflows/pre-commit-ci.yml b/.github/workflows/pre-commit-ci.yml index 9c251b66e0a..fdc89ddb258 100644 --- a/.github/workflows/pre-commit-ci.yml +++ b/.github/workflows/pre-commit-ci.yml @@ -19,13 +19,14 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.10' + python-version: '3.11' + - name: Install uv + uses: astral-sh/setup-uv@v7 - name: Install dependencies run: | sudo apt-get update - python -m pip install --upgrade pip - pip install .[dev] - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + uv pip install --system .[dev] + if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi - uses: pre-commit/action@v3.0.1 with: extra_args: --all-files --verbose diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 77cc2ede8d2..3f1f2139d43 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v6 @@ -27,12 +27,13 @@ jobs: uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v7 - name: Install dependencies run: | sudo apt-get update - python -m pip install --upgrade pip - pip install -e .[dev] - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + uv pip install --system -e .[dev] + if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi - name: List dependencies run: | pip list diff --git a/.github/workflows/testing-and-coverage.yml b/.github/workflows/testing-and-coverage.yml index 6abbf309b52..2df77cd0154 100644 --- a/.github/workflows/testing-and-coverage.yml +++ b/.github/workflows/testing-and-coverage.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v6 @@ -24,12 +24,13 @@ jobs: uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v7 - name: Install dependencies run: | sudo apt-get update - python -m pip install --upgrade pip - pip install -e .[dev] - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + uv pip install --system -e .[dev] + if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi - name: Run unit tests with pytest run: | python -m pytest --cov=lf_workflow_dash --cov-report=xml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 69798339eeb..8271b769845 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: # This hook should always pass. It will print a message if the local version # is out of date. - repo: https://github.com/lincc-frameworks/pre-commit-hooks - rev: v0.1.2 + rev: v0.2.2 hooks: - id: check-lincc-frameworks-template-version name: Check template version @@ -23,7 +23,7 @@ repos: entry: jupyter nbconvert --clear-output # Prevents committing directly branches named 'main' and 'master'. - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: no-commit-to-branch name: Prevent main branch commits @@ -41,13 +41,13 @@ repos: description: Verify that pyproject.toml adheres to the established schema. # Verify that GitHub workflows are well formed - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.0 + rev: 0.36.1 hooks: - id: check-github-workflows args: ["--verbose"] # Automatically sort the imports used in .py files - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 7.0.0 hooks: - id: isort name: Run isort @@ -85,7 +85,7 @@ repos: ] # Analyze the code style and report code that doesn't adhere. - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 26.1.0 hooks: - id: black-jupyter name: Format code using black @@ -94,7 +94,7 @@ repos: # supported by your project here, or alternatively use # pre-commit's default_language_version, see # https://pre-commit.com/#top_level-default_language_version - language_version: python3.10 + language_version: python3.11 # Run unit tests, verify that they pass. Note that coverage is run against # the ./src directory here because that is what will be committed. In the # github workflow script, the coverage is run against the installed package diff --git a/pyproject.toml b/pyproject.toml index cfd2413770a..e6aeae7a70b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ readme = "README.md" authors = [ { name = "LINCC Frameworks", email = "lincc-frameworks-team@lists.lsst.org" } ] +description = "Solution for monitoring and managing GitHub Actions workflows" classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -15,7 +16,7 @@ classifiers = [ "Programming Language :: Python", ] dynamic = ["version"] -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "jinja2", "pyyaml", @@ -59,7 +60,6 @@ addopts = "--doctest-modules --doctest-glob=*.rst" [tool.black] line-length = 110 -target-version = ["py39"] [tool.isort] profile = "black" line_length = 110 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/.pylintrc b/src/.pylintrc index ee3e44f8e03..0c7608ff86a 100644 --- a/src/.pylintrc +++ b/src/.pylintrc @@ -87,7 +87,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.10 # Discover python modules and packages in the file system subtree. recursive=no diff --git a/src/lf_workflow_dash/github_request.py b/src/lf_workflow_dash/github_request.py index 3e9f1a010b8..f8fc1eba0bb 100644 --- a/src/lf_workflow_dash/github_request.py +++ b/src/lf_workflow_dash/github_request.py @@ -52,7 +52,7 @@ def update_workflow_status(workflow_elem, token): # pragma: no cover conclusion = last_run["conclusion"] # Get the time this workflow concluded (in New York time) - (conclusion_time, is_stale) = get_conclusion_time(last_run) + conclusion_time, is_stale = get_conclusion_time(last_run) # Check if the workflow is currently being executed if conclusion is None: @@ -60,7 +60,7 @@ def update_workflow_status(workflow_elem, token): # pragma: no cover if len(response_json["workflow_runs"]) > 1: last_run = response_json["workflow_runs"][1] conclusion = last_run["conclusion"] - (conclusion_time, is_stale) = get_conclusion_time(last_run) + conclusion_time, is_stale = get_conclusion_time(last_run) else: conclusion = "pending" conclusion_time = "" diff --git a/tests/.pylintrc b/tests/.pylintrc index 5162757e531..5e3080f8a33 100644 --- a/tests/.pylintrc +++ b/tests/.pylintrc @@ -87,7 +87,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.10 # Discover python modules and packages in the file system subtree. recursive=no