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

refactor: mark public names as public #83

Merged
merged 4 commits into from
Mar 11, 2025
Merged

refactor: mark public names as public #83

merged 4 commits into from
Mar 11, 2025

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Mar 11, 2025

JuliaHub.jl follows the convention that all private names start with _, so we can do the loop automatically. There is still an list in the tests that we cross-check. Also, since we support all the way back to 1.6 right now, we need to make is conditional on Base.ispublic being there (and this would stay true even if bump that to the 1.10 LTS).

Will fix these warnings:

image

@mortenpi mortenpi requested a review from a team March 11, 2025 05:40
@mortenpi mortenpi enabled auto-merge (squash) March 11, 2025 08:01
Copy link
Member

@pfitzseb pfitzseb left a comment

Choose a reason for hiding this comment

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

Can't say I love the idea of programmatically marking all functions as public that follow a given naming scheme instead of explicitly marking them as public, but I guess it's fine 😅

@mortenpi mortenpi merged commit c9a711d into main Mar 11, 2025
13 checks passed
@mortenpi mortenpi deleted the mp/public branch March 11, 2025 15:32
@mortenpi
Copy link
Member Author

I don't disagree actually. In principle, this list could be turned into public statements instead

Symbol("@script_str"),
:AbstractJobConfig, :AbstractJuliaHubApp,
:appbundle, :AppBundleSizeError, :ApplicationJob, :Authentication,
:AuthenticationError, :BatchJob, :BatchImage, :ComputeConfig,
:Dataset, :DatasetReference, :DatasetVersion,
:DefaultApp, :FileHash, :InvalidAuthentication, :InvalidRequestError, :Job,
:WorkloadConfig, :JobFile, :JobLogMessage, :JobReference, :JobStatus,
:JuliaHubConnectionError, :JuliaHubError,
:JuliaHubException,
:Limit, :NodeSpec, :PackageApp, :PackageJob, :Unlimited,
:PermissionError, :script, :Secret, :UserApp,
:application, :applications, :authenticate,
:batchimage, :batchimages,
:check_authentication, :current_authentication,
:dataset, :datasets, :delete_dataset, :download_dataset, :download_job_file,
:extend_job,
:interrupt!, :isdone, :job, :job_file, :job_files,
:job_logs, :job_logs_buffered, :job_logs_newer!, :job_logs_older!,
:AbstractJobLogsBuffer, :KafkaLogsBuffer,
:hasfirst, :haslast, :jobs, :kill_job,
:nodespec, :nodespecs, :reauthenticate!, :submit_job,
:update_dataset, :upload_dataset, :wait_job,
:request,

and then we could check the naming convention in the tests. But it gets a bit annoying if we also have to support <= 1.10, since there's no way to list / filter for public names there.

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.

2 participants