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

OWLDiff Web #5

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

OWLDiff Web #5

wants to merge 22 commits into from

Conversation

psiotwo
Copy link
Contributor

@psiotwo psiotwo commented May 11, 2022

No description provided.

Copy link
Contributor Author

@psiotwo psiotwo left a comment

Choose a reason for hiding this comment

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

@luvave see comments. Main points are:

  • almost no documentation - the code needs to be documented (public classes/methods) to be reusable to others
  • improve testing (service/controller)
  • look at the split of the service/controller layer - currently the separation is not well done

<dependency>
<groupId>com.github.galigator.openllet</groupId>
<artifactId>openllet-jena</artifactId>
<version>2.6.5</version>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A variable would be helpful.


private List<NodeModelDto> children;

@JsonIgnore
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why this?

In general, the code lacks documentation - to make it understandable at least interfaces and public methods should be well documented

import org.semanticweb.owlapi.model.OWLDocumentFormat;

public enum OWLDocumentFormatEnum {
//TODO: Add more formats? Source http://robot.obolibrary.org/merge
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is much better to record TODOs as individual issues instead of having them in text comments.


private OWLDocumentFormat format;
private String extension;
private OWLDocumentFormatEnum(OWLDocumentFormat format, String extension){
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Consider using some formatting library - Idea default formatted (Ctrl+Alt+L), or Checkstyle .

E.g. the constructor should be separated with a blank line from the fields


@GetMapping
public String ping() {
return "pong";
Copy link
Contributor Author

Choose a reason for hiding this comment

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


public String getRet() {
String tmp = this.ret;
this.ret = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This looks more like 'poll' than 'get'...

@@ -0,0 +1,60 @@
package cz.cvut.kbss.owldiff.api;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both controller logic and service logic should be tested.

onAgree: (val?: any) => void,
}

export const ConfirmDialog = (props: ConfirmDialogProps) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"{ return" could be ommited

return (
<TreeItem
key={treeItemData.id}
sx={props.colorSettings ?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

would deserve a dedicated variable/computation upfront - it is hardly readable

@@ -0,0 +1,75 @@
#
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could not the translation be partially reused with API?

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.

2 participants