Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to toml package format #13

Merged
merged 4 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ on:
pull_request:

jobs:

test:
name: Test
strategy:
@@ -27,21 +26,21 @@ jobs:
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -mpip install -U wheel pip
pip install -r requirements-dev.txt
- name: Install build dependencies
run: python -m pip install build flake8
- name: Run flake8
run: flake8 ./omero_user_token
- name: Install package
run: python -m pip install .[dev]
- name: Run tests
run: |
git fetch --prune --unshallow --tags --force
git describe
flake8
python setup.py install
pytest -v
run: pytest -v

# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
publish-pypi:
@@ -50,18 +49,20 @@ jobs:
needs:
# Only publish if other jobs passed
- test
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- uses: actions/setup-python@v4
- name: Build package
run: |
# actions/checkout#206
git fetch --prune --unshallow --tags --force
python -mpip install wheel
python setup.py sdist bdist_wheel
with:
python-version: "3.9"
- name: Install build dependencies
run: python -m pip install build
- name: Build wheel
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.3.0
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include README.md
include LICENSE.txt
include version.py
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,16 +5,16 @@ API under non-interactive, headless conditions.

## Requirements

* Python 3.6+
* Python 3.9+
* OMERO.server 5.6

## Usage

Creating a user token and making it active:

omero_user_token set
omero-user-token set

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

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

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

omero_user_token get
omero-user-token get

## Token format

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

### Bash:
```bash
token=$(omero_user_token get)
token=$(omero-user-token get)
if [ $? -ne 0]; then
echo "No valid token found"
exit 1
51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[build-system]
requires = ["setuptools>=61", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
dynamic = ["version"]
name = "omero-user-token"
description = "OMERO user token management system"
readme = "README.md"
license = {file = "LICENSE.txt"}
classifiers = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
dependencies = [
'click>=7.0',
'configparser==4.0.2',
'omero-py>5.6',
]
requires-python = ">=3.9"
authors = [
{name = "Glencoe Software, Inc.", email="info@glencoesoftware.com"},
]

[project.urls]
Repository = "https://github.com/glencoesoftware/omero-user-token"

[project.scripts]
omero_user_token = "omero_user_token.cli.omero_user_token:main"
omero-user-token = "omero_user_token.cli.omero_user_token:main"


[project.optional-dependencies]
dev = [
"pytest",
"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'",
"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'",
"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'",
"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'",
"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'",
"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'",
"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'"
]

[tool.setuptools_scm]
10 changes: 0 additions & 10 deletions requirements-dev.txt

This file was deleted.

86 changes: 0 additions & 86 deletions setup.py

This file was deleted.

123 changes: 0 additions & 123 deletions version.py

This file was deleted.