Skip to content

Commit

Permalink
Merge pull request #698 from lsst/tickets/DM-35047
Browse files Browse the repository at this point in the history
DM-35047: Add upload to pypi
  • Loading branch information
mwittgen committed Jun 10, 2022
2 parents fd147dc + 9dbc6b4 commit a18d149
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 11 deletions.
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

0 comments on commit a18d149

Please sign in to comment.