-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add search filtering for search extension #29
Conversation
} | ||
} | ||
|
||
implicit val searchFilter: Filterable[Any, SearchFilters] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converts SearchFilters
to a fragment, this didn't turn out to be too bad
import io.circe.generic.semiauto._ | ||
import scala.util.Try | ||
|
||
final case class Page(limit: Option[Int], next: Option[String]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Page
is weird because the semantics on what next
can be are pretty loose in the spec, in our case we interpret it as "page number", but we have to be careful for how we parse it, handle errors, and deal with defaults. In this case we don't raise if it's something we can't interpret, just assume that it's None
.
Also, I don't know the best way to pass in a default limit, so for now 20
is a magical number.
scapegoatVersion in ThisBuild := Versions.ScapegoatVersion, | ||
scalacOptions := Seq( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with sbt-tpolecat
docker-compose -f docker-compose.yml \ | ||
up api | ||
echo -e "\e[32m[franklin] Starting API service\e[0m" | ||
bloop run application -- serve --db-host=localhost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switches to using bloop
for everything here.
Neat thing I learned is that everything after --
gets interpreted as arguments to run
which makes our usage of decline
not a problem.
|
||
./sbt "; scalafix --check; test; docs/mdoc --check" | ||
echo -e "\e[32m[franklin] Execute Scalafix\e[0m" | ||
./sbt ";scalafix --check;scalafmtCheck;scalafmtSbtCheck;scapegoat;undeclaredCompileDependenciesTest;unusedCompileDependenciesTest;test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing all the things
} else { | ||
collection | ||
} | ||
collection.copy( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The distinction between public
/private
was lost after upgrading gt server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing I'm most unsure about is the caching strategy. Other than that, everything that I'd have commented on you've opened issues for, so I think this is mostly good to go.
Oops forgot to mention -- also |
Overview
This adds the
STAC
search API extension support for filtering based on query parameters and aPOST
request with a json body.There are a few other changes as well.
The biggest change I think is the collapse of the subprojects into a single project. The thinking here is that this makes development a little easier and since any library-like functionality should be moved into
stac4s
we don't lose anything in portability or reduced artifact size. Reducing to a single project makes it easier to identify packages that should be removed if they are no longer necessary.Everything is changed to use
bloop
and run commands through that - this aligns with our giter8 template at Azavea.Additionally, the
DAO
from RF is imported here. At least until that functionality gets moved out into its own artifact the functionality is copied over here. Still works out nicely../scripts/test
now does way more things - checking formatting, running scapegoat, etc.Notes
Right now the tests confirm that the search service doesn't explode, but I think ideally we have some more specific tests to ensure that the tests function as we expect with some fixtures -- I opened an issue for that.
A few generators are copied over from
stac4s
- I opened an issue over there to publish those. Once that happens we can work on this issue.Testing
./scripts/setup
./scripts/server
Closes #3