Skip to content

Commit

Permalink
pypi workflow added
Browse files Browse the repository at this point in the history
  • Loading branch information
tomciardi committed Oct 19, 2024
1 parent f8b318f commit bc5118f
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 23 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload Python Package to PyPI when a Release is Created

on:
release:
types: [created]

jobs:
pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pointextract
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build package
run: |
python setup.py sdist bdist_wheel # Could also be python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Polar to cartesian transforms using annular point sampling
Designed to unwrap 2D cross section images of 3D X-ray computed tomography scans.
The topological transformation enables the surface of a circular or elliptical object to be aligned for downsteam analysis.

<img src="./docs/workflow.png" width="800">
<img src="./docs/workflow.png" width="700">

## Installation

Expand Down Expand Up @@ -34,6 +34,6 @@ This package is still in early development. Please feel free to post to the GitH
## Acknowledgements
This material is based upon research in the Materials Data Science for Stockpile Stewardship Center of Excellence (MDS3-COE).

[Case Western Reserve University, SDLElab] [1]
<cite> [Case Western Reserve University, SDLElab] [1]</cite>

[1]: http://sdle.case.edu
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Polar to cartesian transforms using annular point sampling.
Designed to unwrap 2D cross section images of 3D X-ray computed tomography scans.
The topological transformation enables the surface of a circular or elliptical object to be aligned for downsteam analysis.

![](workflow.png)
<img src="workflow.png" width="700">

## Installation

Expand Down
2 changes: 1 addition & 1 deletion pointextract/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .main import ellipse_detect, unwrap_image
from .main import *
26 changes: 9 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@
[build-system]
requires = ["setuptools >= 61.0"]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = 'pointextract'
version = "0.1"
description = "Polar to cartesian transforms using circular and elliptical point sampling."

dynamic = ["version"]
authors = [
{name = "Thomas Ciardi", email = "thomas.ciardi@case.edu"},
{name = "Roger H. French", email = "rxf131@case.edu"},
]
description = "Polar to cartesian transforms using annular point sampling."
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
'numpy',
'scikit-image',
]

license = {file = "LICENSE"}

classifiers = [
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering',
]

authors = [
{name = "Thomas Ciardi", email = "thomas.ciardi@case.edu"},
{name = "Roger H. French", email = "rxf131@case.edu"},
]

[project.optional-dependencies]
test = ["pytest"]

[project.urls]
"Bug Tracker" = "https://github.com/cwru-sdle/pointextract/issues"
"Source Code" = "https://github.com/cwru-sdle/pointextract"
"Bug Tracker" = "https://github.com/cwru-sdle/pointextract/issues"

[tool.setuptools.packages.find]
include = ["pointextract*"]
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
numpy==2.1.2
scikit-image==0.24.0
numpy
scikit-image

0 comments on commit bc5118f

Please sign in to comment.