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 resources version number during build #12

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
7 changes: 5 additions & 2 deletions .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 Expand Up @@ -64,7 +67,7 @@ jobs:
- name: Build and install
shell: bash -l {0}
run: |
pip install -v -e .
python -m pip install --no-deps -v -e .

- name: Run tests
shell: bash -l {0}
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: Update pip/wheel infrastructure
run: |
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 @@ -11,12 +11,13 @@ jobs:
runs-on: ubuntu-latest
name: check Python formatting
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
5 changes: 3 additions & 2 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ 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"

- name: Install
run: pip install mypy
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.
7 changes: 7 additions & 0 deletions 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.resources"
package_dir = "python"
Expand Down Expand Up @@ -49,3 +53,6 @@ target-version = ["py38"]
[tool.isort]
profile = "black"
line_length = 110

[tool.lsst_versions]
write_to = "python/lsst/resources/version.py"
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Topic :: Scientific/Engineering :: Astronomy
readme = file: README.md

[options]
zip_safe = True
Expand Down
32 changes: 0 additions & 32 deletions setup.py

This file was deleted.