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

try to automate and improve the doc building. WIP #502

Merged
merged 13 commits into from
Jul 1, 2021
Merged

try to automate and improve the doc building. WIP #502

merged 13 commits into from
Jul 1, 2021

Conversation

fieker
Copy link
Contributor

@fieker fieker commented Jun 28, 2021

Very much WIP

@fieker fieker mentioned this pull request Jun 28, 2021
docs/make_work.jl Outdated Show resolved Hide resolved
docs/make.jl Outdated Show resolved Hide resolved
docs/make.jl Outdated Show resolved Hide resolved
docs/make_local.jl Outdated Show resolved Hide resolved
docs/make_work.jl Outdated Show resolved Hide resolved
using Oscar
using Kroki
Copy link
Member

Choose a reason for hiding this comment

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

(Why) is this necessary?

Copy link
Contributor Author

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...

@fingolfin fingolfin changed the title try to automate and imporve the doc building. WIP try to automate and improve the doc building. WIP Jun 29, 2021

makedocs(bib,
s = prod(eachline(joinpath(Oscar.oscardir, "docs", "doc.main")))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
s = prod(eachline(joinpath(Oscar.oscardir, "docs", "doc.main")))
s = read(joinpath(Oscar.oscardir, "docs", "doc.main")), String)

Comment on lines +188 to +194
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))
Copy link
Member

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

Suggested change
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)
Copy link
Member

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 Show resolved Hide resolved
src/Oscar.jl Outdated
Comment on lines 121 to 124
old = Pkg.project().path
Pkg.activate(joinpath(oscardir, "docs"))
Base.include(Main, joinpath(oscardir, "docs", "make_local.jl"))
Pkg.activate(old)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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

@fieker
Copy link
Contributor Author

fieker commented Jun 29, 2021 via email

@thofma
Copy link
Collaborator

thofma commented Jun 30, 2021

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.

fieker and others added 10 commits June 30, 2021 14:54
docs/make_local.jl Outdated Show resolved Hide resolved
@thofma
Copy link
Collaborator

thofma commented Jun 30, 2021

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

@thofma
Copy link
Collaborator

thofma commented Jul 1, 2021

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.

@fieker fieker merged commit 47974e1 into master Jul 1, 2021
@fieker fieker deleted the doc_build branch July 1, 2021 13:30
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.

None yet

3 participants