diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d51cae4d..1fa72d74 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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: diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 00000000..76ad875b --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2d2e2499..c2bfd8a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: @@ -23,4 +23,4 @@ repos: - repo: https://github.com/PyCQA/flake8 rev: 4.0.1 hooks: - - id: flake8 + - id: flake8 diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 00000000..58e39dd4 --- /dev/null +++ b/.yamllint.yaml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index d1936468..ac84ae82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "lsst-versions"] +requires = ["setuptools", "lsst-versions >= 1.3.0"] build-backend = "setuptools.build_meta" [project] @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", ] +keywords = ["lsst"] dependencies = [ "lsst-utils", ] @@ -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"