-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from lsst/tickets/DM-38499
DM-38499: Fix minor ruff issue and re-enable tests
- Loading branch information
Showing
7 changed files
with
50 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |