Skip to content

Commit eb7dfdb

Browse files
authored
Merge pull request #13 from DavidStirling/mods
Migrate to toml package format
2 parents 5eee44c + 151dd60 commit eb7dfdb

File tree

7 files changed

+79
-247
lines changed

7 files changed

+79
-247
lines changed

.github/workflows/workflow.yml

+23-22
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
pull_request:
77

88
jobs:
9-
109
test:
1110
name: Test
1211
strategy:
@@ -27,21 +26,21 @@ jobs:
2726
os: windows-latest
2827
runs-on: ${{ matrix.os }}
2928
steps:
30-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
ref: ${{ github.ref }}
3133
- uses: actions/setup-python@v4
3234
with:
3335
python-version: ${{ matrix.python-version }}
34-
- name: Install dependencies
35-
run: |
36-
python -mpip install -U wheel pip
37-
pip install -r requirements-dev.txt
36+
- name: Install build dependencies
37+
run: python -m pip install build flake8
38+
- name: Run flake8
39+
run: flake8 ./omero_user_token
40+
- name: Install package
41+
run: python -m pip install .[dev]
3842
- name: Run tests
39-
run: |
40-
git fetch --prune --unshallow --tags --force
41-
git describe
42-
flake8
43-
python setup.py install
44-
pytest -v
43+
run: pytest -v
4544

4645
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
4746
publish-pypi:
@@ -50,18 +49,20 @@ jobs:
5049
needs:
5150
# Only publish if other jobs passed
5251
- test
53-
runs-on: ubuntu-latest
52+
runs-on: ubuntu-24.04
5453
steps:
55-
- uses: actions/checkout@v3
54+
- uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
ref: ${{ github.ref }}
5658
- uses: actions/setup-python@v4
57-
- name: Build package
58-
run: |
59-
# actions/checkout#206
60-
git fetch --prune --unshallow --tags --force
61-
python -mpip install wheel
62-
python setup.py sdist bdist_wheel
59+
with:
60+
python-version: "3.9"
61+
- name: Install build dependencies
62+
run: python -m pip install build
63+
- name: Build wheel
64+
run: python -m build
6365
- name: Publish to PyPI
64-
uses: pypa/gh-action-pypi-publish@v1.3.0
66+
uses: pypa/gh-action-pypi-publish@release/v1
6567
with:
6668
password: ${{ secrets.PYPI_API_TOKEN }}
67-

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
include README.md
22
include LICENSE.txt
3-
include version.py

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ API under non-interactive, headless conditions.
55

66
## Requirements
77

8-
* Python 3.6+
8+
* Python 3.9+
99
* OMERO.server 5.6
1010

1111
## Usage
1212

1313
Creating a user token and making it active:
1414

15-
omero_user_token set
15+
omero-user-token set
1616

17-
Please see `omero_user_token set --help` for detailed information. The
17+
Please see `omero-user-token set --help` for detailed information. The
1818
default server hostname and port can be set in
1919
`${HOME}/.omero_user_token/config` using an INI file compatible style:
2020

@@ -24,7 +24,7 @@ default server hostname and port can be set in
2424

2525
Retrieving the current active token (validation will be performed):
2626

27-
omero_user_token get
27+
omero-user-token get
2828

2929
## Token format
3030

@@ -36,7 +36,7 @@ The token format is as follows:
3636

3737
### Bash:
3838
```bash
39-
token=$(omero_user_token get)
39+
token=$(omero-user-token get)
4040
if [ $? -ne 0]; then
4141
echo "No valid token found"
4242
exit 1

pyproject.toml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[build-system]
2+
requires = ["setuptools>=61", "setuptools-scm"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
dynamic = ["version"]
7+
name = "omero-user-token"
8+
description = "OMERO user token management system"
9+
readme = "README.md"
10+
license = {file = "LICENSE.txt"}
11+
classifiers = [
12+
'Development Status :: 5 - Production/Stable',
13+
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
14+
'Intended Audience :: Science/Research',
15+
'Intended Audience :: Developers',
16+
'Programming Language :: Python :: 3.9',
17+
'Programming Language :: Python :: 3.10',
18+
'Programming Language :: Python :: 3.11',
19+
'Programming Language :: Python :: 3.12',
20+
]
21+
dependencies = [
22+
'click>=7.0',
23+
'configparser==4.0.2',
24+
'omero-py>5.6',
25+
]
26+
requires-python = ">=3.9"
27+
authors = [
28+
{name = "Glencoe Software, Inc.", email="[email protected]"},
29+
]
30+
31+
[project.urls]
32+
Repository = "https://github.com/glencoesoftware/omero-user-token"
33+
34+
[project.scripts]
35+
omero_user_token = "omero_user_token.cli.omero_user_token:main"
36+
omero-user-token = "omero_user_token.cli.omero_user_token:main"
37+
38+
39+
[project.optional-dependencies]
40+
dev = [
41+
"pytest",
42+
"zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp39-cp39-manylinux_2_28_x86_64.whl ; platform_system=='Linux' and python_version=='3.9'",
43+
"zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp310-cp310-manylinux_2_28_x86_64.whl ; platform_system=='Linux' and python_version=='3.10'",
44+
"zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp311-cp311-manylinux_2_28_x86_64.whl ; platform_system=='Linux' and python_version=='3.11'",
45+
"zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp312-cp312-manylinux_2_28_x86_64.whl ; platform_system=='Linux' and python_version=='3.12'",
46+
"zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-macos-x86_64/releases/download/20231130/zeroc_ice-3.6.5-cp39-cp39-macosx_11_0_x86_64.whl ; platform_system=='Darwin' and python_version=='3.9'",
47+
"zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-macos-universal2/releases/download/20240131/zeroc_ice-3.6.5-cp310-cp310-macosx_11_0_universal2.whl ; platform_system=='Darwin' and python_version=='3.10'",
48+
"zeroc-ice @ https://github.com/glencoesoftware/zeroc-ice-py-win-x86_64/releases/download/20240325/zeroc_ice-3.6.5-cp39-cp39-win_amd64.whl ; platform_system=='Windows' and python_version=='3.9'"
49+
]
50+
51+
[tool.setuptools_scm]

requirements-dev.txt

-10
This file was deleted.

setup.py

-86
This file was deleted.

version.py

-123
This file was deleted.

0 commit comments

Comments
 (0)