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

SkeletonClient changes, mainly simplification of output formats #265

Merged
merged 30 commits into from
Nov 18, 2024

Conversation

kebwi
Copy link
Collaborator

@kebwi kebwi commented Nov 12, 2024

No description provided.

@kebwi kebwi requested review from ceesem and fcollman November 12, 2024 23:53
del sk_json['vertex_properties']
return sk_json
if endpoint_format == "flatdict":
assert self._server_version >= Version("0.6.0")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should raise a more informative exception telling the user to contact their system administrator to ask them to upgrade their skeleton service to at least 0.6.0

Copy link
Collaborator Author

@kebwi kebwi Nov 18, 2024

Choose a reason for hiding this comment

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

@fcollman But this is a genuine assertion, a verification that the code is performing correctly. The function only receives "dict" and "swc" as inputs (see the function signature). Then on line 475, "dict" is translated to one of two internal formats ("jsoncompressed" or "flatdict") based on the server version. Later on, at the line you indicated in your comment, I am merely confirming (asserting) that the internal format has been assigned correctly based on the server version.

Copy link
Collaborator Author

@kebwi kebwi Nov 18, 2024

Choose a reason for hiding this comment

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

@fcollman To clarify, the API, from the user's perspective outside CAVEclient, doesn't offer "flatdict" as an option. They user asks for "dict" or "swc". Those are their options. These are translated to internal formats that communicate with the server concisely to indicate which format the server should deliver. More to the point, the server really only delivers one kind of dict at at time, but it depends on which version of the server is deployed. There is no "choosing" between dictionary formats from the CAVEclient's perspective (much less from the user's perspective, removed another level of abstraction outside CAVEclient). So, this is an assertion that the code is translating the API format to the correct internal format based on which server version is available.

As for warning the user that their server is out of date, that is handled by other code earlier in the function.

Copy link
Collaborator

Choose a reason for hiding this comment

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

got it! make sense didn't read carefully enough

@fcollman fcollman merged commit e37c616 into master Nov 18, 2024
16 checks passed
kebwi added a commit that referenced this pull request Nov 20, 2024
* Compressed SWC format option.

* lint/ruff corrections

* Bulk skeleton generation.

* New skeleton cache query endpoint

* Ruff corrections

* Trivial change

* Removed debugging code. Labeled protected functions.

* Ruff correctdions.

* Ruff corrections.

* Ruff changes that make the code definitively HARDER to read. Is this really what we want?

* Converted print statements to logging calls.

* Server version checking for new API endpoints.

* Ruff conformity.

* Added SkeletonClient.skeletons_exist().

* Ruff changes.

* Skeleton Client documentation

* update test docs to note confusing local server issue

* generate_bulk_skeletons_async() now reports an upper bound estimate of the skeletonization time.

* Documentation

* Cleanup

* Versions endpoint

* Update changelog

* SkeletonClient now only accepts 'dict' and 'swc' format requests.

* ruff cleanup

* ruff cleanup

* ruff cleanup

* Various handling of the new 'flatdict' skeleton format.

* ruff compliance

---------

Co-authored-by: Casey Schneider-Mizell <[email protected]>
kebwi added a commit that referenced this pull request Nov 20, 2024
* Compressed SWC format option.

* lint/ruff corrections

* Bulk skeleton generation.

* New skeleton cache query endpoint

* Ruff corrections

* Trivial change

* Removed debugging code. Labeled protected functions.

* Ruff correctdions.

* Ruff corrections.

* Ruff changes that make the code definitively HARDER to read. Is this really what we want?

* Converted print statements to logging calls.

* Server version checking for new API endpoints.

* Ruff conformity.

* Added SkeletonClient.skeletons_exist().

* Ruff changes.

* Skeleton Client documentation

* update test docs to note confusing local server issue

* generate_bulk_skeletons_async() now reports an upper bound estimate of the skeletonization time.

* Documentation

* Cleanup

* Versions endpoint

* Update changelog

* SkeletonClient now only accepts 'dict' and 'swc' format requests.

* ruff cleanup

* ruff cleanup

* ruff cleanup

* Various handling of the new 'flatdict' skeleton format.

* ruff compliance

---------

Co-authored-by: Casey Schneider-Mizell <[email protected]>
kebwi added a commit that referenced this pull request Nov 20, 2024
* Compressed SWC format option.

* lint/ruff corrections

* Bulk skeleton generation.

* New skeleton cache query endpoint

* Ruff corrections

* Trivial change

* Removed debugging code. Labeled protected functions.

* Ruff correctdions.

* Ruff corrections.

* Ruff changes that make the code definitively HARDER to read. Is this really what we want?

* Converted print statements to logging calls.

* Server version checking for new API endpoints.

* Ruff conformity.

* Added SkeletonClient.skeletons_exist().

* Ruff changes.

* Skeleton Client documentation

* update test docs to note confusing local server issue

* generate_bulk_skeletons_async() now reports an upper bound estimate of the skeletonization time.

* Documentation

* Cleanup

* Versions endpoint

* Update changelog

* SkeletonClient now only accepts 'dict' and 'swc' format requests.

* ruff cleanup

* ruff cleanup

