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

Update package specification and build system #23

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 25 additions & 52 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,36 @@
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions

name: Build
on:
push:
tags:
- '*'
pull_request:

jobs:

test:
name: Test
strategy:
# Keep running so we can see if other tests pass
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
os:
- ubuntu-20.04
include:
- python-version: '3.8'
os: macos-latest
- python-version: '3.8'
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install -U wheel flake8 virtualenv
- name: Run tests
run: |
git fetch --prune --unshallow --tags --force
git describe
flake8
python setup.py build

# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
publish-pypi:
name: Pypi
if: startsWith(github.ref, 'refs/tags')
needs:
# Only publish if other jobs passed
- test
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Build package
run: |
# actions/checkout#206
git fetch --prune --unshallow --tags --force
python -m pip install wheel setuptools
python setup.py sdist bdist_wheel
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install build dependencies
run: python -m pip install build flake8
- name: Run flake8
run: flake8 ./omero2pandas
- name: Build wheel
run: python -m build
- name: Artifact upload
uses: actions/upload-artifact@v4
with:
path: dist/*.whl
retention-days: 30
- name: Publish to PyPI
uses: pypa/[email protected]
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

File renamed without changes.
36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[build-system]
requires = ["setuptools>=61", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
dynamic = ["version"]
name = "omero2pandas"
description = "OMERO.tables to pandas bridge"
readme = "README.md"
license = {file = "LICENSE.txt"}
dependencies = [
'omero-py>=5.19.5',
'pandas>2',
'tqdm',
]
requires-python = ">=3.9"
authors = [
{name = "Glencoe Software, Inc.", email="[email protected]"},
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python :: 3',
]


[project.optional-dependencies]
token = ["omero-user-token>=0.3.0"]

[project.urls]
github = "https://github.com/glencoesoftware/omero2pandas"

[tool.setuptools_scm]
61 changes: 0 additions & 61 deletions setup.py

This file was deleted.

123 changes: 0 additions & 123 deletions version.py

This file was deleted.

Loading