-
Notifications
You must be signed in to change notification settings - Fork 126
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
Patch search index #4292
Patch search index #4292
Conversation
This removes anything in search index that is not also present in doc.main. That is, the search function will not return "hidden" pages, which are not available via normal navigation.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4292 +/- ##
==========================================
- Coverage 84.49% 84.47% -0.02%
==========================================
Files 641 641
Lines 85476 85541 +65
==========================================
+ Hits 72226 72264 +38
- Misses 13250 13277 +27 |
Docs deployment failed because I load JSON, and JSON is not available. In principle I understand this, but I am now confused about how Julia works. I thought Julia only makes the packages added to the current project available for import ? Here's my Project.toml: $ cat Project.toml
[deps]
Oscar = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" My invocation of julia and using Json: $ julia --project=./
The latest version of Julia in the `release` channel is 1.11.1+0.x64.linux.gnu. You currently have `1.10.4+0.x64.linux.gnu` installed. Run:
juliaup update
in your terminal shell to install Julia 1.11.1+0.x64.linux.gnu and update the `release` channel to that version.
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.4 (2024-06-04)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using JSON
help?> JSON.parse
parse(str::AbstractString;
dicttype::Type{T}=Dict,
inttype::Type{<:Real}=Int64,
allownan::Bool=true,
null=nothing) where {T<:AbstractDict}
... So, on my local computer, Coming back to point, since JSON is apparently an external dependency, do we want to add it to Oscar ? Are there other workarounds to parse json files into a vector of dicts ? |
You might have JSON in your global environment (the projects are layered, you can also load stuff from there even with But Oscar already depends on JSON, so you should be able to just use |
Alternatively, you can add JSON to |
Is there a preferred answer between these two alternatives ? |
I would say adding it explicitly to the docs project is cleaner and doesn't hurt. |
Looks like all works, and documentation preview is available at https://docs.oscar-system.org/previews/PR4292/ |
Again, I don't get it. The search index created by CI is emtpy ( https://docs.oscar-system.org/previews/PR4292/search_index.js ). The search index created on my host has a lot of entries in it.
I don't have any local changes which I haven't committed.
|
I do get an (almost) empty file when running this locally:
One thing that might be an issue is that the filelist has
|
I test using Does this do something different which adds {
"location": "NoncommutativeAlgebra/PBWAlgebras/ideals.html#is_zero-Tuple{Oscar.PBWAlgIdeal}",
"page": "Ideals in PBW-algebras",
"title": "is_zero",
"text": "is_zero(I::PBWAlgIdeal)\n\nReturn true if I is the zero ideal, false otherwise.\n\nExamples\n\njulia> D, (x, y, dx, dy) = weyl_algebra(QQ, [:x, :y])\n(Weyl-algebra over Rational field in variables (x, y), PBWAlgElem{QQFieldElem, Singular.n_Q}[x, y, dx, dy])\n\njulia> I = left_ideal(D, [x, dx])\nleft_ideal(x, dx)\n\njulia> is_zero(I)\nfalse\n\n\n\n\n\n",
"category": "method"
}
|
I ran the commands from the CI yml, i.e. Edit: |
This does not work for me at all, i.e., the $ find docs/ -name "*.js"
docs/build/AbstractAlgebra/mathjaxhelper.js
docs/build/Nemo/mathjaxhelper.js
docs/build/assets/themeswap.js
docs/build/assets/warner.js
docs/build/assets/documenter.js The exact command I ran was
|
I pushed a commit using julia for parsing the |
Looks like it worked, the search index is not empty anymore, search seems to work and the file is 3.4MB instead of the 5.4MB on the current master. |
Preview for testing is at https://oscar-system.github.io/Oscar.jl/previews/PR4292/ |
@HereAround will briefly approve it |
@aaruni96 I just checked the preview at https://docs.oscar-system.org/previews/PR4292/manualindex/. It seems that a number of search entries appear many times. For instance, I believe this is because @aaruni96 What are your thoughts? |
I think this may be a feature, not a bug. Keeping in mind the example of |
@aaruni96 and I just briefly exchanged on slack. Bottom-line: Improvements are always possible... at some point in the future (e.g. after the upcoming MaRDI workshops). Thank you for working on this @aaruni96 ! |
This removes anything in search index that is not also present in doc.main. That is, the search function will not return "hidden" pages, which are not available via normal navigation. This was easier than trying to make Documenter make a nice search index to begin with which needed more digging into ( JuliaDocs/Documenter.jl#2517 )
Address @lgoettgens comment from #3816 :
Replaces #4290