-
Notifications
You must be signed in to change notification settings - Fork 10
Support providing name in make_catalog fixture
#52
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
Conversation
|
This PR breaks backwards compatibility for databrickslabs/blueprint downstream. See build logs for more details. Running from downstreams #38 |
|
✅ 35/35 passed, 3 skipped, 1m49s total Running from acceptance #79 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great that this is here, although I think some changes are needed to match the conventions we're using for other fixtures.
|
|
||
| def create() -> CatalogInfo: | ||
| name = f"dummy_C{make_random(4)}".lower() | ||
| def create(name: str = "") -> CatalogInfo: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The convention for create() methods is:
- Keyword-only arguments.
- A default of
Noneif they're optional. catalog_nameinstead ofname(for better composability).
The argument also needs to be described in the docstring for make_catalog above to ensure that it ends up in the project documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name -> catalog_name is not similar to make_schema
4e42570 to
600ad0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Support providing name in `make_catalog` fixture ([#52](#52)). The `make_catalog` fixture in our open-source library has been updated to allow users to specify a name for the catalog using a new `name` parameter. Previously, the catalog was given a random name, but now users can have more control and customization over catalog names in their tests. This change includes updates to the docstring and the addition of unit tests to ensure the fixture behaves as expected with the new parameter. Additionally, the underlying `call_stateful` function was updated to expect a callable that returns a generator of callables, enabling the support for providing a name. The `test_make_catalog_creates_catalog_with_name` and `test_make_catalog` tests have been added to verify the behavior of the fixture with the new `name` parameter.
* Support providing name in `make_catalog` fixture ([#52](#52)). The `make_catalog` fixture in our open-source library has been updated to allow users to specify a name for the catalog using a new `name` parameter. Previously, the catalog was given a random name, but now users can have more control and customization over catalog names in their tests. This change includes updates to the docstring and the addition of unit tests to ensure the fixture behaves as expected with the new parameter. Additionally, the underlying `call_stateful` function was updated to expect a callable that returns a generator of callables, enabling the support for providing a name. The `test_make_catalog_creates_catalog_with_name` and `test_make_catalog` tests have been added to verify the behavior of the fixture with the new `name` parameter.
Changes
Add name parameter to
make_catalogfixture.Tests