* ruff cleanup

* Various handling of the new 'flatdict' skeleton format.

* ruff compliance

---------

Co-authored-by: Casey Schneider-Mizell <[email protected]>
fcollman added a commit that referenced this pull request Nov 21, 2024
* Compressed SWC format option.

* lint/ruff corrections

* Bulk skeleton generation.

* New skeleton cache query endpoint

* Ruff corrections

* Trivial change

* Removed debugging code. Labeled protected functions.

* Ruff correctdions.

* Ruff corrections.

* Ruff changes that make the code definitively HARDER to read. Is this really what we want?

* Converted print statements to logging calls.

* Server version checking for new API endpoints.

* Ruff conformity.

* Added SkeletonClient.skeletons_exist().

* Ruff changes.

* Skeleton Client documentation

* update test docs to note confusing local server issue

* generate_bulk_skeletons_async() now reports an upper bound estimate of the skeletonization time.

* Documentation

* Cleanup

* Versions endpoint

* Update changelog

* SkeletonClient now only accepts 'dict' and 'swc' format requests.

* ruff cleanup

* ruff cleanup

* ruff cleanup

* Various handling of the new 'flatdict' skeleton format.

* ruff compliance

* Change default skeleton version to 3 (the current latest version)

* ruff cleanup

* Add packaging as a requirement

* Bump version: 6.5.0 → 6.5.1

* version dependent networkx (#266)

* Bump version: 6.5.1 → 6.5.2

* SkeletonClient changes, mainly simplification of output formats (#265)

* Compressed SWC format option.

* lint/ruff corrections

* Bulk skeleton generation.

* New skeleton cache query endpoint

* Ruff corrections

* Trivial change

* Removed debugging code. Labeled protected functions.

* Ruff correctdions.

* Ruff corrections.

* Ruff changes that make the code definitively HARDER to read. Is this really what we want?

* Converted print statements to logging calls.

* Server version checking for new API endpoints.

* Ruff conformity.

* Added SkeletonClient.skeletons_exist().

* Ruff changes.

* Skeleton Client documentation

* update test docs to note confusing local server issue

* generate_bulk_skeletons_async() now reports an upper bound estimate of the skeletonization time.

* Documentation

* Cleanup

* Versions endpoint

* Update changelog

* SkeletonClient now only accepts 'dict' and 'swc' format requests.

* ruff cleanup

* ruff cleanup

* ruff cleanup

* Various handling of the new 'flatdict' skeleton format.

* ruff compliance

---------

Co-authored-by: Casey Schneider-Mizell <[email protected]>

* Bump version: 6.5.2 → 7.0.0

* added documentation of 7.0 changes to skeleton service

* SkeletonClient changes, mainly simplification of output formats (#265)

* Compressed SWC format option.

* lint/ruff corrections

* Bulk skeleton generation.

* New skeleton cache query endpoint

* Ruff corrections

* Trivial change

* Removed debugging code. Labeled protected functions.

* Ruff correctdions.

* Ruff corrections.

* Ruff changes that make the code definitively HARDER to read. Is this really what we want?

* Converted print statements to logging calls.

* Server version checking for new API endpoints.

* Ruff conformity.

* Added SkeletonClient.skeletons_exist().

* Ruff changes.

* Skeleton Client documentation

* update test docs to note confusing local server issue

* generate_bulk_skeletons_async() now reports an upper bound estimate of the skeletonization time.

* Documentation

* Cleanup

* Versions endpoint

* Update changelog

* SkeletonClient now only accepts 'dict' and 'swc' format requests.

* ruff cleanup

* ruff cleanup

* ruff cleanup

* Various handling of the new 'flatdict' skeleton format.

* ruff compliance

---------

Co-authored-by: Casey Schneider-Mizell <[email protected]>

* SkeletonClient changes, mainly simplification of output formats (#265)

* Compressed SWC format option.

* lint/ruff corrections

* Bulk skeleton generation.

* New skeleton cache query endpoint

* Ruff corrections

* Trivial change

* Removed debugging code. Labeled protected functions.

* Ruff correctdions.

* Ruff corrections.

* Ruff changes that make the code definitively HARDER to read. Is this really what we want?

* Converted print statements to logging calls.

* Server version checking for new API endpoints.

* Ruff conformity.

* Added SkeletonClient.skeletons_exist().

* Ruff changes.

* Skeleton Client documentation

* update test docs to note confusing local server issue

* generate_bulk_skeletons_async() now reports an upper bound estimate of the skeletonization time.

* Documentation

* Cleanup

* Versions endpoint

* Update changelog

* SkeletonClient now only accepts 'dict' and 'swc' format requests.

* ruff cleanup

* ruff cleanup

* ruff cleanup

* Various handling of the new 'flatdict' skeleton format.

* ruff compliance

---------

Co-authored-by: Casey Schneider-Mizell <[email protected]>

* Change default skeleton version to 3 (the current latest version)

* ruff cleanup

* Old code somehow got reinstated.

---------

Co-authored-by: Casey Schneider-Mizell <[email protected]>
Co-authored-by: Ben Pedigo <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Forrest Collman <[email protected]>
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.

3 participants