Skip to content

Commit 8851342

Browse files
authored
Merge pull request #64 from lbr-stack/dev_publish
lgtm
2 parents 02b0909 + b88c62e commit 8851342

File tree

3 files changed

+127
-6
lines changed

3 files changed

+127
-6
lines changed

.github/workflows/publish.yaml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
name: Build distribution 📦
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
persist-credentials: false
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.x"
18+
- name: Install pypa/build
19+
run: >-
20+
python3 -m
21+
pip install
22+
build
23+
--user
24+
- name: Build a binary wheel and a source tarball
25+
run: python3 -m build
26+
- name: Store the distribution packages
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: python-package-distributions
30+
path: dist/
31+
32+
publish-to-pypi:
33+
name: >-
34+
Publish Python 🐍 distribution 📦 to PyPI
35+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
36+
needs:
37+
- build
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: pypi
41+
url: https://pypi.org/p/roboreg # Replace <package-name> with your PyPI project name
42+
permissions:
43+
id-token: write # IMPORTANT: mandatory for trusted publishing
44+
45+
steps:
46+
- name: Download all the dists
47+
uses: actions/download-artifact@v4
48+
with:
49+
name: python-package-distributions
50+
path: dist/
51+
- name: Publish distribution 📦 to PyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1
53+
54+
github-release:
55+
name: >-
56+
Sign the Python 🐍 distribution 📦 with Sigstore
57+
and upload them to GitHub Release
58+
needs:
59+
- publish-to-pypi
60+
runs-on: ubuntu-latest
61+
62+
permissions:
63+
contents: write # IMPORTANT: mandatory for making GitHub Releases
64+
id-token: write # IMPORTANT: mandatory for sigstore
65+
66+
steps:
67+
- name: Download all the dists
68+
uses: actions/download-artifact@v4
69+
with:
70+
name: python-package-distributions
71+
path: dist/
72+
- name: Sign the dists with Sigstore
73+
uses: sigstore/gh-action-sigstore-python@v3.0.0
74+
with:
75+
inputs: >-
76+
./dist/*.tar.gz
77+
./dist/*.whl
78+
- name: Create GitHub Release
79+
env:
80+
GITHUB_TOKEN: ${{ github.token }}
81+
run: >-
82+
gh release create
83+
"$GITHUB_REF_NAME"
84+
--repo "$GITHUB_REPOSITORY"
85+
--notes ""
86+
- name: Upload artifact signatures to GitHub Release
87+
env:
88+
GITHUB_TOKEN: ${{ github.token }}
89+
# Upload to GitHub Release using the `gh` CLI.
90+
# `dist/` contains the built packages, and the
91+
# sigstore-produced signatures and certificates.
92+
run: >-
93+
gh release upload
94+
"$GITHUB_REF_NAME" dist/**
95+
--repo "$GITHUB_REPOSITORY"
96+
97+
publish-to-testpypi:
98+
name: Publish Python 🐍 distribution 📦 to TestPyPI
99+
needs:
100+
- build
101+
runs-on: ubuntu-latest
102+
103+
environment:
104+
name: testpypi
105+
url: https://test.pypi.org/p/roboreg
106+
107+
permissions:
108+
id-token: write # IMPORTANT: mandatory for trusted publishing
109+
110+
steps:
111+
- name: Download all the dists
112+
uses: actions/download-artifact@v4
113+
with:
114+
name: python-package-distributions
115+
path: dist/
116+
- name: Publish distribution 📦 to TestPyPI
117+
uses: pypa/gh-action-pypi-publish@release/v1
118+
with:
119+
repository-url: https://test.pypi.org/legacy/
120+
verbose: true

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ Three install options are provided:
4545
To `pip` intall `roboreg`, simply run
4646

4747
```shell
48-
git clone git@github.com:lbr-stack/roboreg.git && \
49-
pip3 install roboreg/
48+
pip3 install roboreg
5049
```
5150

5251
### Conda (Installs CUDA Toolkit)
@@ -124,7 +123,7 @@ This is a required step to generate robot masks.
124123
```shell
125124
rr-sam2 \
126125
--path test/data/lbr_med7/zed2i \
127-
--pattern "*_image_*.png" \
126+
--pattern "left_image_*.png" \
128127
--n-positive-samples 5 \
129128
--n-negative-samples 5 \
130129
--device cuda

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ build-backend = "setuptools.build_meta"
66
name = "roboreg"
77
version = "0.4.4"
88
authors = [
9-
{ name="mhubii", email="m.huber_1994@hotmail.de" },
9+
{name="mhubii", email="m.huber_1994@hotmail.de"},
10+
{name="haydnspass", email="lucasraphael.mueller@gmail.com"},
1011
]
1112
maintainers = [
1213
{name = "mhubii", email = "m.huber_1994@hotmail.de"},
14+
{name="haydnspass", email="lucasraphael.mueller@gmail.com"},
1315
]
1416
description = "Unified eye-in-hand / eye-to-hand calibration from RGB-D images using robot mesh as calibration target."
1517
readme = "README.md"
1618
requires-python = ">=3.10"
1719
dependencies = [
20+
"diffrp-nvdiffrast",
1821
"fast_simplification",
1922
"huggingface_hub",
2023
"pycollada",
@@ -23,10 +26,9 @@ dependencies = [
2326
"pyvista",
2427
"ninja",
2528
"numpy",
26-
"nvdiffrast@git+https://github.com/NVlabs/nvdiffrast.git",
2729
"opencv-python",
2830
"rich",
29-
"SAM-2@git+https://github.com/facebookresearch/segment-anything-2.git",
31+
"sam2",
3032
"torch",
3133
"transformations",
3234
"trimesh",

0 commit comments

Comments
 (0)