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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement create/get/delete/list table metadata methods #28

Merged
merged 7 commits into from
Nov 18, 2022

Conversation

mure
Copy link
Contributor

@mure mure commented Nov 15, 2022

What does this Pull Request accomplish?

  • Implements a set of table metadata routes:

    • create
    • get
    • delete
    • list
  • Adds a custom serializer for our Pydantic models. This is so we can set certain options like by_alias.

  • Switches attribute comments to use docstrings, because some of them wouldn't fit on a single line.

Why should this Pull Request be merged?

We need this functionality.
(This part of the PR template is awkward. I'm never sure what to put other than "because we need it")

What testing has been done?

Added our first functional test 馃帀 Feel free to suggest other test cases. I think we'll want at least one that tests an expected error.

@mure mure marked this pull request as ready for review November 16, 2022 00:36
mypy.ini Show resolved Hide resolved
docs/conf.py Show resolved Hide resolved
@mure mure changed the title Get metadata Implement create/get/delete table metdata methods Nov 16, 2022
Copy link
Collaborator

@cameronwaterman cameronwaterman left a comment

Choose a reason for hiding this comment

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

Please change your title to adhere to the Angular style

i.e. "feat: Implement create/get/delete table metadata methods"

It looks like there is also a typo in your existing title 馃槅

@mure mure changed the title Implement create/get/delete table metdata methods feat: Implement create/get/delete table metadata methods Nov 16, 2022
Copy link
Collaborator

@spanglerco spanglerco left a comment

Choose a reason for hiding this comment

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

Some test ideas:

  • Validate we deserialize timestamps correctly by asserting the created_at on the table metadata. We would probably need some kind of threshold for allowed values given that the time on the server may not match the time on the client.
  • Retrieve metadata for a valid table ID that doesn't exist (like 000000000000000000000000) and verify we raise the correct exception that includes the error details like the code and args.
  • Similarly, we could have an error case for the create and delete APIs.

nisystemlink/clients/dataframe/models/_column.py Outdated Show resolved Hide resolved
@mure
Copy link
Contributor Author

mure commented Nov 16, 2022

@spanglerco @cameronwaterman I was working off this branch and since the PR is still up, I went ahead and added the list_tables method as well. I'll reset the reviews so y'all can take a look.

New changes: 20f3bbf

@mure mure changed the title feat: Implement create/get/delete table metadata methods feat: Implement create/get/delete/list table metadata methods Nov 16, 2022
mure and others added 2 commits November 18, 2022 10:18
Co-authored-by: Paul Spangler <spanglerco@users.noreply.github.com>
@mure mure requested a review from spanglerco November 18, 2022 22:36
@mure mure merged commit 7cbf7e8 into master Nov 18, 2022
@mure mure deleted the metadata-routes branch November 18, 2022 22:43
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.

None yet

3 participants