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

Wkcuber with typer #903

Merged
merged 39 commits into from Jun 19, 2023
Merged

Wkcuber with typer #903

merged 39 commits into from Jun 19, 2023

Conversation

markbader
Copy link
Contributor

@markbader markbader commented May 16, 2023

Description:

  • Restructure wkcuber CLI with typer and webknossos-libs

Issues:

Todos:

Make sure to delete unnecessary points or to check all before merging:

  • Updated Changelog
  • Updated Documentation
  • Added / Updated Tests

Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff. It is looking nice already. Good to see all the code gone.
I think we should keep some of the old modules, though, because users are still using these.
Also, please check that the Zarr support still works (including remote stores such as S3, HTTP). This is very important for us in the future because we want to drop WKW in favor of Zarr.

wkcuber/Changelog.md Outdated Show resolved Hide resolved
wkcuber/Dockerfile Show resolved Hide resolved
wkcuber/README.md Show resolved Hide resolved
wkcuber/README.md Show resolved Hide resolved
wkcuber/README.md Show resolved Hide resolved
wkcuber/wkcuber/export_wkw_as_tiff.py Outdated Show resolved Hide resolved
wkcuber/README.md Show resolved Hide resolved
wkcuber/tests/test_cli.py Outdated Show resolved Hide resolved
wkcuber/tests/test_cli.py Show resolved Hide resolved
wkcuber/wkcuber/utils.py Outdated Show resolved Hide resolved
wkcuber/README.md Show resolved Hide resolved
wkcuber/README.md Outdated Show resolved Hide resolved
wkcuber/README.md Outdated Show resolved Hide resolved
wkcuber/README.md Outdated Show resolved Hide resolved
wkcuber/README.md Outdated Show resolved Hide resolved
wkcuber/wkcuber/download.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/download.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/download.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/download.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/download.py Outdated Show resolved Hide resolved
Copy link
Member

@hotzenklotz hotzenklotz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job integrating Typer and simplifying the wkcuber into a light-weight wrapper. This was long overdue.

Please see my comments for improvements. I was very picky with the naming conventions and help texts but these are the most user-facing "interface" when using the CLI tools. They should be consistent, as precise and helpful as possible. Offer small examples wherever possible, especially for SCM-proprietary formats, e.g., Mag strings.

If we do not explain our tools well, people will find them frustrating or difficult and not use them, which would be a waste. #make our users happy

wkcuber/wkcuber/convert.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/upload.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/upload.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/upload.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/upload.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/upsample.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/upsample.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/utils.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/utils.py Outdated Show resolved Hide resolved
wkcuber/wkcuber/utils.py Outdated Show resolved Hide resolved
Copy link
Member

@hotzenklotz hotzenklotz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job integrating Typer and simplifying the wkcuber into a light-weight wrapper. This was long overdue.

Please see my comments for improvements. I was very picky with the naming conventions and help texts but these are the most user-facing "interface" when using the CLI tools. They should be consistent, as precise and helpful as possible. Offer small examples wherever possible, especially for SCM-proprietary formats, e.g., Mag strings.

If we do not explain our tools well, people will find them frustrating or difficult and not use them, which would be a waste. #make our users happy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Careful with the autoformatter here. The automatic release tools require the empty lines.

wkcuber/README.md Outdated Show resolved Hide resolved
wkcuber/wkcuber/download.py Outdated Show resolved Hide resolved
wkcuber/Dockerfile Outdated Show resolved Hide resolved
wkcuber/README.md Outdated Show resolved Hide resolved
wkcuber/README.md Outdated Show resolved Hide resolved
wkcuber/pyproject.toml Outdated Show resolved Hide resolved
wkcuber/README.md Outdated Show resolved Hide resolved
@hotzenklotz
Copy link
Member

@markbader I had a quick look through the PR changes. Many comments have already been addressed. Nice! Please mark resolved comments with the GitHub feature/button "Resolve Conversation".

There are a number of open questions from my original PR feedback which remain unanswered. Please respond (alternatively, we can go through them offline).

docs/mkdocs.yml Outdated Show resolved Hide resolved
docs/src/cli/index.md Outdated Show resolved Hide resolved
docs/src/cli/index.md Show resolved Hide resolved
webknossos/Changelog.md Outdated Show resolved Hide resolved
TESTDATA_DIR = Path(__file__).parent.parent / "testdata"


@pytest.fixture(scope="module", name="remote_testoutput_path")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we share this code with test_dataset.py?

webknossos/webknossos/cli/_utils.py Outdated Show resolved Hide resolved
webknossos/webknossos/cli/_utils.py Outdated Show resolved Hide resolved
webknossos/webknossos/cli/_utils.py Outdated Show resolved Hide resolved
webknossos/webknossos/cli/_utils.py Outdated Show resolved Hide resolved
webknossos/tests/test_cli.py Show resolved Hide resolved
webknossos/Changelog.md Outdated Show resolved Hide resolved
Co-authored-by: Norman Rzepka <code@normanrz.com>
Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'll do another round of testing on Monday. Then, it is ready to merge from my pov.

str(tmp_path),
],
)
assert result.exit_code == 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for differing datasets, the exit code should not be 0. Otherwise it is hard to use this command in bash scripts.

@normanrz
Copy link
Member

I did another round of testing. Once the exit code in check-equality is fixed, this PR is ready to merge.

@normanrz
Copy link
Member

Great stuff! Thanks for pushing through on this. I'll leave you the honor of pressing the merge button!

@markbader markbader dismissed hotzenklotz’s stale review June 19, 2023 20:58

The requested changes are implemented and @normanrz approved this PR

@markbader markbader merged commit bd12e56 into master Jun 19, 2023
19 checks passed
@markbader markbader deleted the wkcuber_with_typer branch June 19, 2023 21:01
@jstriebel
Copy link
Contributor

So great to see this happening! 🎉 Congrats @markbader!
Screenshot from 2023-06-20 23-11-46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restructure wkcuber commands / Build new CLI
4 participants