Skip to content

Commit 702ddfb

Browse files
author
Matthias Wittgen
committed
Switch to pyproject.toml, add yamllint workflow
1 parent 1a01190 commit 702ddfb

File tree

5 files changed

+39
-7
lines changed

5 files changed

+39
-7
lines changed

.github/workflows/build.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ jobs:
7575
- name: Run tests
7676
shell: bash -l {0}
7777
run: |
78-
pytest -r a -v -n 3 --open-files --cov=lsst.resources --cov=tests --cov-report=xml --cov-report=term --cov-branch
78+
pytest -r a -v -n 3 --open-files --cov=lsst.resources\
79+
--cov=tests --cov-report=xml --cov-report=term --cov-branch
7980
- name: Upload coverage to codecov
8081
uses: codecov/codecov-action@v2
8182
with:

.github/workflows/yamllint.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Lint YAML Files
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
call-workflow:
11+
uses: lsst/rubin_workflows/.github/workflows/yamllint.yaml@main

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
33
rev: v4.3.0
44
hooks:
5-
- id: check-yaml
6-
- id: end-of-file-fixer
7-
- id: trailing-whitespace
8-
- id: check-toml
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- id: check-toml
99
- repo: https://github.com/psf/black
1010
rev: 22.3.0
1111
hooks:
@@ -23,4 +23,4 @@ repos:
2323
- repo: https://github.com/PyCQA/flake8
2424
rev: 4.0.1
2525
hooks:
26-
- id: flake8
26+
- id: flake8

.yamllint.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
extends: default
2+
3+
ignore: |
4+
/tests/config/dbAuth/badDbAuth2.yaml
5+
6+
rules:
7+
document-start: {present: false}
8+
line-length:
9+
max: 132
10+
allow-non-breakable-words: true
11+
allow-non-breakable-inline-mappings: true
12+
ignore: |
13+
/.github/workflows/lint.yaml
14+
truthy:
15+
# "on" as a key in workflows confuses things
16+
ignore: |
17+
/.github/workflows/
18+
indentation:
19+
indent-sequences: consistent

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ classifiers = [
1919
"Programming Language :: Python :: 3.9",
2020
"Programming Language :: Python :: 3.10",
2121
]
22+
keywords = ["lsst"]
2223
dependencies = [
2324
"lsst-utils",
2425
]
@@ -59,7 +60,7 @@ license-files = ["COPYRIGHT", "LICENSE"]
5960
"lsst.resources" = ["py.typed"]
6061

6162
[tool.setuptools.dynamic]
62-
version = { attr = "lsst.resources.__version__" }
63+
version = { attr = "lsst_versions.get_lsst_version" }
6364

6465
[tool.towncrier]
6566
package = "lsst.resources"

0 commit comments

Comments
 (0)