62: add support for entities and entity_lists #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #62
Adds methods:
Other entity_lists methods in #62 not included as they aren't publicly documented yet, so I don't know what the proper call pattern or response type/schema is. Although I took a guess based on manual testing for the test setup function in
tests/utils/entity_lists.py
.What has been done to verify that this works as intended?
E2E tests added to
test_client.py
as well as usual unit tests.Why is this the best possible solution? Were any other approaches considered?
I split entities from entity_lists, because they are separate object types. Due to the similar names it was confusing for me initially to tell the difference between an entity and entity_list and what they are supposed to do. Especially considering
entity.list()
,entity_list.list()
. So the docstrings for EntityService and EntityListService try to clarify the difference.How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Shiny new features!
Do we need any specific form for testing your changes? If so, please attach one.
No it's automated in
test_client.py
.Does this change require updates to documentation? If so, please file an issue here and include the link below.
The auto-generated docs is a good start but maybe we should add a notebook or something once the extra entity_list methods are available. Something like
test_client.py
/test_entities__create_and_query
but more elaborate and relatable.Before submitting this PR, please make sure you have:
tests
python -m unittest
and verified all tests passruff format pyxform tests
andruff check pyxform tests
to lint code