Skip to content
Snippets Groups Projects
Commit 255189b3 authored by Andi Gerken's avatar Andi Gerken
Browse files

[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
...@@ -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)
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 40 poses # Create a single robot with 20 timesteps
# (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}")
...@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment