Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-32408: Derive package version using lsst_versions #678

Merged
merged 3 commits into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build.yaml
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
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
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
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
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
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
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
@@ -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
@@ -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
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.