Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Victorlouisdg committed Apr 22, 2024
1 parent 397c439 commit 90df50e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
10 changes: 10 additions & 0 deletions cloth-tools/cloth_tools/dataset/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ def get_latest_observation_start_url(server_url: str) -> str:


def download_latest_observation(dataset_dir: str, server_url: str) -> tuple[str, str]:
"""Download the latest start observation's files from the Cloth Competition server.
Also returns the sample ID, which must be used when uploading a grasp.json file.
Args:
dataset_dir: The directory to save observation files to.
server_url: URL of the server to download from.
Returns:
A tuple containing the path to the observation directory and the sample ID.
"""
files_to_retrieve = COMPETITION_OBSERVATION_FILENAMES
observation_dir_url = get_latest_observation_start_url(server_url)

Expand Down
11 changes: 9 additions & 2 deletions cloth-tools/cloth_tools/dataset/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
import requests


def upload_grasp(grasp_json_path, team_name, sample_id, server_url):
"""Uploads a grasp.json file along with team name and sample ID."""
def upload_grasp(grasp_json_path: str, team_name: str, sample_id: str, server_url: str) -> None:
"""Uploads a grasp.json file to the Cloth Competition server.
Args:
grasp_json_path: Path to the grasp.json file.
team_name: Your team's name, used to organize submissions.
sample_id: The ID of the sample that the grasp was generated for, for example: 2024-04-22_09-26-45-537535
server_url: URL of the server to upload to.
"""
upload_url = server_url + "/upload_grasp"

with open(grasp_json_path, "rb") as f:
Expand Down
2 changes: 1 addition & 1 deletion cloth-tools/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "cloth-tools"
version = "0.3.0"
version = "0.3.1"
authors = [
{ name = "Victor-Louis De Gusseme", email = "[email protected]" },
]
Expand Down

0 comments on commit 90df50e

Please sign in to comment.