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

Server-side panels #1085

Merged
merged 21 commits into from
Nov 13, 2024
Merged

Server-side panels #1085

merged 21 commits into from
Nov 13, 2024

Conversation

forman
Copy link
Member

@forman forman commented Nov 11, 2024

This PR allows extending xcube Viewer by custom panels defined in xcube Server.

Added experimental feature that allows for extending the xcube Viewer user interface by server-side panels. For this to work, users can now configure xcube Server to load one or more Python modules that provide xcube.webapi.viewer.contrib.Panel UI-contributions. Panel instances provide two decorators layout() and callback() which are used to implement the UI and the interaction behaviour, respectively. The functionality is provided by the https://github.com/bcdev/chartlets Python library. A working example can be found in examples/serve/panels-demo.

Related xcube Viewer PR: xcube-dev/xcube-viewer#438

Checklist:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • [ ] New/modified features documented in docs/source/*
  • Changes documented in CHANGES.md
  • GitHub CI passes
  • AppVeyor CI passes
  • Test coverage remains or increases (target 100%)

@forman forman marked this pull request as ready for review November 12, 2024 13:16
@forman forman requested a review from AliceBalfanz November 12, 2024 13:18
Copy link
Contributor

@b-yogesh b-yogesh left a comment

Choose a reason for hiding this comment

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

Overall looks good! Approved.

ServiceContact:
IndividualName: "Norman Fomferra"
PositionName: "Senior Software Engineer"
ContactInfo:
Copy link
Contributor

@AliceBalfanz AliceBalfanz Nov 13, 2024

Choose a reason for hiding this comment

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

This info is outdated, pleas update with the following:

ContactInfo:
  Phone:
    Voice: +49 40 696 389 300
    Facsimile: +49 40 696 389 399
  Address:
    DeliveryPoint: Chrysanderstr. 1
    City: Hamburg
    AdministrativeArea: Hamburg
    PostalCode: 21029
    Country: Germany
    ElectronicMailAddress: info@brockmann-consult.de

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure :)

Copy link
Member Author

Choose a reason for hiding this comment

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

We should remove this entirely

Copy link
Member

@pont-us pont-us left a comment

Choose a reason for hiding this comment

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

Makes sense, looks good! Just a couple of tiny suggestions.

Comment on lines +48 to +49
- pip:
- git+https://github.com/bcdev/chartlets.git#subdirectory=chartlets.py
Copy link
Member

Choose a reason for hiding this comment

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

I assume this is temporary until Chartlets gets a conda-forge release?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

path = Path(augmentation["Path"])
if not path.is_absolute():
path = Path(self.base_dir) / path
with prepend_sys_path(path):
Copy link
Member

Choose a reason for hiding this comment

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

I feel as though there ought to be a more elegant way to do this without changing the system path globally, but on closer examination it seems that alternative approaches would need quite a lot of import system surgery :(.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you know anything better, please report back to me!

Copy link
Contributor

@AliceBalfanz AliceBalfanz left a comment

Choose a reason for hiding this comment

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

Tested from a user perspective. Works well :) Minor comment on outdated info in config - but thats not crucial for merging.

Copy link
Contributor

@TejasMorbagal TejasMorbagal left a comment

Choose a reason for hiding this comment

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

Tested and works as described!

forman and others added 2 commits November 13, 2024 14:51
Co-authored-by: Pontus Lurcock <pontus.lurcock@brockmann-consult.de>
forman and others added 2 commits November 13, 2024 14:54
Co-authored-by: Pontus Lurcock <pontus.lurcock@brockmann-consult.de>
@forman forman merged commit 765d0aa into main Nov 13, 2024
1 of 2 checks passed
@forman forman deleted the forman-x-dashi branch November 13, 2024 13:57
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.

5 participants