Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PlanarLarvae.jl
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nyx
PlanarLarvae.jl
Commits
1f3d58a7
Commit
1f3d58a7
authored
3 years ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
manual artefact management replaced by LazyArtifacts
parent
aaf0859d
No related branches found
Branches containing commit
Tags
0.1.0
Tags containing commit
No related merge requests found
Pipeline
#69451
passed with stage
Stage:
in 51 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Artifacts.toml
+7
-0
7 additions, 0 deletions
Artifacts.toml
Project.toml
+2
-4
2 additions, 4 deletions
Project.toml
test/makedata.jl
+30
-11
30 additions, 11 deletions
test/makedata.jl
test/runtests.jl
+3
-4
3 additions, 4 deletions
test/runtests.jl
with
42 additions
and
19 deletions
Artifacts.toml
0 → 100644
+
7
−
0
View file @
1f3d58a7
[chore_sample_output]
git-tree-sha1
=
"21f352668bf80009c68c3487fb464df477dc2b7a"
lazy
=
true
[[chore_sample_output.download]]
url
=
"https://gitlab.pasteur.fr/nyx/artefacts/-/raw/master/PlanarLarvae/chore_sample_output.tar.gz?inline
=
false
"
sha256
=
"56845fa23cf53a58df33f6a4daf48e0a031f3c7e920f9badd62ae07f350b62d8"
This diff is collapsed.
Click to expand it.
Project.toml
+
2
−
4
View file @
1f3d58a7
...
...
@@ -10,10 +10,8 @@ OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
julia
=
"1.6"
[extras]
CodecBzip2
=
"523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
Downloads
=
"f43a241f-c20a-4ad4-852c-f6b1247861c6"
TranscodingStreams
=
"3bb67fe8-82b1-5028-8e26-92a6c54297fa"
LazyArtifacts
=
"4af54fe1-eca0-43a8-85a7-787d91b784e3"
Test
=
"8dfed614-e22c-5e08-85e1-65c5234f0b40"
[targets]
test
=
[
"
CodecBzip2"
,
"Downloads"
,
"TranscodingStream
s"
,
"Test"
]
test
=
[
"
LazyArtifact
s"
,
"Test"
]
This diff is collapsed.
Click to expand it.
test/makedata.jl
+
30
−
11
View file @
1f3d58a7
using
Downloads
using
CodecBzip2
using
TranscodingStreams
using
LazyArtifacts
function
make_test_data
()
target
=
"test/data/20150701_105504@FCF_attP2_1500062@UAS_Chrimson_Venus_X_0070@t15@r_LED50_30s2x15s30s#n#n#n@100.outline"
if
!
Base
.
Filesystem
.
isfile
(
target
)
Base
.
Filesystem
.
mkpath
(
"test/data"
)
Downloads
.
download
(
"http://dl.pasteur.fr/fop/F7B0qbc7/20150701_105504%40FCF_attP2_1500062%40UAS_Chrimson_Venus_X_0070%40t15%40r_LED50_30s2x15s30s%23n%23n%23n%40100.outline.bz2"
,
target
*
".bz2"
)
open
(
target
,
"w"
)
do
f
write
(
f
,
TranscodingStream
(
Bzip2Decompressor
(),
open
(
target
*
".bz2"
)))
function
make_test_data
(
target
=
"chore_sample_outline"
)
# we want `targets` to be mutable
isstr
=
typeof
(
target
)
===
String
if
isstr
targets
=
[
target
]
else
# copy
targets
=
Vector
{
String
}(
target
)
end
for
t
in
1
:
length
(
targets
)
target
=
targets
[
t
]
# call the `artifact` string macro
if
startswith
(
target
,
"chore_sample_"
)
artefact
=
artifact
"chore_sample_output"
dir
=
"chore_sample_output"
filetype
=
target
[
length
(
"chore_sample_"
)
+
1
:
end
]
if
filetype
∉
(
"outline"
,
"spine"
)
throw
(
DomainError
(
"unknown Chore output: "
*
filetype
))
end
filename
=
"20150701_105504@FCF_attP2_1500062@UAS_Chrimson_Venus_X_0070@t15@r_LED50_30s2x15s30s#n#n#n@100."
*
filetype
else
throw
(
DomainError
(
"unknown artefact: "
*
target
))
end
# return path to individual file instead
path
=
joinpath
(
artefact
,
dir
,
filename
)
targets
[
t
]
=
path
end
if
isstr
targets
=
targets
[
1
]
end
return
targets
end
This diff is collapsed.
Click to expand it.
test/runtests.jl
+
3
−
4
View file @
1f3d58a7
...
...
@@ -5,8 +5,6 @@ include("makedata.jl")
@testset
"PlanarLarvae.jl"
begin
make_test_data
()
@testset
"Choreographies.jl"
begin
outline
=
Float32
[
156.375
,
120.625
,
156.375
,
120.750
,
156.375
,
120.875
,
156.375
,
121.000
,
156.375
,
121.125
,
156.500
,
121.125
,
156.500
,
121.250
,
156.500
,
121.375
,
156.625
,
121.375
,
156.625
,
121.375
,
156.750
,
121.375
,
156.875
,
121.375
,
156.875
,
121.375
,
157.000
,
121.250
,
157.000
,
121.250
,
157.000
,
121.125
,
157.125
,
121.125
,
157.125
,
121.000
,
157.125
,
120.875
,
157.250
,
120.875
,
157.250
,
120.750
,
157.250
,
120.625
,
157.250
,
120.500
,
157.250
,
120.375
,
157.375
,
120.375
,
157.375
,
120.250
,
157.375
,
120.125
,
157.375
,
120.000
,
157.500
,
120.000
,
157.500
,
119.875
,
157.500
,
119.750
,
157.500
,
119.625
,
157.500
,
119.500
,
157.500
,
119.375
,
157.625
,
119.375
,
157.625
,
119.250
,
157.625
,
119.125
,
157.625
,
119.000
,
157.625
,
118.875
,
157.625
,
118.750
,
157.500
,
118.750
,
157.500
,
118.750
,
157.375
,
118.750
,
157.375
,
118.750
,
157.250
,
118.875
,
157.250
,
118.875
,
157.125
,
118.875
,
157.125
,
119.000
,
157.000
,
119.000
,
157.000
,
119.125
,
157.000
,
119.250
,
156.875
,
119.250
,
156.875
,
119.375
,
156.750
,
119.375
,
156.750
,
119.500
,
156.750
,
119.625
,
156.625
,
119.625
,
156.625
,
119.750
,
156.625
,
119.875
,
156.625
,
120.000
,
156.500
,
120.000
,
156.500
,
120.125
,
156.500
,
120.250
,
156.500
,
120.375
,
156.500
,
120.500
]
outline_x
=
Float32
[
156.375
,
156.375
,
156.375
,
156.375
,
156.375
,
156.500
,
156.500
,
156.500
,
156.625
,
156.625
,
156.750
,
156.875
,
156.875
,
157.000
,
157.000
,
157.000
,
157.125
,
157.125
,
157.125
,
157.250
,
157.250
,
157.250
,
157.250
,
157.250
,
157.375
,
157.375
,
157.375
,
157.375
,
157.500
,
157.500
,
157.500
,
157.500
,
157.500
,
157.500
,
157.625
,
157.625
,
157.625
,
157.625
,
157.625
,
157.625
,
157.500
,
157.500
,
157.375
,
157.375
,
157.250
,
157.250
,
157.125
,
157.125
,
157.000
,
157.000
,
157.000
,
156.875
,
156.875
,
156.750
,
156.750
,
156.750
,
156.625
,
156.625
,
156.625
,
156.625
,
156.500
,
156.500
,
156.500
,
156.500
,
156.500
]
...
...
@@ -30,7 +28,8 @@ include("makedata.jl")
end
@testset
"Outlines.jl"
begin
outline
=
Outlines
.
read_outline
(
RawOutline
,
"test/data/20150701_105504@FCF_attP2_1500062@UAS_Chrimson_Venus_X_0070@t15@r_LED50_30s2x15s30s#n#n#n@100.outline"
)
target
=
make_test_data
(
"chore_sample_outline"
)
outline
=
Outlines
.
read_outline
(
RawOutline
,
target
)
@test
length
(
outline
)
==
1
@test
haskey
(
outline
,
"20150701_105504"
)
outline′
=
outline
[
"20150701_105504"
]
...
...
@@ -41,7 +40,7 @@ include("makedata.jl")
timestamp
,
outline‴
=
outline″
[
end
]
@test
timestamp
==
120.162
@test
outline‴
==
Float32
[
156.375
,
120.625
,
156.375
,
120.750
,
156.375
,
120.875
,
156.375
,
121.000
,
156.375
,
121.125
,
156.500
,
121.125
,
156.500
,
121.250
,
156.500
,
121.375
,
156.625
,
121.375
,
156.625
,
121.375
,
156.750
,
121.375
,
156.875
,
121.375
,
156.875
,
121.375
,
157.000
,
121.250
,
157.000
,
121.250
,
157.000
,
121.125
,
157.125
,
121.125
,
157.125
,
121.000
,
157.125
,
120.875
,
157.250
,
120.875
,
157.250
,
120.750
,
157.250
,
120.625
,
157.250
,
120.500
,
157.250
,
120.375
,
157.375
,
120.375
,
157.375
,
120.250
,
157.375
,
120.125
,
157.375
,
120.000
,
157.500
,
120.000
,
157.500
,
119.875
,
157.500
,
119.750
,
157.500
,
119.625
,
157.500
,
119.500
,
157.500
,
119.375
,
157.625
,
119.375
,
157.625
,
119.250
,
157.625
,
119.125
,
157.625
,
119.000
,
157.625
,
118.875
,
157.625
,
118.750
,
157.500
,
118.750
,
157.500
,
118.750
,
157.375
,
118.750
,
157.375
,
118.750
,
157.250
,
118.875
,
157.250
,
118.875
,
157.125
,
118.875
,
157.125
,
119.000
,
157.000
,
119.000
,
157.000
,
119.125
,
157.000
,
119.250
,
156.875
,
119.250
,
156.875
,
119.375
,
156.750
,
119.375
,
156.750
,
119.500
,
156.750
,
119.625
,
156.625
,
119.625
,
156.625
,
119.750
,
156.625
,
119.875
,
156.625
,
120.000
,
156.500
,
120.000
,
156.500
,
120.125
,
156.500
,
120.250
,
156.500
,
120.375
,
156.500
,
120.500
]
outline
=
Outlines
.
read_outline
(
"test/data/20150701_105504@FCF_attP2_1500062@UAS_Chrimson_Venus_X_0070@t15@r_LED50_30s2x15s30s#n#n#n@100.outline"
)
outline
=
Outlines
.
read_outline
(
target
)
i
=
0
for
(
larva_id
,
outline′
)
in
pairs
(
outline
[
"20150701_105504"
])
i
+=
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment