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

Computed Values support for PUT /_api/collection/collection/properties #268

Merged
merged 6 commits into from
Aug 16, 2023

Conversation

aMahanna
Copy link
Member

@aMahanna aMahanna commented Aug 8, 2023

  • Introduces a computed_values parameter for the collection.configure method
  • Test cases for setting & fetching computedValues
  • rework computedValues logic in the format.format_collection method to support unspecified attributes in a computedValue object

arango/formatter.py Outdated Show resolved Hide resolved
@aMahanna aMahanna changed the title Computed Values support for /_api/collection/collection/properties Computed Values support for PUT /_api/collection/collection/properties Aug 8, 2023
@@ -306,6 +306,7 @@ def configure(
schema: Optional[Json] = None,
replication_factor: Optional[int] = None,
write_concern: Optional[int] = None,
computed_values: Optional[Jsons] = None,
Copy link
Member Author

Choose a reason for hiding this comment

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

small nitpick: we have computed_values as the parameter name here, but have computedValues for the create_collection method in database.py:

https://github.com/ArangoDB-Community/python-arango/blob/main/arango/database.py#L977

@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2023

Codecov Report

Merging #268 (3acd627) into main (744a6e9) will increase coverage by 0.02%.
Report is 4 commits behind head on main.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   99.01%   99.04%   +0.02%     
==========================================
  Files          26       26              
  Lines        3958     3960       +2     
==========================================
+ Hits         3919     3922       +3     
+ Misses         39       38       -1     
Files Changed Coverage Δ
arango/client.py 98.41% <ø> (ø)
arango/http.py 100.00% <ø> (ø)
arango/collection.py 98.51% <100.00%> (+<0.01%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Member

@apetenchea apetenchea left a comment

Choose a reason for hiding this comment

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

LGTM

@aMahanna aMahanna self-assigned this Aug 15, 2023
@aMahanna aMahanna merged commit 23de7d3 into main Aug 16, 2023
6 checks passed
@aMahanna aMahanna deleted the computed-values branch August 16, 2023 15:50
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