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-35047: Add upload to pypi #698

Merged
merged 1 commit into from
Jun 10, 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
37 changes: 37 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- "*"
pull_request:

jobs:
Expand Down Expand Up @@ -87,3 +89,38 @@ jobs:
uses: codecov/codecov-action@v2
with:
file: ./coverage.xml

pypi:

runs-on: ubuntu-latest
needs: [build_and_test]
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v3
with:
# Need to clone everything to embed the version.
fetch-depth: 0

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel build

- name: Build and create distribution
run: |
pip install -v -e .
python -m build --sdist --wheel

- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOADS }}
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ pyyaml >= 5.1
astropy >= 4.0
click >7.0
sqlalchemy >= 1.3
git+https://github.com/lsst/sphgeom@main#egg=lsst_sphgeom
git+https://github.com/lsst/utils@main#egg=lsst_utils
git+https://github.com/lsst/resources@main#egg=lsst_resources
pydantic
httpx
deprecated >=1.2

lsst-sphgeom
lsst-utils
lsst-resources
# optional
backoff >= 1.10
boto3 >= 1.13
Expand Down
21 changes: 14 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
[metadata]
name = daf_butler
name = lsst-daf-butler
description = An abstraction layer for reading and writing astronomical data to datastores
author = Rubin Observatory Data Management
author_email = dm-admin@lists.lsst.org
url = https://github.com/lsst/daf_butler
license = GPLv3+ License
classifiers =
Intended Audience :: Science/Research
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Astronomy
long_description = file: README.rst
long_description = file: README.md
long_description_content_type = text/markdown
version = attr: lsst.daf.butler.__version__

keywords =
lsst

[options]
zip_safe = True
package_dir=
Expand All @@ -26,9 +33,9 @@ install_requires =
pyyaml >=5.1
sqlalchemy >= 1.3
click >= 7.0
lsst_sphgeom @ git+https://github.com/lsst/sphgeom@main
lsst_utils @ git+https://github.com/lsst/utils@main
lsst_resources @ git+https://github.com/lsst/resources@main
lsst-sphgeom
lsst-utils
lsst-resources
deprecated >= 1.2
pydantic
tests_require =
Expand Down