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

feat: add functions for project-dataset operations #82

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Mar 10, 2025

This adds:

  • JuliaHub.project_dataset(s) to get dataset(s) that are attached to a project
  • JuliaHub.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 the JULIAHUB_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 passing project to JuliaHub.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.

Comment on lines +338 to +340
function _close_dataset_version(
auth::Authentication, dataset_uuid::UUID, upload_config; local_path
)::_RESTResponse

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

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.

Comment on lines 755 to 757
function _close_dataset_version(
name, upload_config; local_path=nothing, auth::Authentication=__auth__()
auth::Authentication, name, upload_config; local_path=nothing
)::_RESTResponse

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}

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.

Comment on lines 170 to +171
maxcount::Integer = $(_DEFAULT_authenticate_maxcount),
[project::Union{AbstractString, UUIDs.UUID, Nothing}],

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.

Comment on lines +326 to +328
function _open_dataset_version(
auth::Authentication, dataset_uuid::UUID, project_uuid::UUID
)::_RESTResponse

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.

Comment on lines +417 to +419
function _normalize_project(
project::Union{AbstractString, UUIDs.UUID, Nothing, Missing}
)::Union{UUID, Nothing}

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
Comment on lines 1 to 8
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).
"""

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-code-juliacomputing-new

Semgrep found 21 no-whitespace-padding findings:

Avoid unnecessary whitespace padding inside brackets.

Semgrep found 10 no-implicit-return findings:

Block-form functions should explicity return a value. If no meaningful
value is returned, explicity write return nothing instead.

Semgrep found 8 long-signature-params-layout findings:

Functions signatures with parameters that together exceed 92 characters should be
split so each parameter is in a separate line.

Semgrep found 1 indent-multiline-signature-params finding:

Functions signatures that span multiple lines should indent each parameter line by one level.

Semgrep found 1 global-var-lowercase finding:

Global variables should be avoided whenever possible. When required, global variables should have an all uppercase name separated with underscores.

@mortenpi mortenpi changed the title feat: add function for project-dataset operations feat: add functions for project-dataset operations Mar 10, 2025
Comment on lines +392 to +396
function _parse_dataset_list(
datasets::Vector;
username::Union{AbstractString, Nothing}=nothing,
expected_project::Union{UUIDs.UUID, Nothing}=nothing,
)::Vector{Dataset}

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.

Comment on lines +714 to +715
InvalidRequestError(
"Local data type ($expected_dtype) does not match existing dataset dtype $(upload_config["dataset_type"])"

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.

Comment on lines 209 to 211
function Base.show(io::IO, ::MIME"text/plain", d::Dataset)
printstyled(io, "Dataset:"; bold=true)
print(io, " ", d.name, " (", d.dtype, ")")

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

Suggested change
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
  1. Locate the Base.show function definition for MIME"text/plain" in your code.
  2. 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 last print 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.

Comment on lines +155 to +156
_get_json(project_json, "project_id", String; msg=".project")
)

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

Suggested change
_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
  1. 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") ).
  2. 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.

Comment on lines 200 to +205
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, ")")

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

Suggested change
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
  1. Add an explicit return statement at the end of the Base.show function.
  2. 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.

Comment on lines +147 to 181
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(

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

Suggested change
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
  1. Add a return statement at the end of the Dataset function to explicitly return the constructed Dataset object.
  2. 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.

Comment on lines +221 to +222
d.project.is_writable ? "(writable)" : "(not writable)",
)

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.

Comment on lines +154 to +155
project_json_uuid = UUIDs.UUID(
_get_json(project_json, "project_id", String; msg=".project")

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.

Comment on lines +715 to +716
"Local data type ($expected_dtype) does not match existing dataset dtype $(upload_config["dataset_type"])"
),

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.

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 this pull request may close these issues.

JuliaHub.upload_dataset() should connect automatically to a project
1 participant