Skip to content

Conversation

@GianlucaFicarelli
Copy link
Collaborator

Until now, used and created entities were required to belong to the same project.

With this PR we allow to create new derivations from any readable entity (used) to a writable entity (generated).

  • Used entity: a readable entity (public in any project, or private in the same project).
  • Generated entity: a writable entity (public or private, in the same project).

Even when the parent (used) is private, the child (generated) can be either public or private.
Tests are added to test all the possible combinations.

Other related changes:

  • The /hierarchy endpoint needed a fix to consider the case where a public generated entity G is derived from a private used entity U, and the user cannot read the private used entity U because it's in a different project. In that case, the public generated entity G should be returned as a root node, independently from the derivation type.
  • The derived-from endpoint needed a fix to ensure that the specified generated entity is readable.

Fix #427

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
pytest 97.55% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/service/derivation.py 100.00% <100.00%> (ø)
app/service/hierarchy.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@eleftherioszisis eleftherioszisis left a comment

Choose a reason for hiding this comment

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

Makes sense, nice.

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.

Allow derivations of public entities belonging to different projects

4 participants