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

Get ontologies by project iri #204

Merged
merged 22 commits into from
Jun 26, 2020
Merged

Conversation

kilchenmann
Copy link
Contributor

@kilchenmann kilchenmann commented Jun 18, 2020

Part of DSP-71
Resolves DSP-425

Feature

New method to get ontologies by project IRI. It returns an array of OntologyMetadata.

Chore

Ignore yalc.lock, as it often caused merge conflicts and does not need to be under version control.

@kilchenmann kilchenmann self-assigned this Jun 18, 2020
@tobiasschweizer
Copy link
Contributor

I will try to do the review this week.

@tobiasschweizer
Copy link
Contributor

@kilchenmann I will review this PR this afternoon.

Copy link
Contributor

@tobiasschweizer tobiasschweizer left a comment

Choose a reason for hiding this comment

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

Please find the details in my comment.

If I can help with anything, please let me know.

src/api/v2/ontology/ontologies-endpoint-v2.ts Outdated Show resolved Hide resolved
src/api/v2/ontology/ontologies-endpoint-v2.ts Outdated Show resolved Hide resolved
src/api/v2/ontology/ontologies-endpoint-v2.ts Outdated Show resolved Hide resolved
src/api/v2/ontology/ontologies-endpoint-v2.ts Outdated Show resolved Hide resolved
@@ -119,6 +130,30 @@ export class AppComponent implements OnInit {
);
}

getAnythingOntologies() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make this one method taking the ontology Iri as a parameter?

You could even make the parameter optional so it would query all ontologies metadata if the param is not provided.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can write a helper method getProjectOntologies. The thing is I have to handle the response twice. One response is for anything project ontologies, the other one for dokubib project ontology. I need two separate variables here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok.

test-framework/src/app/app.component.html Outdated Show resolved Hide resolved
@@ -60,6 +64,13 @@ export class AppComponent implements OnInit {

resourceStatus = '';

itemPluralMapping = {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this used for?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it for use with i18nPlural?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's an example how we can use plural and singular notation and I can test in e2e if it's 3 ontologies or 1 ontology. I know, the js-lib is not the best place to use it, but I thought I want to test it in the test-framework.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, got it. Thanks for the explanation.

@tobiasschweizer
Copy link
Contributor

@kilchenmann Thanks for the changes. I will check this PR again.

@tobiasschweizer
Copy link
Contributor

@kilchenmann Is it ok if I look at this PR on Monday?

@kilchenmann
Copy link
Contributor Author

It's okay. But I have to wait with the next steps...

@tobiasschweizer
Copy link
Contributor

I will try to do it today then!

@kilchenmann
Copy link
Contributor Author

I didn't want to stress you out.

Copy link
Contributor

@tobiasschweizer tobiasschweizer left a comment

Choose a reason for hiding this comment

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

Ok, I think this PR is almost done. Please find my final remarks in the comments.

src/api/v2/ontology/ontologies-endpoint-v2.ts Outdated Show resolved Hide resolved
@@ -60,6 +64,13 @@ export class AppComponent implements OnInit {

resourceStatus = '';

itemPluralMapping = {
Copy link
Contributor

Choose a reason for hiding this comment

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

ok, got it. Thanks for the explanation.

@@ -119,6 +130,30 @@ export class AppComponent implements OnInit {
);
}

getAnythingOntologies() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok.

Copy link
Contributor

@tobiasschweizer tobiasschweizer left a comment

Choose a reason for hiding this comment

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

Thanks for this PR.

I have just spotted a missing semicolon, please see my comment.

src/models/v2/ontologies/OntologyConversionUtil.ts Outdated Show resolved Hide resolved
@kilchenmann kilchenmann merged commit 0bdded1 into master Jun 26, 2020
@kilchenmann kilchenmann deleted the wip/dsp-71-getOntologiesByProjectIri branch June 26, 2020 11:20
@kilchenmann kilchenmann added enhancement Improve existing code or new feature and removed feature labels Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing code or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants