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: Import metadata from external instance #2481

Merged
merged 37 commits into from
May 7, 2024

Conversation

Karol-Stelmaczonek
Copy link
Contributor

Ticket: https://oat-sa.atlassian.net/browse/AUT-3590

What's Changed

  • Add metametadata check & validation on import

Dependencies PRs

How to test

  • Create import with metadata
  • Run import
  • If import class don't have proper metadata the import will fail

Copy link

github-actions bot commented Apr 11, 2024

Front-end summary Node 18

💯 Total ✅ Passed ⏭️ Skipped ❌ Failed
286 286 0 0

Copy link
Contributor

@bartlomiejmarszal bartlomiejmarszal left a comment

Choose a reason for hiding this comment

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

We can remove Exporter class
I do not understand why we need MetaMetadataImporter service

model/qti/ImportService.php Outdated Show resolved Hide resolved
model/qti/ImportService.php Show resolved Hide resolved
model/qti/metaMetadata/Exception.php Outdated Show resolved Hide resolved
model/qti/metaMetadata/Exception.php Outdated Show resolved Hide resolved
model/qti/metaMetadata/Exception.php Outdated Show resolved Hide resolved
model/qti/metaMetadata/Exporter.php Outdated Show resolved Hide resolved
model/qti/metaMetadata/Importer.php Outdated Show resolved Hide resolved
model/qti/metaMetadata/Importer.php Outdated Show resolved Hide resolved
model/qti/metaMetadata/MetaMetadataService.php Outdated Show resolved Hide resolved
model/qti/metaMetadata/MetaMetadataService.php Outdated Show resolved Hide resolved
Copy link
Contributor

@bartlomiejmarszal bartlomiejmarszal left a comment

Choose a reason for hiding this comment

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

We should have a better control over metadata validation. I expect in future to not fail import when metadata fields are not matching. We could also import resources without metadata or import resources in class with metadata.

model/qti/ImportService.php Outdated Show resolved Hide resolved
Copy link
Contributor

@bartlomiejmarszal bartlomiejmarszal left a comment

Choose a reason for hiding this comment

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

We should validate all metadata nested from all parents

model/qti/ImportService.php Outdated Show resolved Hide resolved
Copy link
Contributor

@bartlomiejmarszal bartlomiejmarszal left a comment

Choose a reason for hiding this comment

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

Can we have more control over metadata objects that we want to inject into resource?

model/qti/ImportService.php Outdated Show resolved Hide resolved
@bartlomiejmarszal bartlomiejmarszal requested a review from pnal April 16, 2024 13:49
…-on-import' into feat/aut-3590-add-metadata-check-on-import
@bartlomiejmarszal bartlomiejmarszal self-requested a review April 18, 2024 14:00
Copy link
Contributor

@tikhanovichA tikhanovichA left a comment

Choose a reason for hiding this comment

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

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful

Copy link
Contributor

@pnal pnal left a comment

Choose a reason for hiding this comment

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

Good job!

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful

], $result);
}

public function testExtractFailure(): void
Copy link
Contributor

@pnal pnal Apr 19, 2024

Choose a reason for hiding this comment

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

Failure? For me it does test a specific case when empty properties extracted without errors and results are empty as well. I would consider it as a kind of success cause it returns a valid output :)

@bartlomiejmarszal bartlomiejmarszal changed the title Feat/aut 3590 add metadata check on import feat: Import metadata from external instance May 7, 2024
Copy link

github-actions bot commented May 7, 2024

Version

Target Version 30.10.0
Last version 30.9.0

There are 0 BREAKING CHANGE, 18 features, 6 fixes

@bartlomiejmarszal bartlomiejmarszal merged commit afa5c97 into develop May 7, 2024
5 checks passed
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.

4 participants