-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·41 lines (38 loc) · 1008 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·41 lines (38 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -euo pipefail
# Ensure at least one argument is provided
if [ "$#" -eq 0 ]; then
echo "Usage: $0 {uniref|uniprot|xml_split|test} [args...]"
exit 1
fi
cmd="$1"
shift
case "$cmd" in
xml_split)
# Run the xml_file_splitter app
exec /usr/bin/tini -- xml_file_splitter "$@"
;;
uniref)
# Run the uniref pipeline with any additional arguments
exec /usr/bin/tini -- uv run --no-sync uniref "$@"
;;
uniprot)
# Run the uniprot pipeline with any additional arguments
exec /usr/bin/tini -- uv run --no-sync uniprot "$@"
;;
# ncbi_rest_api)
# # Run the NCBI datasets API importer
# exec /usr/bin/tini -- uv run --no-sync ncbi_rest_api "$@"
# ;;
test)
# run the tests
exec /usr/bin/tini -- uv run --no-sync pytest -m "not requires_spark"
;;
bash)
exec /usr/bin/tini -- /bin/bash
;;
*)
echo "Error: unknown command '$cmd'; valid commands are 'uniref', 'uniprot', or 'xml_split'." >&2
exit 1
;;
esac