Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align with new server feature (project creation not creating a dataset by default) #67

Closed
tcompa opened this issue Oct 9, 2023 · 0 comments · Fixed by #68
Closed

Align with new server feature (project creation not creating a dataset by default) #67

tcompa opened this issue Oct 9, 2023 · 0 comments · Fixed by #68

Comments

@tcompa
Copy link
Collaborator

tcompa commented Oct 9, 2023

Requires:

As a by-product of this change, it turns out that our examples should get simpler, rather than more complex.

Current version

# Create project
OUTPUT=`fractal --batch project new $PROJECT_NAME`
PROJECT_ID=`echo $OUTPUT | cut -d ' ' -f1`
DS_IN_ID=`echo $OUTPUT | cut -d ' ' -f2`
echo "PROJECT_ID=$PROJECT_ID"  # Do not remove this line, it's used in fractal-containers
echo "DS_IN_ID=$DS_IN_ID"

# Update dataset name/type, and add a resource
fractal dataset edit --new-name "$DS_IN_NAME" --new-type image --make-read-only $PROJECT_ID $DS_IN_ID
fractal dataset add-resource $PROJECT_ID $DS_IN_ID $INPUT_PATH

# Add output dataset, and add a resource to it
DS_OUT_ID=`fractal --batch project add-dataset $PROJECT_ID "$DS_OUT_NAME"`
echo "DS_OUT_ID=$DS_OUT_ID"

fractal dataset edit --new-type zarr --remove-read-only $PROJECT_ID $DS_OUT_ID
fractal dataset add-resource $PROJECT_ID $DS_OUT_ID $OUTPUT_PATH

Future version (to be checked):

# Create project
PROJECT_ID=`fractal --batch project new $PROJECT_NAME`
echo "PROJECT_ID=$PROJECT_ID"  # Do not remove this line, it's used in fractal-containers

# Add input dataset
DS_IN_ID=`fractal --batch project add-dataset $PROJECT_ID "$DS_IN_NAME" --type image`
echo "DS_IN_ID=$DS_IN_ID"
fractal dataset add-resource $PROJECT_ID $DS_IN_ID $INPUT_PATH

# Add output dataset
DS_OUT_ID=`fractal --batch project add-dataset $PROJECT_ID "$DS_OUT_NAME" --type zarr`
echo "DS_OUT_ID=$DS_OUT_ID"
fractal dataset add-resource $PROJECT_ID $DS_OUT_ID $OUTPUT_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant