-
Notifications
You must be signed in to change notification settings - Fork 112
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
try to automate and improve the doc building. WIP #502
Conversation
docs/make_local.jl
Outdated
using Oscar | ||
using Kroki |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Why) is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not - and this is still the main problem. I do not have Kroki installed (outside doc) thus this part fails. It will work if I do the activate bit, but them I am not sure I fully understand which packages at what version are actually used. It appears that if I activate
after a using
, the used packages remain, but any new package is then loaded from the new Project.toml. Not sure what the resolve process will make of this.
I was hoping (in vain) that I can trick julia into accpeting Kroki by e.g. me doing using Kroki
before in some way...
|
||
makedocs(bib, | ||
s = prod(eachline(joinpath(Oscar.oscardir, "docs", "doc.main"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s = prod(eachline(joinpath(Oscar.oscardir, "docs", "doc.main"))) | |
s = read(joinpath(Oscar.oscardir, "docs", "doc.main")), String) |
s = prod(eachline(joinpath(Oscar.oscardir, "docs", "doc.main"))) | ||
s = replace(s, r"\$\(aa\)" => "$aa") | ||
s = replace(s, r"\$\(nemo\)" => "$nemo") | ||
s = replace(s, r"\$\(hecke\)" => "$hecke") | ||
|
||
|
||
doc = Meta.eval(Meta.parse(s)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we can't simply do
s = prod(eachline(joinpath(Oscar.oscardir, "docs", "doc.main"))) | |
s = replace(s, r"\$\(aa\)" => "$aa") | |
s = replace(s, r"\$\(nemo\)" => "$nemo") | |
s = replace(s, r"\$\(hecke\)" => "$hecke") | |
doc = Meta.eval(Meta.parse(s)) | |
doc = include(joinpath(Oscar.oscardir, "docs", "doc.main"))) |
possibly after editing doc.main
a bit (and then renaming it, e.g. to doc_main.jl
)
""" | ||
`p` has to be unramifed in the `base_ring` of `A` | ||
""" | ||
function local_cohomology_easy(A::ClassField, p::NfOrdIdl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this slipped in here by accident?
src/Oscar.jl
Outdated
old = Pkg.project().path | ||
Pkg.activate(joinpath(oscardir, "docs")) | ||
Base.include(Main, joinpath(oscardir, "docs", "make_local.jl")) | ||
Pkg.activate(old) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old = Pkg.project().path | |
Pkg.activate(joinpath(oscardir, "docs")) | |
Base.include(Main, joinpath(oscardir, "docs", "make_local.jl")) | |
Pkg.activate(old) | |
Pkg.activate(joinpath(oscardir, "docs")) do | |
Base.include(Main, joinpath(oscardir, "docs", "make_local.jl")) | |
end |
On Tue, Jun 29, 2021 at 06:28:07AM -0700, Max Horn wrote:
@fingolfin commented on this pull request.
>
-makedocs(bib,
+ s = prod(eachline(joinpath(Oscar.oscardir, "docs", "doc.main")))
```suggestion
s = read(joinpath(Oscar.oscardir, "docs", "doc.main")), String)
```
> + s = prod(eachline(joinpath(Oscar.oscardir, "docs", "doc.main")))
+ s = replace(s, r"\$\(aa\)" => "$aa")
+ s = replace(s, r"\$\(nemo\)" => "$nemo")
+ s = replace(s, r"\$\(hecke\)" => "$hecke")
+
+
+ doc = Meta.eval(Meta.parse(s))
Is there a reason why we can't simply do
```suggestion
doc = include(joinpath(Oscar.oscardir, "docs", "doc.main")))
```
possibly after editing `doc.main` a bit (and then renaming it, e.g. to `doc_main.jl`)
No, that would defeat the purpose, I'd think. If I include it it will be
evaluated in the wrong context and I cannot assign a name to it.
It needs to be read on build_doc or otherwise I cannot change it without
reloading everything...
> @@ -847,6 +847,30 @@ function iscoboundary(c::CoChain{2,PermGroupElem,nf_elem})
return fl, CoChain{1,PermGroupElem,nf_elem}(c.C, Dict((h, evaluate(mu(v))) for (h,v) = d.d))
end
+function isunramified(p::NfOrdIdl)
+ return ramification_index(p) == 1
+end
+
+"""
+`p` has to be unramifed in the `base_ring` of `A`
+"""
+function local_cohomology_easy(A::ClassField, p::NfOrdIdl)
I think this slipped in here by accident?
Yep, and I have no idea why and how. As far as I can see, I did never
add it, did no commia -a or a commit of the entire folder....
> + old = Pkg.project().path
+ Pkg.activate(joinpath(oscardir, "docs"))
+ Pkg.update()
+ Pkg.activate(old)
Would this also work?
```suggestion
Pkg.activate(joinpath(oscardir, "docs")) do
Pkg.update()
end
it should
… ```
> + old = Pkg.project().path
+ Pkg.activate(joinpath(oscardir, "docs"))
Base.include(Main, joinpath(oscardir, "docs", "make_local.jl"))
+ Pkg.activate(old)
```suggestion
Pkg.activate(joinpath(oscardir, "docs")) do
Base.include(Main, joinpath(oscardir, "docs", "make_local.jl"))
end
```
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#502 (review)
|
In a fresh environment, this is failing for me with julia> using Revise, Oscar; Oscar.build_doc()
[ Info: Precompiling Oscar [f1435218-dba5-11e9-1e4d-f1a5fab5fc13]
----- ----- ----- - -----
| | | | | | | | | |
| | | | | | | |
| | ----- | | | |-----
| | | | |-----| | |
| | | | | | | | | |
----- ----- ----- - - - -
...combining (and extending) ANTIC, GAP, Polymake and Singular
Version 0.5.3-DEV ...
... which comes with absolutely no warranty whatsoever
Type: '?Oscar' for more information
(c) 2019-2021 by The Oscar Development Team
Activating environment at `~/tmp/bla/dev/Oscar/docs/Project.toml`
ERROR: LoadError: could not open file /home/bla/tmp/lattices/packages/AbstractAlgebra/fzCIm/docs/src I am looking for a fix, but it gets a bit complicated to find out what is exactly happening. |
Very much WIP
Co-authored-by: Max Horn <max@quendi.de> Co-authored-by: thofma <thofma@gmail.com>
split the doc structure away from the actual code
Co-authored-by: Max Horn <max@quendi.de>
Works locally, but there seems to be a problem on CI: https://github.com/oscar-system/Oscar.jl/pull/502/checks?check_run_id=2952608253#step:5:144 |
Working on CI and locally for me. Good to go from my part. I guess there are still things that could be cleaned up, but we can do this at a later point. |
Very much WIP