Skip to content
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
7 changes: 4 additions & 3 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ assignees: ''
**Environment Information**


<details>
<summary>Traceback</summary>

FILL IN YOUR STACK TRACE HERE

</details>

**Before submitting**
Please check the following:

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pre-commit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@ 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
- name: Set up Python ${{ matrix.python-version }}
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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/testing-and-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ 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
- name: Set up Python ${{ matrix.python-version }}
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
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -15,7 +16,7 @@ classifiers = [
"Programming Language :: Python",
]
dynamic = ["version"]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"jinja2",
"pyyaml",
Expand Down Expand Up @@ -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
Expand Down
Empty file added requirements.txt
Empty file.
2 changes: 1 addition & 1 deletion src/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/lf_workflow_dash/github_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ 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:
# try next most recent
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 = ""
Expand Down
2 changes: 1 addition & 1 deletion tests/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down