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

Create Common opensearch/ elasticsearch core package #186

Merged
merged 37 commits into from
Feb 8, 2024
Merged

Conversation

jonhealy1
Copy link
Collaborator

@jonhealy1 jonhealy1 commented Jan 31, 2024

Related Issue(s):

Description:
Create a common opensearch/ elasticsearch core package. Create separate stac-fastapi.opensearch and stac-fastapi.elasticsearch packages.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable
  • Changes are added to the changelog

@jonhealy1 jonhealy1 mentioned this pull request Jan 31, 2024
@jamesfisher-geo
Copy link
Collaborator

Looks great. After #187 is merged, the only backend-specific code will be in the *_config.py and the *_database_logic.py files. Everything else can be contained in the core module, right?

@jonhealy1
Copy link
Collaborator Author

Looks great. After #187 is merged, the only backend-specific code will be in the *_config.py and the *_database_logic.py files. Everything else can be contained in the core module, right?

I think I have moved everything around properly. I am not a git expert so I didn't know the easiest or best way to do this. Have a look. I think the main thing we need to do is update the update_collection method in opensearch/database_logic.py. I haven't updated the Makefile yet either ....

@jonhealy1
Copy link
Collaborator Author

If you want we can merge your branch into main before we merge this. Up to you. Another thing to think about too is how the tests are duplicated right now. Maybe we want a separate package for the tests?

@jamesfisher-geo
Copy link
Collaborator

Looks great. After #187 is merged, the only backend-specific code will be in the *_config.py and the *_database_logic.py files. Everything else can be contained in the core module, right?

I think I have moved everything around properly. I am not a git expert so I didn't know the easiest or best way to do this. Have a look. I think the main thing we need to do is update the update_collection method in opensearch/database_logic.py. I haven't updated the Makefile yet either ....

Merged those changes into the add-opensearch branch. I included a couple changes to the makefile to run tests on one or both backends

@jamesfisher-geo
Copy link
Collaborator

jamesfisher-geo commented Feb 3, 2024

If you want we can merge your branch into main before we merge this. Up to you. Another thing to think about too is how the tests are duplicated right now. Maybe we want a separate package for the tests?

Cool, I think #188 is ready go. I will let you take a look and commit to main. Right now they are both passing the same set of tests. All the ES/OS calls are wrapped in the database_logic methods, so it seems to work fine for both.

@jonhealy1 jonhealy1 marked this pull request as ready for review February 4, 2024 04:27
@jonhealy1
Copy link
Collaborator Author

@jamesfisher-gis Hi. I think this is ready for review now.

@jonhealy1
Copy link
Collaborator Author

@gadomski @philvarner Adding you guys if you have time to review or even share your thoughts.

@jonhealy1
Copy link
Collaborator Author

This is actually a really long pr but the vast majority of it is only moving code around.

@jamesfisher-geo
Copy link
Collaborator

@jamesfisher-gis Hi. I think this is ready for review now.

Sounds good. Will review tomorrow eve

Copy link
Collaborator

@jamesfisher-geo jamesfisher-geo left a comment

Choose a reason for hiding this comment

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

Hey @jonhealy1 this looks great.

@jonhealy1 jonhealy1 merged commit 5208179 into main Feb 8, 2024
4 checks passed
@jonhealy1 jonhealy1 deleted the common_core branch February 8, 2024 05:26
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