Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#19127 closed enhancement (fixed)

Some clean up in docbuilding

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-7.1
Component: build Keywords:
Cc: hivert, ncohen Merged in:
Authors: Jeroen Demeyer Reviewers: Marc Mezzarobba
Report Upstream: N/A Work issues:
Branch: 0455d14 (Commits) Commit:
Dependencies: #19950 Stopgaps:

Description (last modified by jdemeyer)

No change in functionality, just some clean up.

In particular:

  • move the code for running Sphinx to src/sage_setup/docbuild
  • do not create and delete empty directories, instead silence the Sphinx warnings about non-existing directories
  • instead of compile(), use import
  • add a new variable SAGE_DOC_OUTPUT for src/doc/output (this is moved to local/share/doc/sage in #19963)

Change History (37)

comment:1 Changed 5 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/19127

comment:2 Changed 5 years ago by jdemeyer

  • Commit set to 2e2cb7ae27f0011ea6a24128a9b4d45b447e4300
  • Status changed from new to needs_review

New commits:

2e2cb7aDocbuilder cleanup

comment:3 Changed 5 years ago by ncohen

  • Cc ncohen added

comment:4 Changed 5 years ago by git

  • Commit changed from 2e2cb7ae27f0011ea6a24128a9b4d45b447e4300 to d959af44152f58b07305e9ce85690fee77ab3dc0

Branch pushed to git repo; I updated commit sha1. New commits:

d959af4builder/__init__.py should not be executable

comment:5 Changed 5 years ago by git

  • Commit changed from d959af44152f58b07305e9ce85690fee77ab3dc0 to d783ee15dfe7bbe4b11bc7e6e3b3fd5df6535ec2

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

ff58c9cReplace conf.py copies by symlinks
d783ee1Docbuilder cleanup

comment:6 Changed 5 years ago by jdemeyer

  • Dependencies set to #19166

comment:7 Changed 5 years ago by git

  • Commit changed from d783ee15dfe7bbe4b11bc7e6e3b3fd5df6535ec2 to 9b12694b825a5e3c39a609859c4f881e73ec5414

Branch pushed to git repo; I updated commit sha1. New commits:

9b12694Merge tag '6.10.beta3' into t/19127/ticket/19127

comment:8 Changed 5 years ago by git

  • Commit changed from 9b12694b825a5e3c39a609859c4f881e73ec5414 to 97a6f82374ee220f7197779db0669f9de40b201b

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

97a6f82Merge tag '7.0.beta3' into t/19127/ticket/19127

comment:9 Changed 5 years ago by jdemeyer

  • Dependencies #19166 deleted

comment:10 Changed 5 years ago by git

  • Commit changed from 97a6f82374ee220f7197779db0669f9de40b201b to ea7efaa89c2b6d3d0cd738bed638da5138cde932

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

ea7efaaDocbuilder cleanup

comment:11 Changed 5 years ago by git

  • Commit changed from ea7efaa89c2b6d3d0cd738bed638da5138cde932 to f0f0e4c3711bb95a8c06771c5e444c7d36ae863e

Branch pushed to git repo; I updated commit sha1. New commits:

f0f0e4cUse __main__ to run docbuilder

comment:12 Changed 5 years ago by git

  • Commit changed from f0f0e4c3711bb95a8c06771c5e444c7d36ae863e to 2fbfe8ef1bc4783ada6cf865f4ce5648b9869647

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

2fbfe8eDocbuilder cleanup

comment:13 Changed 5 years ago by jdemeyer

  • Description modified (diff)

comment:14 Changed 5 years ago by git

  • Commit changed from 2fbfe8ef1bc4783ada6cf865f4ce5648b9869647 to 93339c2730f775e99ecdedc4e6fd7323604a4a87

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

93339c2Docbuilder cleanup

comment:15 Changed 5 years ago by git

  • Commit changed from 93339c2730f775e99ecdedc4e6fd7323604a4a87 to 67b8e356c4a2eb98b11f61ba9a66171477070c4b

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

67b8e35Docbuilder cleanup

comment:16 Changed 5 years ago by git

  • Commit changed from 67b8e356c4a2eb98b11f61ba9a66171477070c4b to 7c98158ec8ee9e3ec98427ef7d0a0dcf208469d9

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

7c98158Docbuilder cleanup

comment:17 follow-up: Changed 5 years ago by mmezzarobba

I don't understand what SAGE_DOC_OUTPUT is supposed to do: I tried (without reading the code)

SAGE_DOC_OUTPUT=. sage -docbuild tutorial pdf

but the pdf file still ends up at its usual location.

comment:18 in reply to: ↑ 17 Changed 5 years ago by jdemeyer

Replying to mmezzarobba:

I don't understand what SAGE_DOC_OUTPUT is supposed to do

Such variables really need an absolute path, not relative.

comment:19 Changed 5 years ago by mmezzarobba

LGTM. Two minor comments though:

  • I wonder why you renamed the logger to doc.builder (the obvious reason to change the name would be to follow the more-or-less standard convention of “namespacing” it using the corresponding Python module name, but that's not what you do).
  • The developer guide contains a mention of SAGE_ROOT/src/doc/builder/__init__.py that probably should be updated or removed.

comment:20 Changed 5 years ago by git

  • Commit changed from 7c98158ec8ee9e3ec98427ef7d0a0dcf208469d9 to 537d9d28171e181cd8831c31ada9c9e8121a4339

Branch pushed to git repo; I updated commit sha1. New commits:

537d9d2Minor fixes

comment:21 Changed 5 years ago by mmezzarobba

  • Milestone changed from sage-6.9 to sage-7.1
  • Reviewers set to Marc Mezzarobba
  • Status changed from needs_review to positive_review

comment:22 Changed 5 years ago by jdemeyer

  • Description modified (diff)

comment:24 Changed 5 years ago by jdemeyer

That failure looks unrelated to the documentation, so I would be surprised if that buildbot error was due to this ticket. Which other tickets did you test?

comment:25 Changed 5 years ago by jhpalmieri

Unrelated to the doctest failure: should the clean target in src/doc/Makefile also do something like rm -f common/*.pyc? It would be good to clean up common/builder.pyc and other left-over files.

comment:27 Changed 5 years ago by jdemeyer

The problem seems to be that doctesting the old src/doc/output files fails because they are no longer consider "Sage library" files. Easily fixed by removing src/doc/output.

comment:28 Changed 5 years ago by git

  • Commit changed from 537d9d28171e181cd8831c31ada9c9e8121a4339 to 2b37da3289b6684f9d9738ea7e96f4379aa9f3b7

Branch pushed to git repo; I updated commit sha1. New commits:

2b37da3Remove old src/doc/ouput and .pyc files

comment:29 Changed 5 years ago by jdemeyer

Oops, I was confusing this ticket with #19963. Never mind this last commit.

comment:30 Changed 5 years ago by git

  • Commit changed from 2b37da3289b6684f9d9738ea7e96f4379aa9f3b7 to 537d9d28171e181cd8831c31ada9c9e8121a4339

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

comment:31 Changed 5 years ago by git

  • Commit changed from 537d9d28171e181cd8831c31ada9c9e8121a4339 to 2f8fe6bed09797406e99561ce852dbc7d4d94f61

Branch pushed to git repo; I updated commit sha1. New commits:

2f8fe6bUse force_lib=True for "doc" modules

comment:32 Changed 5 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:33 Changed 5 years ago by jdemeyer

  • Dependencies set to #19950

I will merge #19950 because these tickets conflict.

comment:34 Changed 5 years ago by git

  • Commit changed from 2f8fe6bed09797406e99561ce852dbc7d4d94f61 to 0455d1473afb7bcdfb9fb281af47e35020e79b06

Branch pushed to git repo; I updated commit sha1. New commits:

b5e3668allow the docbuild of a single file to build also underscore methods
5352485Merge branch 'public/19950' into 7.1.b0
0455d14Merge remote-tracking branch 'trac/public/19950' into t/19127/ticket/19127

comment:35 Changed 5 years ago by mmezzarobba

  • Status changed from needs_review to positive_review

comment:36 Changed 5 years ago by vbraun

  • Branch changed from u/jdemeyer/ticket/19127 to 0455d1473afb7bcdfb9fb281af47e35020e79b06
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:37 Changed 5 years ago by jmantysalo

  • Commit 0455d1473afb7bcdfb9fb281af47e35020e79b06 deleted

Is this the reason for #20255?

Note: See TracTickets for help on using tickets.