-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add functions for project-dataset operations #82
base: main
Are you sure you want to change the base?
Conversation
function _close_dataset_version( | ||
auth::Authentication, dataset_uuid::UUID, upload_config; local_path | ||
)::_RESTResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Always include a trailing comma when working with arrays, tuples or
functions arguments that span multiple lines. This allows future edits to
easily move around or add additional elements.
The trailing comma shouldn't be written when the collection is in a single line.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360591) to ignore the finding created by trailing-comma.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360591) in the Semgrep AppSec Platform.
@@ -11,7 +11,7 @@ import SHA | |||
import TimeZones | |||
import TOML | |||
import URIs | |||
import UUIDs | |||
using UUIDs: UUIDs, UUID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
All using
statements should be written before import
statements.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360587) to ignore the finding created by using-after-import.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360587) in the Semgrep AppSec Platform.
function _close_dataset_version( | ||
name, upload_config; local_path=nothing, auth::Authentication=__auth__() | ||
auth::Authentication, name, upload_config; local_path=nothing | ||
)::_RESTResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Always include a trailing comma when working with arrays, tuples or
functions arguments that span multiple lines. This allows future edits to
easily move around or add additional elements.
The trailing comma shouldn't be written when the collection is in a single line.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360593) to ignore the finding created by trailing-comma.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360593) in the Semgrep AppSec Platform.
Presently, you can specify the project by directly passing the project UUID. | ||
The UUID should be either a string (`<: AbstractString`) or an `UUIDs.UUID` object. | ||
""" | ||
const ProjectReference = Union{AbstractString, UUIDs.UUID} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Global variables should be avoided whenever possible. When required, global variables should have an all uppercase name separated with underscores.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360616) to ignore the finding created by global-var-lowercase.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360616) in the Semgrep AppSec Platform.
maxcount::Integer = $(_DEFAULT_authenticate_maxcount), | ||
[project::Union{AbstractString, UUIDs.UUID, Nothing}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
When writing arrays that span multiple lines, the opening bracket should
not be on a separate line, and the indentation of the closing bracket
should match the indentation of the line that contains the opening
bracket.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360606) to ignore the finding created by multiline-brackets-alignment.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360606) in the Semgrep AppSec Platform.
function _open_dataset_version( | ||
auth::Authentication, dataset_uuid::UUID, project_uuid::UUID | ||
)::_RESTResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Always include a trailing comma when working with arrays, tuples or
functions arguments that span multiple lines. This allows future edits to
easily move around or add additional elements.
The trailing comma shouldn't be written when the collection is in a single line.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360592) to ignore the finding created by trailing-comma.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360592) in the Semgrep AppSec Platform.
function _normalize_project( | ||
project::Union{AbstractString, UUIDs.UUID, Nothing, Missing} | ||
)::Union{UUID, Nothing} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Always include a trailing comma when working with arrays, tuples or
functions arguments that span multiple lines. This allows future edits to
easily move around or add additional elements.
The trailing comma shouldn't be written when the collection is in a single line.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360595) to ignore the finding created by trailing-comma.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360595) in the Semgrep AppSec Platform.
src/datasets.jl
Outdated
const _DOCS_nondynamic_datasets_object_warning = """ | ||
!!! warning "Non-dynamic dataset objects" | ||
|
||
[`Dataset`](@ref) objects represents the dataset metadata when the Julia object was created | ||
(e.g. with [`dataset`](@ref)), and are not automatically kept up to date. To refresh the dataset | ||
metadata, you can pass the existing [`Dataset`](@ref) to [`JuliaHub.dataset`](@ref). | ||
[`Dataset`](@ref) and [`ProjectDataset`](@ref) objects represents the dataset metadata when the | ||
Julia object was created (e.g. with [`dataset`](@ref)), and are not automatically kept up to date. | ||
To refresh the dataset metadata, you can pass the existing [`Dataset`](@ref) to [`JuliaHub.dataset`](@ref), | ||
or [`ProjectDataset`](@ref) to [`project_dataset`](@ref). | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Global variables should be avoided whenever possible. When required, global variables should have an all uppercase name separated with underscores.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360617) to ignore the finding created by global-var-lowercase.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154360617) in the Semgrep AppSec Platform.
Semgrep found 21
Avoid unnecessary whitespace padding inside brackets. Semgrep found 10
Block-form functions should explicity return a value. If no meaningful Semgrep found 8
Functions signatures with parameters that together exceed 92 characters should be Semgrep found 1 Functions signatures that span multiple lines should indent each parameter line by one level. Semgrep found 1 Global variables should be avoided whenever possible. When required, global variables should have an all uppercase name separated with underscores. |
function _parse_dataset_list( | ||
datasets::Vector; | ||
username::Union{AbstractString, Nothing}=nothing, | ||
expected_project::Union{UUIDs.UUID, Nothing}=nothing, | ||
)::Vector{Dataset} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue, but thinks it may be safe to ignore.
Functions signatures with parameters that together exceed 92 characters should be
split so each parameter is in a separate line.
Why this might be safe to ignore:
The function signature already splits each parameter onto its own line, so the rule's intent is met and fixing it will not meaningfully improve readability.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643370) to ignore the finding created by long-signature-params-layout.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643370) in the Semgrep AppSec Platform.
InvalidRequestError( | ||
"Local data type ($expected_dtype) does not match existing dataset dtype $(upload_config["dataset_type"])" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue, but thinks it may be safe to ignore.
Avoid unnecessary whitespace padding inside brackets.
Why this might be safe to ignore:
The match is triggered by multi-line formatting in a legitimate function call rather than actual unnecessary padding; fixing it wouldn't meaningfully improve code quality.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643362) to ignore the finding created by no-whitespace-padding.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643362) in the Semgrep AppSec Platform.
function Base.show(io::IO, ::MIME"text/plain", d::Dataset) | ||
printstyled(io, "Dataset:"; bold=true) | ||
print(io, " ", d.name, " (", d.dtype, ")") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Block-form functions should explicity return a value. If no meaningful
value is returned, explicity write return nothing
instead.
To resolve this comment:
✨ Commit Assistant fix suggestion
function Base.show(io::IO, ::MIME"text/plain", d::Dataset) | |
printstyled(io, "Dataset:"; bold=true) | |
print(io, " ", d.name, " (", d.dtype, ")") | |
function Base.show(io::IO, ::MIME"text/plain", d::Dataset) | |
printstyled(io, "Dataset:"; bold=true) | |
print(io, " ", d.name, " (", d.dtype, ")") | |
print(io, "\n owner: ", d.owner) | |
print(io, "\n description: ", d.description) | |
print(io, "\n versions: ", length(d.versions)) | |
print(io, "\n size: ", d.size, " bytes") | |
isempty(d.tags) || print(io, "\n tags: ", join(d.tags, ", ")) | |
if !isnothing(d.project) | |
print( | |
io, | |
"\n project: ", d.project.uuid, " ", | |
d.project.is_writable ? "(writable)" : "(not writable)", | |
) | |
end | |
return nothing # Explicitly indicate no meaningful value is returned | |
end |
View step-by-step instructions
- Locate the
Base.show
function definition forMIME"text/plain"
in your code. - Add a
return nothing
statement at the end of the function to explicitly indicate that the function does not return a meaningful value. This should be placed after the lastprint
statement.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643367) to ignore the finding created by no-implicit-return.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643367) in the Semgrep AppSec Platform.
_get_json(project_json, "project_id", String; msg=".project") | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Avoid unnecessary whitespace padding inside brackets.
To resolve this comment:
✨ Commit Assistant fix suggestion
_get_json(project_json, "project_id", String; msg=".project") | |
) | |
project_json_uuid = UUIDs.UUID(_get_json(project_json, "project_id", String; msg=".project")) |
View step-by-step instructions
- Remove the unnecessary whitespace inside the brackets in the code line
project_json_uuid = UUIDs.UUID( _get_json(project_json, "project_id", String; msg=".project") )
. - Update the line to
project_json_uuid = UUIDs.UUID(_get_json(project_json, "project_id", String; msg=".project"))
.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643364) to ignore the finding created by no-whitespace-padding.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643364) in the Semgrep AppSec Platform.
function Base.show(io::IO, d::Dataset) | ||
print(io, "JuliaHub.dataset((\"", d.owner, "\", \"", d.name, "\"))") | ||
dsref = string("(\"", d.owner, "\", \"", d.name, "\")") | ||
if isnothing(d.project) | ||
print(io, "JuliaHub.dataset(", dsref, ")") | ||
else | ||
print(io, "JuliaHub.project_dataset(", dsref, "; project=", d.project.uuid, ")") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Block-form functions should explicity return a value. If no meaningful
value is returned, explicity write return nothing
instead.
To resolve this comment:
✨ Commit Assistant fix suggestion
function Base.show(io::IO, d::Dataset) | |
print(io, "JuliaHub.dataset((\"", d.owner, "\", \"", d.name, "\"))") | |
dsref = string("(\"", d.owner, "\", \"", d.name, "\")") | |
if isnothing(d.project) | |
print(io, "JuliaHub.dataset(", dsref, ")") | |
else | |
print(io, "JuliaHub.project_dataset(", dsref, "; project=", d.project.uuid, ")") | |
function Base.show(io::IO, d::Dataset) | |
dsref = string("(\"", d.owner, "\", \"", d.name, "\")") | |
if isnothing(d.project) | |
print(io, "JuliaHub.dataset(", dsref, ")") | |
else | |
print(io, "JuliaHub.project_dataset(", dsref, "; project=", d.project.uuid, ")") | |
end | |
return nothing | |
end |
View step-by-step instructions
- Add an explicit return statement at the end of the
Base.show
function. - Since the function does not return any meaningful value, use
return nothing
to indicate this.
The updated function should look like this:
function Base.show(io::IO, d::Dataset)
dsref = string("(\"", d.owner, "\", \"", d.name, "\")")
if isnothing(d.project)
print(io, "JuliaHub.dataset(", dsref, ")")
else
print(io, "JuliaHub.project_dataset(", dsref, "; project=", d.project.uuid, ")")
end
return nothing
end
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643368) to ignore the finding created by no-implicit-return.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643368) in the Semgrep AppSec Platform.
function Dataset(d::Dict; expected_project::Union{UUIDs.UUID, Nothing}=nothing) | ||
owner = d["owner"]["username"] | ||
name = d["name"] | ||
versions_json = _get_json_or(d, "versions", Vector, []) | ||
versions = sort([DatasetVersion(json; owner, name) for json in versions_json]; by=dsv -> dsv.id) | ||
project = if !isnothing(expected_project) | ||
project_json = _get_json(d, "project", Dict) | ||
project_json_uuid = UUIDs.UUID( | ||
_get_json(project_json, "project_id", String; msg=".project") | ||
) | ||
if project_json_uuid != expected_project | ||
msg = "Project UUID mismatch in dataset response: $(project_json_uuid), requested $(project)" | ||
throw(JuliaHubError(msg)) | ||
end | ||
is_writable = _get_json( | ||
project_json, | ||
"is_writable", | ||
Bool; | ||
msg="Unable to parse .project in /datasets?project response", | ||
) | ||
DatasetProjectLink(project_json_uuid, is_writable) | ||
else | ||
nothing | ||
end | ||
Dataset(; | ||
uuid=UUIDs.UUID(d["id"]), | ||
name, owner, versions, | ||
dtype=d["type"], | ||
description=d["description"], | ||
size=d["size"], | ||
tags=d["tags"], | ||
project=project, | ||
_downloadURL=d["downloadURL"], | ||
_last_modified=_nothing_or(d["lastModified"]) do last_modified | ||
datetime_utc = Dates.DateTime( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
Block-form functions should explicity return a value. If no meaningful
value is returned, explicity write return nothing
instead.
To resolve this comment:
✨ Commit Assistant fix suggestion
function Dataset(d::Dict; expected_project::Union{UUIDs.UUID, Nothing}=nothing) | |
owner = d["owner"]["username"] | |
name = d["name"] | |
versions_json = _get_json_or(d, "versions", Vector, []) | |
versions = sort([DatasetVersion(json; owner, name) for json in versions_json]; by=dsv -> dsv.id) | |
project = if !isnothing(expected_project) | |
project_json = _get_json(d, "project", Dict) | |
project_json_uuid = UUIDs.UUID( | |
_get_json(project_json, "project_id", String; msg=".project") | |
) | |
if project_json_uuid != expected_project | |
msg = "Project UUID mismatch in dataset response: $(project_json_uuid), requested $(project)" | |
throw(JuliaHubError(msg)) | |
end | |
is_writable = _get_json( | |
project_json, | |
"is_writable", | |
Bool; | |
msg="Unable to parse .project in /datasets?project response", | |
) | |
DatasetProjectLink(project_json_uuid, is_writable) | |
else | |
nothing | |
end | |
Dataset(; | |
uuid=UUIDs.UUID(d["id"]), | |
name, owner, versions, | |
dtype=d["type"], | |
description=d["description"], | |
size=d["size"], | |
tags=d["tags"], | |
project=project, | |
_downloadURL=d["downloadURL"], | |
_last_modified=_nothing_or(d["lastModified"]) do last_modified | |
datetime_utc = Dates.DateTime( | |
function Dataset(d::Dict; expected_project::Union{UUIDs.UUID, Nothing}=nothing) | |
owner = d["owner"]["username"] | |
name = d["name"] | |
versions_json = _get_json_or(d, "versions", Vector, []) | |
versions = sort([DatasetVersion(json; owner, name) for json in versions_json]; by=dsv -> dsv.id) | |
project = if !isnothing(expected_project) | |
project_json = _get_json(d, "project", Dict) | |
project_json_uuid = UUIDs.UUID( | |
_get_json(project_json, "project_id", String; msg=".project") | |
) | |
if project_json_uuid != expected_project | |
msg = "Project UUID mismatch in dataset response: $(project_json_uuid), requested $(project)" | |
throw(JuliaHubError(msg)) | |
end | |
is_writable = _get_json( | |
project_json, | |
"is_writable", | |
Bool; | |
msg="Unable to parse .project in /datasets?project response", | |
) | |
DatasetProjectLink(project_json_uuid, is_writable) | |
else | |
nothing | |
end | |
return Dataset(; | |
uuid=UUIDs.UUID(d["id"]), | |
name, owner, versions, | |
dtype=d["type"], | |
description=d["description"], | |
size=d["size"], | |
tags=d["tags"], | |
project=project, | |
_downloadURL=d["downloadURL"], | |
_last_modified=_nothing_or(d["lastModified"]) do last_modified | |
datetime_utc = Dates.DateTime( | |
last_modified, Dates.dateformat"YYYY-mm-ddTHH:MM:SS.ss" | |
) | |
_utc2localtz(datetime_utc) | |
end, | |
_storage=_DatasetStorage(; | |
credentials_url=d["credentials_url"], | |
region=d["storage"]["bucket_region"], | |
bucket=d["storage"]["bucket"], | |
prefix=d["storage"]["prefix"], | |
), | |
_json=d, | |
) | |
end |
View step-by-step instructions
- Add a
return
statement at the end of theDataset
function to explicitly return the constructedDataset
object. - Modify the last line of the function to
return Dataset(...);
to ensure the function explicitly returns a value.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643369) to ignore the finding created by no-implicit-return.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643369) in the Semgrep AppSec Platform.
d.project.is_writable ? "(writable)" : "(not writable)", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue, but thinks it may be safe to ignore.
Avoid unnecessary whitespace padding inside brackets.
Why this might be safe to ignore:
The rule aims to fix extra whitespace padding in code syntax, not inside string literals. This instance, being a string intended for output, is a false positive and fixing it wouldn’t improve code quality.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643363) to ignore the finding created by no-whitespace-padding.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643363) in the Semgrep AppSec Platform.
project_json_uuid = UUIDs.UUID( | ||
_get_json(project_json, "project_id", String; msg=".project") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue, but thinks it may be safe to ignore.
Avoid unnecessary whitespace padding inside brackets.
Why this might be safe to ignore:
The whitespace is due to multiline formatting and proper indentation rather than unnecessary inline padding, so fixing it wouldn't improve code quality.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643365) to ignore the finding created by no-whitespace-padding.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643365) in the Semgrep AppSec Platform.
"Local data type ($expected_dtype) does not match existing dataset dtype $(upload_config["dataset_type"])" | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue, but thinks it may be safe to ignore.
Avoid unnecessary whitespace padding inside brackets.
Why this might be safe to ignore:
The matched code is part of a string literal used for error messages, and the whitespace inside it does not affect functionality or readability, so it doesn't need fixing.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>
for false positive/ar <comment>
for acceptable risk/other <comment>
for all other reasons
Alternatively, triage in [Semgrep AppSec Platform](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643361) to ignore the finding created by no-whitespace-padding.
You can view more details about [this finding](https://semgrep.dev/orgs/JuliaHub, Inc/findings/154643361) in the Semgrep AppSec Platform.
This adds:
JuliaHub.project_dataset(s)
to get dataset(s) that are attached to a projectJuliaHub.upload_project_dataset
to upload a new version of a dataset that attached to a project (if you have write access).To make things easier for the user,
JuliaHub.authenticate
will automatically pick up the project UUID from theJULIAHUB_PROJECT_UUID
environment variable, in which case you don't need to pass the project UUID to any of the project-dataset function. You can also manually set it by passingproject
toJuliaHub.authenticate
.The project-dataset function will still return
Dataset
objects, but it now can also contain a.project
field which can contain the project-dataset link metadata (e.g. writability).Close #15.