Skip to content

Commit

Permalink
Refactor to use pyproject.toml
Browse files Browse the repository at this point in the history
Create publish-to-test-pypi.yml
  • Loading branch information
lithomson committed Oct 23, 2020
1 parent b07feb2 commit ca5119a
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v1

- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v1
with:
python-version: 3.8

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on: push

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install pep517
run: >-
python -m
pip install
pep517
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
pep517.build
--source
--binary
--out-dir dist/
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
4 changes: 2 additions & 2 deletions .github/workflows/python-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools >= 40.9.0",
"wheel",
]
build-backend = "setuptools.build_meta"
1 change: 1 addition & 0 deletions seq_dbutils/_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.2
47 changes: 47 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[metadata]
name = seq_dbutils
version = file: seq_dbutils/_version.txt
author = Laura Thomson
author-email = [email protected]
home-page = https://github.com/BDI-pathogens/seq_dbutils
description = A package of MySQL database utilities
license = MIT
license-file = LICENSE
platform = any
classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: OS Independent

[options]
include_package_data = true
python_requires = >=3.6, <=3.8
packages = seq_dbutils
test_suite = tests
setup_requires =
setuptools
install_requires =
cryptography ~=3.1.1
mysql-connector-python ~=8.0.21
pandas ~=1.1.3
SQLAlchemy ~=1.3.19

[sdist]
formats = gztar

[bdist_wheel]
universal = 1

[coverage:run]
branch = True
source = seq_dbutils

[flake8]
max-line-length = 127
exclude = .git, .eggs, __pycache__, tests/, docs/, build/, dist/
18 changes: 3 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
from setuptools import setup
#!/usr/bin/env python

setup(name="seq_dbutils",
version="0.1",
author="Laura Thomson",
author_email="[email protected]",
description="A package of MySQL database utilities",
packages=["seq_dbutils"],
install_requires=["cryptography",
"pandas",
"SQLAlchemy",
"mysql-connector-python"],
license="MIT",
python_requires='>=3.6',
url="https://github.com/BDI-pathogens/seq_dbutils",
)
import setuptools
setuptools.setup()

0 comments on commit ca5119a

Please sign in to comment.