Skip to content

Commit

Permalink
[scroll-renderer] PyPI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgioangel committed Dec 26, 2024
1 parent 91a4d32 commit 960ade7
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/scroll-renderer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish Scroll Renderer to PyPI

on:
push:
tags:
- 'scroll-renderer-v*'
workflow_dispatch:

jobs:
publish:
name: Publish Scroll Renderer to PyPI
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
defaults:
run:
working-directory: ./scroll-renderer

steps:
- name: Check out the code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build the package
run: |
python -m build --sdist --wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: scroll-renderer/dist
password: ${{ secrets.PYPI_API_TOKEN }}
12 changes: 8 additions & 4 deletions scroll-renderer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ It is recommended to run this package in a Conda environment to manage dependenc

## Installation

1. Clone the repository and navigate to the project directory:
2. Install with pip and accept `vesuvius` terms:

```bash
git clone https://github.com/your-repo/scroll_renderer.git
cd scroll_renderer
pip install scroll-renderer
vesuvius.accept_terms --yes
```

2. Install the package in editable mode and accept `vesuvius` terms:
You can also install the package in editable mode:

2. Clone the repository and navigate to the project directory, install and accept `vesuvius` terms:

```bash
git clone https://github.com/your-repo/scroll_renderer.git
cd scroll_renderer
pip install -e .
vesuvius.accept_terms --yes
```
Expand Down
3 changes: 3 additions & 0 deletions scroll-renderer/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
16 changes: 15 additions & 1 deletion scroll-renderer/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

from setuptools import setup, find_packages


with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
name='scroll_renderer',
version='0.0.2',
version='0.0.2a',
packages=find_packages(),
install_requires=[
'numpy',
Expand Down Expand Up @@ -35,8 +39,18 @@
},
author='Vesuvius Challenge Team',
author_email='[email protected]',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/ScrollPrize/villa',
description='A package for flattening and rendering 3D meshes of segments of the Herculaneum Papyri.',
classifiers=[
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.11',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Topic :: Software Development :: Libraries',
'Topic :: Scientific/Engineering',
],
)

0 comments on commit 960ade7

Please sign in to comment.