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

fixed typing that API uses #1332

Merged
merged 2 commits into from
Nov 29, 2023
Merged

fixed typing that API uses #1332

merged 2 commits into from
Nov 29, 2023

Conversation

andrewelamb
Copy link
Contributor

  • Fixes fds-1342
  • Fixes incorrect type hinting (parameters and return types) for methods that the API uses.

@@ -292,13 +298,13 @@ def submit_metadata_manifest(
dataset_id: str,
manifest_record_type: str,
restrict_rules: bool,
validate_component: str = None,
access_token: str,
Copy link
Contributor

Choose a reason for hiding this comment

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

should this one be Optional[str] = None because it used to be str = None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For access_token I removed the default of None because I was under the impression that you always needs an access token to submit since you are storing a manifest.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh right, I think I had thought this was the validation method. thanks for clarifying

Copy link
Contributor

Choose a reason for hiding this comment

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

@andrewelamb @GiaJordan We need to keep the None default, since this change actually broke the CLI submit if you require the access token. The CLI gets the access token another way from the API. I will submit another PR to update typing Optional[str]=None

@@ -292,13 +298,13 @@ def submit_metadata_manifest(
dataset_id: str,
manifest_record_type: str,
restrict_rules: bool,
validate_component: str = None,
access_token: str,
validate_component: str = Optional[None],
Copy link
Contributor

Choose a reason for hiding this comment

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

is this backwards or intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oopps, yep this is a mistake I'll fix this.

@andrewelamb andrewelamb merged commit 2a8d22e into develop Nov 29, 2023
3 checks passed
@andrewelamb andrewelamb deleted the feature-fds-1342-typing branch January 24, 2024 18:48
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