File tree Expand file tree Collapse file tree 5 files changed +123
-15
lines changed Expand file tree Collapse file tree 5 files changed +123
-15
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish pip on PyPi
2
+
3
+ on : workflow_dispatch
4
+
5
+ jobs :
6
+ publish-to-production-pypi :
7
+ strategy :
8
+ matrix :
9
+ os : [ ubuntu-latest ]
10
+ python-version : [ "3.9" ]
11
+
12
+ runs-on : ${{ matrix.os }}
13
+
14
+ steps :
15
+ - name : Checkout repository
16
+ uses : actions/checkout@v3
17
+
18
+ - name : Set up Python ${{ matrix.python-version }}
19
+ uses : actions/setup-python@v3
20
+ with :
21
+ python-version : ${{ matrix.python-version }}
22
+
23
+ - name : Install dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install -r requirements.txt
27
+ pip install poetry
28
+
29
+ - name : Publish to production PyPI
30
+ run : |
31
+ poetry version $(git describe --tags --abbrev=0)
32
+ poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
33
+ poetry publish --build
Original file line number Diff line number Diff line change 7
7
branches : [ "main" ]
8
8
9
9
jobs :
10
- build :
10
+ lints-and-tests :
11
11
12
12
runs-on : ubuntu-latest
13
13
strategy :
45
45
pip install .
46
46
pytest
47
47
env :
48
- NUMBA_ENABLE_CUDASIM : 1
48
+ NUMBA_ENABLE_CUDASIM : 1
49
+
50
+ publish-package :
51
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
52
+ needs : lints-and-tests
53
+
54
+ strategy :
55
+ matrix :
56
+ os : [ ubuntu-latest ]
57
+ python-version : [ "3.9" ]
58
+
59
+ runs-on : ${{ matrix.os }}
60
+
61
+ steps :
62
+ - name : Checkout repository
63
+ uses : actions/checkout@v3
64
+
65
+ - name : Set up Python ${{ matrix.python-version }}
66
+ uses : actions/setup-python@v3
67
+ with :
68
+ python-version : ${{ matrix.python-version }}
69
+
70
+ - name : Install dependencies
71
+ run : |
72
+ python -m pip install --upgrade pip
73
+ pip install -r requirements.txt
74
+ pip install poetry
75
+
76
+ - name : Publish to test PyPI
77
+ run : |
78
+ poetry version $(git describe --tags --abbrev=0)
79
+ poetry config repositories.test-pypi https://test.pypi.org/legacy/
80
+ poetry config pypi-token.test-pypi ${{ secrets.TEST_PYPI_TOKEN }}
81
+ poetry publish -r test-pypi --build
Original file line number Diff line number Diff line change
1
+ # Publish package to PyPi
2
+
3
+ Firstly you have to ensure, that package properly builds, publishes and works.
4
+ To do this, you must first publish it on https://test.pypi.org
5
+
6
+ 1 . Create tag on main branch:
7
+ ``` commandline
8
+ git tag <tagname>
9
+ ```
10
+ 2. Push created tag to repository
11
+ ```commandline
12
+ git push origin <tagname>
13
+ ```
14
+ After this GitHubActions will automatically build pip package and push it to test PyPi registry
15
+ 3. Ensure, that installed pip package from https://test.pypi.org works properly
16
+ ```commandline
17
+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple octreelib==<tagname>
18
+ ```
19
+ 4. Publish pip package manually on production PyPi using the following steps:
20
+ - Go to Actions page
21
+ - Go to "Publish pip on PyPi" workflow on left side of the screen
22
+ - Go to "Run workflow" and choose last tag which has been created from tags
23
+ - Click "Run workflow"
24
+
25
+ After this GitHubActions will automatically build pip package and push it to test production registry
Original file line number Diff line number Diff line change 1
1
# Octreelib
2
2
3
- [ ![ tests] ( https://github.com/prime-slam/octreelib/actions/workflows/python-package .yml/badge.svg?branch=main )] ( https://github.com/prime-slam/octreelib/actions/workflows/python-package.yml )
3
+ [ ![ tests] ( https://github.com/prime-slam/octreelib/actions/workflows/test .yml/badge.svg?branch=main )] ( https://github.com/prime-slam/octreelib/actions/workflows/python-package.yml )
4
4
[ ![ Code style: black] ( https://img.shields.io/badge/code%20style-black-black )] ( )
5
5
[ ![ Code style: black] ( https://img.shields.io/badge/code%20style-flake8-black )] ( )
6
6
[ ![ License: Apache License 2.0] ( https://img.shields.io/github/license/saltstack/salt )] ( https://opensource.org/license/apache-2-0/ )
@@ -17,12 +17,12 @@ in the same grid synchronizing their subdivision schemes.
17
17
To install the latest version of the library, run
18
18
19
19
``` shell
20
- pip install git+https://github.com/prime-slam/ octreelib
20
+ pip install octreelib
21
21
```
22
22
23
- To install a specific version, use ** tags** , for example tag ` v0 .0.3 `
23
+ To install a specific version, use ** tags** , for example tag ` 0 .0.1 `
24
24
25
25
``` shell
26
- pip install git+https://github.com/prime-slam/ octreelib@v0 .0.3
26
+ pip install octreelib==0 .0.1
27
27
```
28
28
Original file line number Diff line number Diff line change 1
- [project ]
1
+ [tool . poetry ]
2
2
name = " octreelib"
3
- dynamic = [" dependencies" ]
4
- version = " 0.0.5"
3
+ version = " 0.0.0"
4
+ description = " Library for representing point clouds as OcTrees in SLAM"
5
+ authors = [
6
+ " Kiselyov Mikhail <kiselev.0353@gmail.com>" ,
7
+ " Pavel Mokeev <pav3l.mokeev@gmail.com>"
8
+ ]
9
+ license = " APACHE"
10
+ readme = " README.md"
11
+ homepage = " https://github.com/prime-slam/"
12
+ repository = " https://github.com/prime-slam/octreelib"
13
+ classifiers = [
14
+ " License :: OSI Approved :: Apache Software License" ,
15
+ " Intended Audience :: Developers" ,
16
+ " Topic :: Software Development :: Libraries :: Python Modules" ,
17
+ ]
18
+ exclude = [" test" ]
5
19
6
- [tool .setuptools ]
7
- include-package-data = false
20
+ [tool .poetry .dependencies ]
21
+ python = " ^3.9.0"
22
+ numpy = " ^1.26.0"
23
+ k3d = " ^2.16.0"
8
24
9
- [tool .setuptools . dynamic ]
10
- dependencies = { file = [ " requirements.txt " ] }
25
+ [tool .poetry . dev-dependencies ]
26
+ pytest = " ^7.4.2 "
11
27
12
- [tool .setuptools .packages .find ]
13
- exclude = [" test*" ]
28
+ [build-system ]
29
+ requires = [" poetry-core>=1.0.0" ]
30
+ build-backend = " poetry.core.masonry.api"
You can’t perform that action at this time.
0 commit comments