Skip to content

Commit

Permalink
Fix wkcuber --version (#494)
Browse files Browse the repository at this point in the history
* fix wkcuber --version

* include version.py

* fix placing version.py

Co-authored-by: Norman Rzepka <[email protected]>
  • Loading branch information
daniel-wer and normanrz authored Nov 30, 2021
1 parent 7ac691d commit 7abf829
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ for PKG in */pyproject.toml; do
cp pyproject.toml pyproject.toml.bak
PKG_VERSION="$(dunamai from git)"

echo "__version__ = '$PKG_VERSION'" > ./"$PKG"/version.py

poetry version "$PKG_VERSION"
# replace all relative path dependencies with the current version:
sed -i 's/\(.*\) = .* path \= \"\.\..*/\1 = "'"$PKG_VERSION"'"/g' pyproject.toml
poetry publish --build -u "$PYPI_USERNAME" -p "$PYPI_PASSWORD"

echo "__version__ = '$PKG_VERSION'" > ./"$PKG"/version.py

# Restore files
mv pyproject.toml.bak pyproject.toml

Expand Down
1 change: 1 addition & 0 deletions webknossos/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ readme = "README.md"
license = "AGPL-3.0"
repository = "https://github.com/scalableminds/webknossos-libs"
homepage = "https://docs.webknossos.org"
include = ["webknossos/version.py"]

[tool.poetry.dependencies]
python = "^3.7,>=3.7.1"
Expand Down
3 changes: 2 additions & 1 deletion wkcuber/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[tool.poetry]
name = "wkcuber"
version = "0.0.0" # filled by setuptools-scm
version = "0.0.0" # filled by dunamai
description = "Python package to create, cube, and work with webKnossos WKW datasets"
authors = ["scalable minds <[email protected]>"]
readme = "README.md"
license = "AGPL-3.0"
include = ["wkcuber/version.py"]

[tool.poetry.dependencies]
python = "^3.7"
Expand Down
2 changes: 1 addition & 1 deletion wkcuber/wkcuber/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import List, Dict

from versioning import get_available_version
from wkcuber import downsample_mags
from .compress import compress_mag_inplace
from .metadata import refresh_metadata
Expand All @@ -15,6 +14,7 @@
create_parser as create_conversion_parser,
main as auto_detect_and_run_conversion,
)
from .versioning import get_available_version
from argparse import Namespace, ArgumentParser
from pathlib import Path

Expand Down
File renamed without changes.

0 comments on commit 7abf829

Please sign in to comment.