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

Count references #77

Merged
merged 15 commits into from
Aug 28, 2024
Merged

Count references #77

merged 15 commits into from
Aug 28, 2024

Conversation

sbilge
Copy link
Member

@sbilge sbilge commented Aug 23, 2024

This PR adds the functionality of counting references transformation. It counts how many target objects are referenced from each source object given the relation name and adds the value to the corresponding datapack-content-properties. Since it builds on top of the "add content property" transformation, it assumes that the "path to target content(s)" is already present in its input SchemaPack and DataPack.

@coveralls
Copy link

coveralls commented Aug 23, 2024

Pull Request Test Coverage Report for Build 10594027772

Details

  • 132 of 147 (89.8%) changed or added relevant lines in 14 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 92.674%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/metldata/builtin_transformations/count_references/data_transform.py 18 20 90.0%
src/metldata/builtin_transformations/count_references/model_transform.py 15 19 78.95%
src/metldata/builtin_transformations/count_references/assumptions.py 48 57 84.21%
Totals Coverage Status
Change from base Build 9127000732: -0.7%
Covered Lines: 759
Relevant Lines: 819

💛 - Coveralls

@sbilge sbilge requested a review from mephenor August 23, 2024 10:04
Copy link
Member

@mephenor mephenor left a comment

Choose a reason for hiding this comment

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

Source vs. target needs to be changed to active vs. passive and both directions handled, as discussed.
In addition, there is some documentation that needs a bit more work put into.

src/metldata/transform/base.py Outdated Show resolved Hide resolved
@sbilge sbilge requested a review from mephenor August 27, 2024 13:08
Copy link
Member

@mephenor mephenor left a comment

Choose a reason for hiding this comment

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

Should be good now apart from one tiny thing.
Up to your discretion if you want to change that

@sbilge sbilge merged commit 080432e into schemapack Aug 28, 2024
4 checks passed
@sbilge sbilge deleted the count_references branch August 28, 2024 12:36
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