Skip to content

Conversation

GBirkel
Copy link
Contributor

@GBirkel GBirkel commented Aug 4, 2025

Description

Add a field for generating dataset links based on admin-configured templates.

See #689 for details.

This has a companion PR for the front end: SciCatProject/frontend#1910 .

Motivation

We get a lot of requests from users and researchers to provide a variety of different types of web-based tools that related directly to datasets. These can be pages that display visualization, pages that provide analysis tools (including AI/ML) and jupyter notebooks on particular JupyterHub instance. In all cases, we would want to take the user to the page with the dataset in context.

Fixes

  • Bug fixed (#X)

Changes:

  • changes made

Tests included

  • Included for each change/fix?
  • Passing?

Documentation

  • swagger documentation updated (required for API changes)
  • official documentation updated

official documentation info

Copy link
Member

@nitrosx nitrosx left a comment

Choose a reason for hiding this comment

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

IT can be approved after fixing the linting and adding some API testing.
Also I would check if dataset schema to obsolete dto works correctly

Comment on lines 4 to 5
// This data is not represented in Mongoose.
// It is generated internally based on the user-defined link templates.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what this comments means?
Can it be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've modified the comment somewhat. It explains why a class without schema annotations is in the schema folder.

@GBirkel GBirkel marked this pull request as draft August 8, 2025 18:10
@GBirkel
Copy link
Contributor Author

GBirkel commented Aug 11, 2025

Also I would check if dataset schema to obsolete dto works correctly

It does, though I had to add toObject: { virtuals: true, }
https://github.com/SciCatProject/scicat-backend-next/pull/2097/files#diff-4b9a5b8e6eef69831951cba2b15a48dd5fd9b05d06b5fe10d223171039448199R18

Looks like the current-to-obsolete conversion is the only code that uses toObject on datasets.

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.

2 participants