JuliaComputing / JuliaHub-Feedback

Public repo for filing JuliaHub issues
6 stars 1 forks source link

Regex searches #133

Open timholy opened 3 years ago

timholy commented 3 years ago

The "code" search page lets you use a regex, which is awesome. However, it doesn't specify which flavor of regex it supports. I made a few guesses and haven't come up with anything so far. My specific task is motivated by a problem I'm assigning as homework to a class: find a package that has method docstrings but lacks a module docstring, and contribute a module docstring using the soon-to-be-registered ModuleDocstring package (see https://github.com/JuliaRegistries/General/pull/46228). This is essentially a warmup exercise on open-source contribution.

In Julia, I know the following regex finds "module" not preceded by a quote followed by a newline: r"(?<!(\"\n))^module"m. I've attempted several regex "flavors" on JuliaHub but not found anything that works.

(Please add "search" label to this issue.)

pfitzseb commented 3 years ago

We're using https://github.com/google/codesearch in the backend, IIRC. So the issue is that we don't expose any way to provide flags (m in this case).

timholy commented 3 years ago

I see, interesting. If you think this won't change, you could close this as a wont fix. But if it might change to a Julia backend sometime then might be better to keep open. (Some day, all code will be written in Julia, just gotta make it a little better...)

pfitzseb commented 3 years ago

No, this is a fair request, and we can definitely add a little bit of UI for regex flags (which I think are supported). A Julia based backend would also be cool, of course, but I don't think anyone on our end really has time for that at the moment.

fonsp commented 2 years ago

(That's a really cool homework exercise!)

timholy commented 2 years ago

Get 'em while they're fresh: https://github.com/timholy/AdvancedScientificComputing/blob/main/homeworks/pkgs_git_github.md