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

Save manually created resource in the config #373

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Conversation

aidazolic
Copy link
Contributor

@aidazolic aidazolic commented Nov 20, 2023

Adds the functionality to save a manually created resource. The ability to add data to this resource (e.g. Record Sets) will be added separately.

See the demo here

@aidazolic aidazolic requested a review from a team as a code owner November 20, 2023 15:33
@aidazolic aidazolic self-assigned this Nov 20, 2023
@aidazolic aidazolic linked an issue Nov 20, 2023 that may be closed by this pull request
Copy link

github-actions bot commented Nov 20, 2023

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@aidazolic aidazolic requested a review from marcenacp November 20, 2023 15:39
Copy link
Contributor

@marcenacp marcenacp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

editor/core/files.py Outdated Show resolved Hide resolved
if not name or (needs_sha256 and not sha256):
# Some required fields are empty.
st.toast(
"Please, import either a local file, provide a download URL, or"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the error message relevant to the error? Please, fill in all required fields: ...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified the error message. Basically we show the error if neither uploaded file, nor URL, nor the form with the manual input is filled in so that we can actually add a Resource. Probably would be better to have a dedicated error message for each "option".

Also, do we want to maybe not clear the form if it wasn't handled successfully? This way if the user e.g. inputs name, description and clicks "Upload" we don't delete everything but they can just add the SHA256.

@aidazolic aidazolic merged commit e9dcfee into main Nov 21, 2023
13 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manually adding a resource saves it
2 participants