Skip to content

Commit

Permalink
Merge pull request #678 from lsst/tickets/DM-32408
Browse files Browse the repository at this point in the history
DM-32408: Derive package version using lsst_versions
  • Loading branch information
timj committed Apr 19, 2022
2 parents cbf5f61 + 2902372 commit 34ba32b
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 36 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
# github change
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
# Need to clone everything for the git tags.
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ jobs:
build_sphinx_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
# Need to clone everything for the git tags.
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: "pip"
cache-dependency-path: "setup.cfg"

- name: Install sqlite
run: sudo apt-get install sqlite libyaml-dev
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docstyle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: "pip"

- name: Install
run: pip install pydocstyle
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: "pip"

- name: Install isort and black
run: pip install isort black
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: "pip"

- name: Install
run: pip install -r <(curl https://raw.githubusercontent.com/lsst/linting/main/requirements.txt)
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: "pip"
cache-dependency-path: "setup.cfg"

- name: Install
run: pip install mypy pydantic
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: "pip"

- name: Install
run: pip install yamllint
Expand Down
1 change: 1 addition & 0 deletions doc/changes/DM-32408.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Builds using ``setuptools`` now calculate versions from the Git repository, including the use of alpha releases for those associated with weekly tags.
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["setuptools", "lsst-versions"]
build-backend = "setuptools.build_meta"

[tool.towncrier]
package = "lsst.daf.butler"
package_dir = "python"
Expand All @@ -6,7 +10,6 @@
title_format = "Butler {version} {project_date}"
issue_format = "`{issue} <https://jira.lsstcorp.org/browse/{issue}>`_"


[[tool.towncrier.type]]
directory = "feature"
name = "New Features"
Expand Down Expand Up @@ -44,3 +47,6 @@ target-version = ["py38"]
[tool.isort]
profile = "black"
line_length = 110

[tool.lsst_versions]
write_to = "python/lsst/daf/butler/version.py"
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Topic :: Scientific/Engineering :: Astronomy
long_description = file: README.rst
long_description_content_type = text/markdown
version = attr: lsst.daf.butler.__version__

[options]
zip_safe = True
Expand Down Expand Up @@ -58,7 +61,7 @@ exclude = __init__.py

[tool:pytest]
addopts = --flake8
flake8-ignore = W503 E203 N802 N803 N806 N812 N815 N816 W503 E203
flake8-ignore = W503 E203 N802 N803 N806 N812 N815 N816
# The matplotlib test may not release font files.
# Some unit tests open registry database in setUpClass.
open_files_ignore = "*.ttf" "gen3.sqlite3"
Expand Down
21 changes: 0 additions & 21 deletions setup.py

This file was deleted.

0 comments on commit 34ba32b

Please sign in to comment.