Skip to content

Expand documentation and comment source code#99

Open
asmataamallah25 wants to merge 19 commits intoFIWARE:masterfrom
asmataamallah25:documentation
Open

Expand documentation and comment source code#99
asmataamallah25 wants to merge 19 commits intoFIWARE:masterfrom
asmataamallah25:documentation

Conversation

@asmataamallah25
Copy link
Collaborator

  • Additional documentation added
  • Source code commented for additional clarity

Copy link
Collaborator

@wistefan wistefan left a comment

Choose a reason for hiding this comment

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

Please use proper Javadoc.

- Value: "0x0" (which is 0 in decimal)

## HashiCorp Vault
HashiCorp Vault is integrated into Canis Major to manage and protect sensitive data such as cryptographic keys and wallet credentials.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Vault is NOT integrated into CanisMajor. Its provided as an example in the test and development deployments and CAN be used.


This document outlines the prerequisites for running the Canis Major adapter without issues. The setup has been tested on an Ubuntu 22.04.1 LTS virtual machine running on FIWARE Lab. For more information on [FIWARE lab](https://www.fiware.org/developers/fiware-lab/) check the official documentation.

## Java setup
Copy link
Collaborator

Choose a reason for hiding this comment

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

Java is only a development prerequisite, not for running it. To run Canis Major, an OCI-Compliant container runtime is enough.

Copy link
Contributor

Choose a reason for hiding this comment

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

It depends of the type of deployment. if it is deploy using containers then you do not need Java but if you want to execute the code as it is, then you will need Java. Maybe, it should be clarify in the text.

Copy link
Collaborator

Choose a reason for hiding this comment

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

CanisMajor as of know only supports containerized deployments. We do not even publish any other runnable.

Copy link
Contributor

Choose a reason for hiding this comment

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

As I said before and clarify. if you want to develop the component, there is no information in the documentation about which kind of Java version you can use. So it should be clarify in the setup.

Copy link
Collaborator

Choose a reason for hiding this comment

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

For development, sure. But not for deployment, thats a difference

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that we can add that:

"Java is only a development prerequisite, not for running it. To run Canis Major, an OCI-Compliant container runtime is enough."

At the beginning of the description of the section.


## Docker Setup

Docker is required to run Canis Major. The following version have been tested and confirmed to work:
Copy link
Collaborator

Choose a reason for hiding this comment

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

It does not need to be docker, any OCI-compatible runtime is sufficient. In Kubernetes environments, most likely no docker is available.

Copy link
Contributor

Choose a reason for hiding this comment

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

For the time been, there is neither kubernetes configuration or helm charts in the repo and no reference to helm charts in the README. We can add in the roadmap the modification of the documentation in order to link to the Helm charts and test the functionality.

@Data
public class CMEntitesResponse {

// Represent
Copy link
Collaborator

Choose a reason for hiding this comment

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

Who represents what?


import lombok.Data;

// This class contains the field of an address
Copy link
Collaborator

Choose a reason for hiding this comment

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

// is for inline-comments. Please use the proper javadoc style for class-doc, e.g. /** .... */


private final String entityId;
private final List<Object> txDetails;
private final String entityId; // Unique identifier for the entity
Copy link
Collaborator

Choose a reason for hiding this comment

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

Inline comments please above the line


private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
public static final String NGSILD_TENANT = "orion";
/* This class is a comprehensive Cucumber step definition set for integration testing Canis Major,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doc is most likely at the wrong spot.

OBJECT_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}

// Canis Major and Vault service endpoints and the Vault root toke
Copy link
Collaborator

Choose a reason for hiding this comment

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

Inline comments ALWAYS belong to the line below. The address below is only Canis Major


@RequiredArgsConstructor
@Factory
// This class is the main application class
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you remove the properly formatted doc with an improper one?

private final EthereumProperties ethereumProperties;

@Bean
// This method creates a blocking HTTP client
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comments always above the annotation. Public methods should use Javadoc style, not inline comments.

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