Skip to content

Fix documentation build failing on Python 3#478

Merged
kitchoi merged 1 commit into
masterfrom
fix-doc-conf
Dec 8, 2020
Merged

Fix documentation build failing on Python 3#478
kitchoi merged 1 commit into
masterfrom
fix-doc-conf

Conversation

@kitchoi

@kitchoi kitchoi commented Dec 8, 2020

Copy link
Copy Markdown
Contributor

When I tried to build the documentation with the following commands:

# In an environment with enable source installed
pip install sphinx
cd docs
make html

I get the following error:

Traceback (most recent call last):
  File "/Users/kchoi/.edm/envs/enable-test-3.6-null-pillow/lib/python3.6/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/Users/kchoi/.edm/envs/enable-test-3.6-null-pillow/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
    exec(code, _globals)
  File "/Users/kchoi/Work/ETS/enable/docs/source/conf.py", line 42, in <module>
    execfile(os.path.join('..', '..', 'enable', '_version.py'), d)
NameError: name 'execfile' is not defined

execfile is a Python 2 built-in. This PR fixes the config file so that the config file works on Python 3. We probably want to add a docs command in ci/edmtool.py like in the other ETS projects to streamline this step, and possibly run this command as part of CI, but that can come in separate PRs/issues.

@codecov-io

codecov-io commented Dec 8, 2020

Copy link
Copy Markdown

Codecov Report

Merging #478 (03bcd69) into master (2322ff2) will increase coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #478      +/-   ##
==========================================
+ Coverage   30.26%   30.45%   +0.19%     
==========================================
  Files         206      206              
  Lines       18143    17852     -291     
  Branches     2461     2461              
==========================================
- Hits         5491     5437      -54     
+ Misses      12309    12072     -237     
  Partials      343      343              
Impacted Files Coverage Δ
enable/tools/move_tool.py 82.75% <0.00%> (-1.12%) ⬇️
enable/coordinate_box.py 31.15% <0.00%> (-1.04%) ⬇️
enable/component.py 54.64% <0.00%> (-1.03%) ⬇️
enable/abstract_window.py 53.43% <0.00%> (-0.84%) ⬇️
enable/interactor.py 84.00% <0.00%> (-0.62%) ⬇️
enable/component_editor.py 82.97% <0.00%> (-0.36%) ⬇️
enable/tools/drag_tool.py 77.17% <0.00%> (-0.25%) ⬇️
kiva/gl.py 0.00% <0.00%> (ø)
kiva/cairo.py 0.00% <0.00%> (ø)
enable/viewable.py 0.00% <0.00%> (ø)
... and 48 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2322ff2...03bcd69. Read the comment docs.

@jwiggins jwiggins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kitchoi kitchoi merged commit 871d3d9 into master Dec 8, 2020
@jwiggins jwiggins deleted the fix-doc-conf branch December 8, 2020 18:36
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.

4 participants