Skip to content

Conversation

@olevski
Copy link
Member

@olevski olevski commented Nov 19, 2025

/deploy renku-ui=olevski/feat-modify-global-dc-display

Initial support for envidat datasets.

The following changes are made:

  • adds the ability to mount a data connector from http://envidat.ch
  • adds the data connector description, publisher name, doi and keywords to the search
  • makes the doi, publisher name and keywords case insesitive when searching
  • makes project keywords case insensitive when searching
  • adds doi and publisher_name as parameters for search query parser

@olevski olevski requested review from a team, SalimKayal and sgaist as code owners November 19, 2025 15:25
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ds-1119.dev.renku.ch

@olevski olevski force-pushed the feat-add-envidat-scicat branch from 7302f39 to 43d6a9b Compare November 19, 2025 20:20
eikek
eikek previously approved these changes Nov 20, 2025
@olevski olevski marked this pull request as draft November 20, 2025 09:19
Copy link
Member

@leafty leafty left a comment

Choose a reason for hiding this comment

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

If this is an "initial support", should it be merged to a feature branch instead?

@olevski
Copy link
Member Author

olevski commented Nov 20, 2025

Sorry I meant to convert this to draft right away. But I forgot. Sorry @eikek

@olevski olevski force-pushed the feat-add-envidat-scicat branch 2 times, most recently from a8217cd to 8b2a0d0 Compare November 21, 2025 11:15
@olevski olevski force-pushed the feat-add-envidat-scicat branch 6 times, most recently from abd7384 to 5deac52 Compare December 10, 2025 08:37
@olevski olevski force-pushed the feat-add-envidat-scicat branch 4 times, most recently from 50a5d8a to d10793b Compare December 16, 2025 13:26
@olevski olevski force-pushed the feat-add-envidat-scicat branch from afc6c61 to dc0802d Compare December 17, 2025 14:49
@olevski olevski force-pushed the feat-add-envidat-scicat branch from dc0802d to b2adaf7 Compare December 17, 2025 14:58
@olevski olevski marked this pull request as ready for review December 17, 2025 14:59
@olevski olevski requested review from eikek and leafty December 17, 2025 14:59
@olevski
Copy link
Member Author

olevski commented Dec 17, 2025

If you want to test this:

  1. Log into the deployment
  2. Create a project
  3. Go to http://envidat.ch
  4. Click Explore ALL
  5. Pick a random dataset, get its doi
  6. Create a global data connector using the "From doi" option
  7. You should see the description, name and keywords populated
  8. When you run a session you should see the contents of the dataset in the session

Copy link
Member

@eikek eikek left a comment

Choose a reason for hiding this comment

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

👍🏼

match provider:
case DatasetProvider.envidat:
return __get_rclone_s3_config_envidat(dataset)
# TODO: Add scicat here
Copy link
Member

Choose a reason for hiding this comment

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

is this left on purpose?

with contextlib.suppress(errors.ValidationError):
name_slug = base_models.Slug.from_name(name).value
target_path = base_models.Slug.from_name(f"{name_slug[:30]}-{target_path}").value
if metadata:
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if I overlook something: the check for metadata seems unecessary, that symbol is not used in the body? did you maybe mean if not metadata?

new_config = payload.model_copy(deep=True)
new_config.configuration = {}

envidat_url = "https://envidat.ch/converters-api/internal-dataset/convert/jsonld"
Copy link
Member

Choose a reason for hiding this comment

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

This occurs at another place, could it be useful to have a constant/central places for it?


@classmethod
def doi_is(cls, doi: str, *args: str) -> Segment:
"""Return slug-is query segment."""
Copy link
Member

Choose a reason for hiding this comment

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

The comment is revealing the copy source :-) (below the same)

@classmethod
def from_dict(cls, d: dict[str, Any]) -> DataConnector:
"""Create a Project from a dictionary."""
"""Create a data connector from a dictionary."""
Copy link
Member

Choose a reason for hiding this comment

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

Thanks 🙏🏼

"""Process slug-is segment."""
self.__append(st.field_is_any(Fields.slug, ft.values.map(st.from_str)))

async def visit_doi_is(self, ft: DoiIs) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

There are some unit tests - perhaps they could be amended by a few cases now. The test_field_term() in test_user_query_parser could be such a place.

Then there is also a manual that gets included in the api spec description. New fields are automatically listed. You can view it by running test_query_manual.py manually opening the created manual.html. I guess for these two fields, nothing needs to be done, though.

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