Skip to content

DM-38499: Fix minor ruff issue and re-enable tests #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 14, 2023
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
41 changes: 41 additions & 0 deletions .github/workflows/do_not_merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Check commits can be merged"
on:
push:
branches:
- main
pull_request:

jobs:
do-not-merge-checker:
runs-on: ubuntu-latest

steps:
- name: Check that there are no commits that should not be merged
uses: gsactions/commit-message-checker@v2
with:
excludeDescription: "true" # optional: this excludes the description body of a pull request
excludeTitle: "true" # optional: this excludes the title of a pull request
checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true
# Check for message indicating that there is a commit that should
# not be merged.
pattern: ^(?!DO NOT MERGE)
flags: "i"
error: |
"This step failed because there is a commit containing the text
'DO NOT MERGE'. Remove this commit from the branch before merging
or change the commit summary."

- uses: actions/checkout@v3

- name: Check requirements.txt for branches
shell: bash
run: |
FILE=requirements.txt
MATCH=tickets/DM-
if grep -q $MATCH $FILE
then
echo "Ticket branches found in $FILE:"
grep -n $MATCH $FILE
exit 1
fi
5 changes: 5 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ on:
jobs:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/lint.yaml@main
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
1 change: 0 additions & 1 deletion .github/workflows/rebase_checker.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Check that 'main' is not merged into the development branch

on: pull_request
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
python/lsst/ctrl/bps/parsl/version.py
.sconsign.dblite
_build.*

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
1 change: 0 additions & 1 deletion doc/changes/DM-37215.misc.rst

This file was deleted.

7 changes: 2 additions & 5 deletions tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import pytest
from lsst.ctrl.bps import BpsConfig
from lsst.ctrl.bps.parsl.configuration import get_bps_config_value
from lsst.daf.butler import Config


@pytest.mark.skip(reason="parsl not in LSST environment")
def test_config():
"""Super-basic test of configuration reading

This is intended as a test of testing more than anything else.
"""
from lsst.ctrl.bps import BpsConfig
from lsst.ctrl.bps.parsl.configuration import get_bps_config_value

config = BpsConfig(Config.fromString("foo: bar")) # BpsConfig doesn't work directly with fromString
assert get_bps_config_value(config, "foo", str) == "bar"
5 changes: 1 addition & 4 deletions tests/test_import.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import pytest


@pytest.mark.skip(reason="parsl not in LSST environment")
def test_import():
"""Simple test that the package can be imported."""
import lsst.ctrl.bps.parsl # noqa