Skip to content

Commit 234b35d

Browse files
authored
Merge pull request #105 from Leengit/build_and_publish
Enable publishing HistomicsDetect to PyPI as histomics_detect as GitHub release
2 parents c213750 + fdc6a3b commit 234b35d

File tree

4 files changed

+67
-43
lines changed

4 files changed

+67
-43
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build, test, package
2+
3+
on: [push,pull_request]
4+
5+
jobs:
6+
build-n-publish:
7+
name: Build and publish Python 🐍 distributions 📦 to PyPI
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: Set up Python 3.9
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: 3.9
15+
- name: Install pypa/build
16+
run: >-
17+
python -m pip install build --user
18+
- name: Build a binary wheel and a source tarball
19+
run: >-
20+
python -m build --sdist --wheel --outdir dist/ .
21+
- name: Publish distribution 📦 to PyPI
22+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
23+
uses: pypa/gh-action-pypi-publish@master
24+
with:
25+
password: ${{ secrets.PYPI_API_TOKEN }}

histomics_detect/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""A TensorFlow 2 package for cell detection"""
2+
3+
__version__ = "0.0.1"
4+
5+
"""
6+
7+
This module detects cells using TensorFlow 2.
8+
9+
"""

pyproject.toml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
[build-system]
2-
requires = [
3-
"setuptools>=42",
4-
"wheel"
2+
requires = ["flit_core >=3.4,<4"]
3+
build-backend = "flit_core.buildapi"
4+
5+
[project]
6+
name = "histomics_detect"
7+
readme = "README.rst"
8+
requires-python = ">=3.6"
9+
authors = [{name = "Lee A. D. Cooper", email = "lee.cooper@northwestern.edu"}]
10+
maintainers = [{name = "Lee A. D. Cooper", email = "lee.cooper@northwestern.edu"}]
11+
keywords = ["histomics_detect", "HistomicsDetect"]
12+
classifiers=[
13+
"Programming Language :: Python :: 3",
14+
"License :: OSI Approved :: Apache Software License",
15+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
16+
"Topic :: Scientific/Engineering :: Image Processing",
17+
"Topic :: Scientific/Engineering :: Image Recognition",
518
]
6-
build-backend = "setuptools.build_meta"
19+
dependencies = [
20+
"matplotlib",
21+
"numpy",
22+
"pandas",
23+
"Pillow",
24+
"pooch",
25+
"pyyaml",
26+
"scipy",
27+
"tensorflow-gpu>=2.4",
28+
]
29+
dynamic = ["version", "description"]
30+
31+
[project.urls]
32+
Source = "https://github.com/DigitalSlideArchive/HistomicsDetect"
33+
34+
[project.scripts]
35+
flit = "flit:main"

setup.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)