Skip to content
Snippets Groups Projects
Commit 82890d18 authored by François  LAURENT's avatar François LAURENT
Browse files

Merge branch 'dev' into 'main'

Set of commits to be tagged v0.16.1

Closes #121 and #122

See merge request !10
parents a6f1a658 7d09ca55
No related branches found
No related tags found
1 merge request!10Set of commits to be tagged v0.16.1
Pipeline #106522 passed
name = "LarvaTagger"
uuid = "8b3b36f1-dfed-446e-8561-ea19fe966a4d"
authors = ["François Laurent", "Institut Pasteur"]
version = "0.16"
version = "0.16.1"
[deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
......
......@@ -163,7 +163,7 @@ docker pull flaur/larvatagger
```
Beware that images that ship with backends are relatively large files (>5GB on disk).
If you are not interested in automatic tagging, use the `flaur/larvatagger:0.16-standalone` image instead.
If you are not interested in automatic tagging, use the `flaur/larvatagger:0.16.1-standalone` image instead.
### Upgrading
......
......@@ -22,6 +22,10 @@ for _ in $(seq $#); do
shift
;;
*)
if [ "$1" = "--no-cache" ]; then
# --no-cache is default for build since 0.16.1
no_cache=1
fi
# note: if DOCKER_ARGS is externally defined, it must end with an explicit space
DOCKER_ARGS="${DOCKER_ARGS}$1 "
shift
......@@ -78,12 +82,15 @@ DOCKER_ARGS="--build-arg BACKEND=${1:15} $DOCKER_ARGS"; shift
TARGET=backend
elif [ "$1" = "--no-cache" ]; then
echo "Deprecation warning: argument $1 should now be passed before build"
DOCKER_ARGS="--no-cache $DOCKER_ARGS"; shift
shift
else
echo "argument not supported: $1"; shift
exit 1
fi
done
if [ -z "$no_cache" ]; then
DOCKER_ARGS="--no-cache $DOCKER_ARGS"
fi
DOCKER_ARGS="--target $TARGET $DOCKER_ARGS"
if [ "$BUILD" == "--dev" ]; then
if ! [[ "$LARVATAGGER_IMAGE" == *:* ]]; then LARVATAGGER_IMAGE="${LARVATAGGER_IMAGE}:dev"; fi
......@@ -204,8 +211,14 @@ eval $DOCKER_RUN
predict)
if [ "$(basename "$(dirname "$1")")" = "**" ]; then
parentdir=$(cd "$(dirname "$(dirname "$1")")"; pwd -P)
data_file=$(basename "$(dirname "$1")")/$(basename "$1")
else
parentdir=$(cd "$(dirname "$1")"; pwd -P)
data_file=$(basename "$1"); shift
data_file=$(basename "$1")
fi
shift
RUN_ARGS="$RUN_ARGS -v \"$parentdir\":/data"
......
......@@ -3,7 +3,7 @@ module Toolkit
using DocOpt
using Pkg
using OrderedCollections
using PlanarLarvae, PlanarLarvae.Datasets, PlanarLarvae.Formats
using PlanarLarvae, PlanarLarvae.Datasets, PlanarLarvae.Formats, PlanarLarvae.Dataloaders
include("Taggers.jl")
using .Taggers
......@@ -191,10 +191,14 @@ function main(args=ARGS; exit_on_error=true)
if endswith(datapath, ".txt")
# assume that the file lists paths to data files to be processed;
# in this case, the path to the txt file is not relevant
@info "The listed data file paths are expected to be relative to current directory" cwd=pwd()
pwd()
else
dirname(datapath)
end
elseif occursin("*", datapath)
repository = Dataloaders.Repository(datapath)
repository.root
else
datapath
end
......
......@@ -408,7 +408,7 @@ function explicit_editions_needed(controller, editiontag)
file = preload(originalfile)
if file isa Formats.JSONLabels
Formats.load!(file)
return haskey(file.run, :labels)
return haskey(file.run.attributes, :labels)
elseif file isa Formats.Trxmat
return true
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment