Skip to content

Commit fe186b8

Browse files
authored
Merge pull request #18 from lsst/tickets/DM-38499
DM-38499: Fix minor ruff issue and re-enable tests
2 parents db5f6d9 + bb9296b commit fe186b8

File tree

7 files changed

+50
-11
lines changed

7 files changed

+50
-11
lines changed

.github/workflows/do_not_merge.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Check commits can be merged"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
do-not-merge-checker:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check that there are no commits that should not be merged
14+
uses: gsactions/commit-message-checker@v2
15+
with:
16+
excludeDescription: "true" # optional: this excludes the description body of a pull request
17+
excludeTitle: "true" # optional: this excludes the title of a pull request
18+
checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request
19+
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true
20+
# Check for message indicating that there is a commit that should
21+
# not be merged.
22+
pattern: ^(?!DO NOT MERGE)
23+
flags: "i"
24+
error: |
25+
"This step failed because there is a commit containing the text
26+
'DO NOT MERGE'. Remove this commit from the branch before merging
27+
or change the commit summary."
28+
29+
- uses: actions/checkout@v3
30+
31+
- name: Check requirements.txt for branches
32+
shell: bash
33+
run: |
34+
FILE=requirements.txt
35+
MATCH=tickets/DM-
36+
if grep -q $MATCH $FILE
37+
then
38+
echo "Ticket branches found in $FILE:"
39+
grep -n $MATCH $FILE
40+
exit 1
41+
fi

.github/workflows/lint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ on:
99
jobs:
1010
call-workflow:
1111
uses: lsst/rubin_workflows/.github/workflows/lint.yaml@main
12+
ruff:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: chartboost/ruff-action@v1

.github/workflows/rebase_checker.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: Check that 'main' is not merged into the development branch
32

43
on: pull_request

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
python/lsst/ctrl/bps/parsl/version.py
22
.sconsign.dblite
3+
_build.*
34

45
# Byte-compiled / optimized / DLL files
56
__pycache__/

doc/changes/DM-37215.misc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/test_config.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
import pytest
1+
from lsst.ctrl.bps import BpsConfig
2+
from lsst.ctrl.bps.parsl.configuration import get_bps_config_value
23
from lsst.daf.butler import Config
34

45

5-
@pytest.mark.skip(reason="parsl not in LSST environment")
66
def test_config():
77
"""Super-basic test of configuration reading
88
99
This is intended as a test of testing more than anything else.
1010
"""
11-
from lsst.ctrl.bps import BpsConfig
12-
from lsst.ctrl.bps.parsl.configuration import get_bps_config_value
13-
1411
config = BpsConfig(Config.fromString("foo: bar")) # BpsConfig doesn't work directly with fromString
1512
assert get_bps_config_value(config, "foo", str) == "bar"

tests/test_import.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import pytest
2-
3-
4-
@pytest.mark.skip(reason="parsl not in LSST environment")
51
def test_import():
2+
"""Simple test that the package can be imported."""
63
import lsst.ctrl.bps.parsl # noqa

0 commit comments

Comments
 (0)