Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioroboticslab
robofish
io
Commits
255189b3
Commit
255189b3
authored
4 years ago
by
Andi Gerken
Browse files
Options
Downloads
Patches
Plain Diff
[ci] changed to push artifacts to the artifacts repository
Updated example, updated url of track format
parent
3c0d61be
No related branches found
No related tags found
No related merge requests found
Pipeline
#35225
failed
4 years ago
Stage: test
Stage: package
Stage: deploy
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ci/deploy.py
+1
-2
1 addition, 2 deletions
ci/deploy.py
examples/example_readme.py
+18
-7
18 additions, 7 deletions
examples/example_readme.py
src/robofish/io/file.py
+3
-1
3 additions, 1 deletion
src/robofish/io/file.py
with
22 additions
and
10 deletions
ci/deploy.py
+
1
−
2
View file @
255189b3
...
@@ -18,8 +18,7 @@ if __name__ == "__main__":
...
@@ -18,8 +18,7 @@ if __name__ == "__main__":
command
+=
[
"
-m
"
,
"
twine
"
,
"
upload
"
,
"
dist/*
"
]
command
+=
[
"
-m
"
,
"
twine
"
,
"
upload
"
,
"
dist/*
"
]
command
+=
[
command
+=
[
"
--repository-url
"
,
"
--repository-url
"
,
f
"
https://git.imp.fu-berlin.de/api/v4/projects/
{
env
[
'
CI
_PROJECT_ID
'
]
}
/packages/pypi
"
,
f
"
https://git.imp.fu-berlin.de/api/v4/projects/
{
env
[
'
ARTIFACTS_REPOSITORY
_PROJECT_ID
'
]
}
/packages/pypi
"
,
]
]
# ARTIFACTS_REPOSITORY_PROJECT_ID
check_call
(
command
)
check_call
(
command
)
This diff is collapsed.
Click to expand it.
examples/example_readme.py
+
18
−
7
View file @
255189b3
import
robofish.io
import
robofish.io
import
numpy
import
numpy
as
np
filename
=
"
example.hdf5
"
f
=
robofish
.
io
.
File
(
world_size_cm
=
[
100
,
100
],
frequency_hz
=
25.0
)
f
=
robofish
.
io
.
File
(
world_size_cm
=
[
100
,
100
],
frequency_hz
=
25.0
)
# Create a single robot with
4
0
pose
s
# Create a single robot with
2
0
timestep
s
# (x,y, x_orientation, y_orientation) and specified time points
# (x,y, x_orientation, y_orientation) and specified time points
f
.
create_entity
(
category
=
"
robot
"
,
name
=
"
robot
"
,
poses
=
numpy
.
zeros
((
40
,
4
)))
# Create 2 fishes with 100 poses
f
.
create_entity
(
# (x,y, x_orientation, y_orientation) and 40ms timesteps
category
=
"
robot
"
,
f
.
create_multiple_entities
(
"
fish
"
,
poses
=
numpy
.
zeros
((
2
,
100
,
4
)))
name
=
"
robot
"
,
positions
=
np
.
ones
((
20
,
2
))
*
10
,
orientations
=
np
.
zeros
((
20
,
1
)),
)
# Create 2 fishes with 20 poses
poses
=
np
.
zeros
((
2
,
20
,
4
))
poses
[:,
:,
3
]
=
1
# all fishes pointing upwards
poses
[
1
,
:,
:
2
]
=
-
20
# move first fish to x,y -20,-20
f
.
create_multiple_entities
(
"
fish
"
,
poses
=
poses
)
# Show and save the file
# Show and save the file
print
(
f
)
print
(
f
)
f
.
save
(
"
example.hdf5
"
)
f
.
save
(
filename
)
print
(
f
"
Saved to
{
filename
}
"
)
This diff is collapsed.
Click to expand it.
src/robofish/io/file.py
+
3
−
1
View file @
255189b3
...
@@ -32,7 +32,9 @@ import deprecation
...
@@ -32,7 +32,9 @@ import deprecation
temp_dir
=
tempfile
.
TemporaryDirectory
()
temp_dir
=
tempfile
.
TemporaryDirectory
()
default_format_version
=
np
.
array
([
1
,
0
],
dtype
=
np
.
int32
)
default_format_version
=
np
.
array
([
1
,
0
],
dtype
=
np
.
int32
)
default_format_url
=
"
https://git.imp.fu-berlin.de/bioroboticslab/robofish/track_format/-/releases/1.0-draft.10
"
default_format_url
=
(
"
https://git.imp.fu-berlin.de/bioroboticslab/robofish/track_format/-/releases/1.0
"
)
class
File
(
h5py
.
File
):
class
File
(
h5py
.
File
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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