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

63 setup exploration module #69

Merged
merged 53 commits into from
Aug 6, 2023
Merged

Conversation

pveeckhout
Copy link
Contributor

@pveeckhout pveeckhout commented Jul 25, 2023

adding exploration module

process NavRoute EDDN message
process request for system Coordinates from trade module

write endpoint for system search by name from searchbar

transition to PostGIS from Postgress

closes #63

@pveeckhout pveeckhout requested review from officialyinsane and a team July 25, 2023 20:11
@pveeckhout pveeckhout linked an issue Jul 25, 2023 that may be closed by this pull request
@pveeckhout pveeckhout removed the request for review from officialyinsane July 25, 2023 20:11
@pveeckhout pveeckhout added this to the exploration-module milestone Jul 25, 2023
public class BootExplorationModuleController extends DefaultExplorationModuleController {

public BootExplorationModuleController(FindSystemsFromSearchbarUseCase findSystemsFromSearchbarUseCase, SystemDtoMapper systemDtoMapper) {
super(findSystemsFromSearchbarUseCase, systemDtoMapper);
Copy link
Contributor

Choose a reason for hiding this comment

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

"from search bar" - isn't that a FE concept? Should we not use the filters logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the issue is that this is indeed an endpoint, that were it not for FE, I would not have created.

this is such a specific need to have performant and limited resultSet that I think it warants a specific endpoint

system.starClass(),
Optional.ofNullable(system.coordinate()).map(Coordinate::x).orElse(null),
Optional.ofNullable(system.coordinate()).map(Coordinate::y).orElse(null),
Optional.ofNullable(system.coordinate()).map(Coordinate::z).orElse(null));
Copy link
Contributor

Choose a reason for hiding this comment

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

In what situation would a system not have an x/y/z co-ordinate?

Should these not be non-null? Maybe we know the system name, but not it's location (thanks to EDDN design decisions)? I know there are some message types that state the system name but not it's location (my choice to address that in the past, was to make System have an address property, which may or may not be null... but an address must always have x/y/z).


private CoordinateDto coordinateFromSystem(System system) {
if (Optional.ofNullable(system.coordinate()).map(Coordinate::x).isEmpty()) {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm going to be flamed for this, but this is a misuse of Optional in my opinion.

This could be a rather simple if construct, possibly a ternary. It could even be Objects.requireNonNull().

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, the isEmpty() if-block could be orElse(null) instead.

But is null really something we'd want to return here?


private System updateSystemFromItem(final System system, NavRouteMessage.V1.Item item) {
System returnSystem = system;
if (Objects.isNull(system.eliteId())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's wrong with if system.eliteId() == null ?

Copy link
Collaborator

@Daniel-J-Mason Daniel-J-Mason left a comment

Choose a reason for hiding this comment

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

I dont see the files for marking,
io/edpn/backend/trade/application/dto/v1/LocateCommodityResponse.java
Line 21
java.time.LocalDateTime not supported by jacksonized out of the box, error message says to add "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling

Copy link
Collaborator

@Daniel-J-Mason Daniel-J-Mason left a comment

Choose a reason for hiding this comment

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

Approved

@pveeckhout pveeckhout merged commit 62e6355 into development Aug 6, 2023
@pveeckhout pveeckhout deleted the 63-setup-exploration-module branch August 6, 2023 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Modify application architecture enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

setup Exploration module
4 participants