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

feat: add export of assets (DEV-2106) #2668

Merged
merged 92 commits into from May 26, 2023
Merged

Conversation

seakayone
Copy link
Collaborator

@seakayone seakayone commented May 16, 2023

Pull Request Checklist

Task Description/Number

Issue Number: DEV-2106

Basic Requirements

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • fix: represents bug fixes
  • refactor: represents production code refactoring
  • feat: represents a new feature
  • docs: documentation changes (no production code change)
  • chore: maintenance tasks (no production code change)
  • test: all about tests: adding, refactoring tests (no production code change)
  • other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No
  • Maybe (not 100% sure => check with FE)

Does this PR change client-test-data?

  • Yes (don't forget to update the JS-LIB team about the change)
  • No

seakayone and others added 30 commits May 2, 2023 13:22
Introduces:
* KnoraProjectRepoInMemory an inmemory implementation for tests
* ProjectExportService the service which will be responsible for importing and exporting project data
* RestPermissionService a service containing the logic for checking persmissions and turning them into a authorization exception

Moves:
* function projectDataNamedGraphV2 function from StringFormatter to ProjectADMService companion object
Introduces:
* KnoraProjectRepoInMemory an in-memory implementation for tests
* ProjectExportService the service which will be responsible for importing and exporting project data
* RestPermissionService a service containing the logic for checking permissions and turning them into a authorization exception

Moves:
* function projectDataNamedGraphV2 function from StringFormatter to ProjectADMService companion object
…ombiner implementation based on ZIO

The CombiningRdfProcessor assumed that the first exported graph contained all the prefixes for all graphs.
The old combineGraph method did not properly close all io streams in case a  rdfFormatUtil.parseWithStreamProcessor call would produce a failure.
@seakayone seakayone marked this pull request as ready for review May 25, 2023 12:57
Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

Looks good!
I added some comments, but all of them either questions/food-for-thiught-for-future-tasks or just details

docker-compose.yml Show resolved Hide resolved
project/Dependencies.scala Outdated Show resolved Hide resolved
val projectGraph = ProjectADMService.projectDataNamedGraphV2(project)
for {
ontologyGraphs <- ontologyRepo.findOntologyGraphsByProject(project)
query = findAllAssets(ontologyGraphs :+ InternalIri(KnoraBaseOntologyIri), projectGraph)
Copy link
Collaborator

Choose a reason for hiding this comment

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

you add KnoraBase here, but no the other builtins (admin, standoff, etc.). Is this intentional or an oversight?

seakayone and others added 4 commits May 25, 2023 18:12
Co-authored-by: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com>
…sparql/admin/findAllAssets.scala.txt

Co-authored-by: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com>
…sparql/admin/findAllAssets.scala.txt

Co-authored-by: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com>
@seakayone seakayone enabled auto-merge (squash) May 26, 2023 12:31
@seakayone seakayone merged commit 0be6991 into main May 26, 2023
13 checks passed
@seakayone seakayone deleted the feat/add-export-of-assets branch May 26, 2023 12:58
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.

None yet

2 participants