-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support terminology codes (#106)
* feat: code matching client * feat(remote): register fuzon endpoint in client * refactor(cli): prompt logic to dedicated prompt module * refactor(cli): prompt logic to dedicated prompt module * chore(deps): pyfuzon as extra dep * chore: update deps * feat(cli): support code completion in modos add * perf(codes): limit suggestions to 50 codes * fix(cli): use labels in recommendations * refactor(codes): custom Code struct * chore(deps): bump modos-schema version * feat(cli): prompt autocompletes text, persists uris * fix(cli): disable unnecessary autocomplete on modos create * test(data): use uris when required * fix(codes): fuzon-http api parameters * chore(make): document deploy recipe * feat(compose): add fuzon service * feat(nginx): register fuzon in reverse proxy * feat(fuzon): dockerized fuzon-http setup * fix(compose): add envvar for fuzon service * fix(compose): fuzon envvars * fix(nginx): typo * chore(deps): add prompt-toolkit * fix(deploy): pin fuzon to tag 0.2.3 * fix(compose): env var typo Co-authored-by: supermaxiste <[email protected]> * docs(deploy): describe config variables * feat(codes): parametrize n top code matches * fix(codes): update protocol signatures * fix(codes): default top value in code matcher protocol * docs(prompt): clearer comments * fix(deploy): typo in env var * feat(cli): list remote modos * fix(server): nest /list values in response * chore: bump pyfuzon to 0.2.5 for blank node fix and caching support * feat(cli): add search-codes command * chore(deploy): bump fuzon server to 0.2.5 * refactor(prompt): allow prompt override in SlotPrompter * refactor(codes): define protocol attributes in CodeMatcher * feat(cli): non-interactive code search --------- Co-authored-by: supermaxiste <[email protected]>
- Loading branch information
1 parent
f7542c2
commit eef83b0
Showing
17 changed files
with
1,941 additions
and
1,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"@type": "Sample", | ||
"cell_type": "astrocyte", | ||
"cell_type": "http://purl.obolibrary.org/obo/CL_0002627", | ||
"description": "Dummy sample for tests", | ||
"name": "Sample 1", | ||
"sex": "Male", | ||
"source_material": "brain tissue" | ||
"source_material": "http://purl.obolibrary.org/obo/UBERON_0002316" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM rust:1.75.0 AS builder | ||
|
||
WORKDIR /build | ||
|
||
RUN cargo install cargo-strip | ||
|
||
RUN apt-get update && apt-get install -y git | ||
|
||
RUN git clone https://github.com/sdsc-ordes/fuzon.git --branch v0.2.5 . | ||
|
||
RUN cd fuzon-http && cargo build --release && cargo strip | ||
|
||
FROM debian:stable-slim | ||
|
||
# gettext-base is required for envsubst (config templating) | ||
RUN apt update && apt install -y gettext-base libc6-dev && rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs/ | ||
COPY --from=builder /build/target/release/fuzon-http /usr/local/bin/fuzon-http | ||
COPY docker-entrypoint.sh / | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
CMD ["fuzon-http", "--config", "/fuzon/config.json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"host": "::", | ||
"port": 8080, | ||
"collections": { | ||
"cell_type": ["https://purl.obolibrary.org/obo/cl.owl"], | ||
"source_material": ["https://purl.obolibrary.org/obo/uberon.owl"], | ||
"taxon_id": ["https://purl.obolibrary.org/obo/ncbitaxon/subsets/taxslim.owl"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# only use entrypoint if running fuzon-http | ||
if [ "$1" = "fuzon-http" ] ; then | ||
|
||
# Templating | ||
if [ -e "/fuzon/config.json" ]; then | ||
echo "Using existing config.json" | ||
|
||
elif [ -e "/fuzon/config.json.template" ]; then | ||
echo "Generating config.json from config.json.template" | ||
envsubst < /fuzon/config.json.template > /fuzon/config.json | ||
cat /fuzon/config.json | ||
echo "$@" | ||
|
||
else | ||
echo "No config.json or config.json.template found. Exiting." | ||
exit 1 | ||
|
||
fi | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.