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

feat: additional features to make configuration simpler #162

Merged
merged 21 commits into from
Mar 22, 2023
Merged

Conversation

mmalenic
Copy link
Member

This PR is mostly a reorganization and refactor of code, however there are some new features.

Changes

  • The storage type can now be automatically deduced:
    • For local storage, it can be determined from the data.
    • For s3 storage, the bucket is determined from the first capture group in the regex.
      • This makes it possible to specify a regex such as '^(?P<bucket>.*)/(?P<key>.*)$' in order to use the first component of the id as the bucket.
  • Storage can still be manually configured. The type parameter is removed, and the configuration of storage is now untagged.
  • HtsGetFromStorage and Search is much simpler on the htsget-search side - most of the storage resolution now happens in htsget-config.
  • Renamed HttpTicketFormatter and removed the UrlFormatter implementation on it, as this concept is represented by the htsget-config LocalStorage.
  • Moved htsget types from htsget-search to htsget-config. Most of these should be removed when noodles-htsget based refactor #89 is addressed.
  • Additional tests, and more comprehensive server tests which involve multiple resolvers.
  • Fix serve_at field not being used when configuring the local data server.

mmalenic added 21 commits March 9, 2023 21:46
…ge type without manually specifying config values
@mmalenic mmalenic enabled auto-merge March 20, 2023 22:59
@mmalenic mmalenic disabled auto-merge March 20, 2023 23:00
@mmalenic mmalenic enabled auto-merge March 20, 2023 23:03
@mmalenic mmalenic requested a review from brainstorm March 20, 2023 23:07
Copy link
Member

@brainstorm brainstorm left a comment

Choose a reason for hiding this comment

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

Hey Marko, thanks for this!

Slightly concerned about the move to have the s3-storage feature as default, but it might simplify setup, so I'm okay with it. Ship it! ;)

htsget-config/src/storage/mod.rs Show resolved Hide resolved
@mmalenic mmalenic added this pull request to the merge queue Mar 22, 2023
@mmalenic mmalenic merged commit f9b341d into main Mar 22, 2023
@mmalenic mmalenic deleted the config-refactor branch March 22, 2023 22:32
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