-
Notifications
You must be signed in to change notification settings - Fork 101
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
check if name is similar to existing package? #292
Comments
I think this would be a good addition! On first thought, id say this check should always run (assuming it's fast enough) but only be a warning. Also I'd prefer RegistryCI have an API for this, so we can guarantee to always do what that does. |
I'll note that having RegistryCI as a dependency of this package is rather unappealing... but I do like the idea. |
RegistryCI is a very heavy package with a lot of dependencies. @ericphanson Maybe we could refactor the name-checking functionality out into a small package, e.g. |
Good point about the dependency. The name checking code actually isn’t super light because it uses various not-totally-trivial distance measures. The code in RegistryCI uses VisualStringDistances (which uses UnbalancedOptimalTransport and StaticArrays, but those only have stdlibs deps themselves) and StringDistances (which uses Distances and StatsAPI, and those just use each other and stdlibs). So even just the name checking code is 6 total dependencies + stdlibs. So I totally get if that’s too many for PkgTemplates. Also, while it’s pretty fast, it’s not instant; it can take a couple seconds which is a noticeable lag for interactive stuff. That’s because of the visual distance. (Every new package registration involves solving 100s of optimization problems comparing pixelated grids representing the names, in pure Julia, in CI, since it was introduced like 6 months ago, with no issues so far 😎) |
You know what could be cool? What if JuliaHub had a feature in which you put in a prospective package name, and then JuliaHub runs the name checking code for you? So then we don't need to add any dependencies to PkgTemplates. |
This could go into #360 ? |
One can use
to check if a proposed package name will pass AutoMerge's check about package names (as documented in the General registry's README, https://github.com/JuliaRegistries/General#automatic-merging-of-pull-requests).
I thought it could be helpful if PkgTemplates (perhaps optionally) runs this check at package-creation time. It could also support multiple registries (although obviously AutoMerge for General only looks at General, it can still be good to know if there are similar names in another registry you are using), e.g.
(Perhaps we should add a real API for this in RegistryCI though, if it's going to be used programatically)
The text was updated successfully, but these errors were encountered: