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

Add new dataservices fields #3262

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ThibaudDauce
Copy link
Contributor

@ThibaudDauce ThibaudDauce commented Feb 5, 2025

@ThibaudDauce ThibaudDauce requested a review from maudetes February 5, 2025 09:50
@@ -13,13 +13,13 @@ class DataserviceCsvAdapter(csv.Adapter):
("url", lambda d: d.self_web_url()),
"description",
"base_api_url",
"endpoint_description_url",
"machine_documentation_url",
Copy link
Contributor

Choose a reason for hiding this comment

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

It may break the HVD DAG @Pierlou

Copy link
Contributor

Choose a reason for hiding this comment

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

As long as it doesn't change anymore I'm fine with it, I'll change it when this is deployed 🤝

udata/core/dataservices/models.py Show resolved Hide resolved
udata/migrations/2025-01-05-dataservices-fields-changes.py Outdated Show resolved Hide resolved
or dataservice.endpoint_description_url.endswith(".yaml")
or dataservice.endpoint_description_url.endswith("?format=openapi-json")
or "GetCapabilities" in dataservice.endpoint_description_url
or "GetResourceDescription" in dataservice.endpoint_description_url
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this for?

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 list a lot of these in my local database and did a manual check of some of them.

def migrate(db):
log.info("Processing dataservices…")

Dataservice.objects(is_restricted=True, has_token=True).update(
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we cover all cases since we can have is_restricted and has_token to None.
We should make sure that Dataservice.objects(access_type__exists=True).count() == Dataservice.objects().count() right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hum… We can have None in these fields?

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 did a None request here 6e7c399

udata/core/dataservices/search.py Outdated Show resolved Hide resolved
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