Skip to content

Commit 8cf330c

Browse files
authored
Restore cubing main method which takes namespace args (#507)
* restore cubing main method which takes namespace args (aka cube_with_args) * update and clean up changelogs
1 parent 26ecd38 commit 8cf330c

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

webknossos/Changelog.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ For upgrade instructions, please check the respective *Breaking Changes* section
2929
## [v0.8.24](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.8.24) - 2021-11-30
3030
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v0.8.23...v0.8.24)
3131

32-
### Fixed
33-
- Fixed `--version` CLI argument. [#493](https://github.com/scalableminds/webknossos-libs/pull/493)
34-
3532

3633
## [v0.8.23](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.8.23) - 2021-11-29
3734
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v0.8.22...v0.8.23)

wkcuber/Changelog.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,26 @@ For upgrade instructions, please check the respective *Breaking Changes* section
1212
### Breaking Changes in Config & CLI
1313

1414
### Added
15-
- `wkcuber.convert_raw` conversion tool for raw binary data files. [#498](https://github.com/scalableminds/webknossos-libs/pull/498)
16-
- Added the `wkcuber` executable that is installed when the package is installed. [#495](https://github.com/scalableminds/webknossos-libs/pull/495)
15+
- Added importable `cube_with_args` function to main module of wkcuber. [#507](https://github.com/scalableminds/webknossos-libs/pull/507)
1716

1817
### Changed
1918

2019
### Fixed
2120

2221

22+
## [v0.8.25](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.8.25) - 2021-12-07
23+
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v0.8.24...v0.8.25)
24+
25+
### Added
26+
- `wkcuber.convert_raw` conversion tool for raw binary data files. [#498](https://github.com/scalableminds/webknossos-libs/pull/498)
27+
- Added the `wkcuber` executable that is installed when the package is installed. [#495](https://github.com/scalableminds/webknossos-libs/pull/495)
28+
29+
## [v0.8.24](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.8.24) - 2021-11-30
30+
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v0.8.23...v0.8.24)
31+
32+
### Fixed
33+
- Fixed `--version` CLI argument. [#493](https://github.com/scalableminds/webknossos-libs/pull/493)
34+
2335
## [v0.8.23](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.8.23) - 2021-11-29
2436
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v0.8.18...v0.8.23)
2537

wkcuber/wkcuber/__main__.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
main as auto_detect_and_run_conversion,
1616
)
1717
from .versioning import get_available_version
18-
from argparse import ArgumentParser
18+
from argparse import Namespace, ArgumentParser
1919
from pathlib import Path
2020

2121

@@ -71,10 +71,7 @@ def create_parser() -> ArgumentParser:
7171
return parser
7272

7373

74-
def main() -> None:
75-
args = create_parser().parse_args()
76-
setup_logging(args)
77-
74+
def cube_with_args(args: Namespace) -> None:
7875
if args.isotropic is not None:
7976
raise DeprecationWarning(
8077
"The flag 'isotropic' is deprecated. Consider using '--sampling_mode isotropic' instead."
@@ -107,5 +104,11 @@ def main() -> None:
107104
refresh_metadata(args.target_path)
108105

109106

107+
def main() -> None:
108+
args = create_parser().parse_args()
109+
setup_logging(args)
110+
cube_with_args(args)
111+
112+
110113
if __name__ == "__main__":
111114
main()

0 commit comments

Comments
 (0)