Skip to content

Commit

Permalink
Switch to pyproject.toml, add yamllint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Wittgen committed Jul 11, 2022
1 parent 1a01190 commit 702ddfb
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ jobs:
- name: Run tests
shell: bash -l {0}
run: |
pytest -r a -v -n 3 --open-files --cov=lsst.resources --cov=tests --cov-report=xml --cov-report=term --cov-branch
pytest -r a -v -n 3 --open-files --cov=lsst.resources\
--cov=tests --cov-report=xml --cov-report=term --cov-branch
- name: Upload coverage to codecov
uses: codecov/codecov-action@v2
with:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Lint YAML Files

on:
push:
branches:
- main
pull_request:

jobs:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/yamllint.yaml@main
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-toml
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
Expand All @@ -23,4 +23,4 @@ repos:
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
- id: flake8
19 changes: 19 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
extends: default

ignore: |
/tests/config/dbAuth/badDbAuth2.yaml
rules:
document-start: {present: false}
line-length:
max: 132
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
ignore: |
/.github/workflows/lint.yaml
truthy:
# "on" as a key in workflows confuses things
ignore: |
/.github/workflows/
indentation:
indent-sequences: consistent
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
keywords = ["lsst"]
dependencies = [
"lsst-utils",
]
Expand Down Expand Up @@ -59,7 +60,7 @@ license-files = ["COPYRIGHT", "LICENSE"]
"lsst.resources" = ["py.typed"]

[tool.setuptools.dynamic]
version = { attr = "lsst.resources.__version__" }
version = { attr = "lsst_versions.get_lsst_version" }

[tool.towncrier]
package = "lsst.resources"
Expand Down

0 comments on commit 702ddfb

Please sign in to comment.