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

setup: Upgrade pinned Sphinx version to v5.1.1 (Issue #492) #509

Merged
merged 3 commits into from
Aug 2, 2022

Conversation

tomtseng
Copy link
Collaborator

@tomtseng tomtseng commented Aug 1, 2022

Changes

We pinned Sphinx to v5.0.2 because v5.1.0 broke for us (issue #492). v5.1.1 fixes the problem, so we can upgrade Sphinx now.

Testing

Running make html in docs/ with Sphinx v5.1.1 doesn't crash:

Running Sphinx v5.1.1
loading pickled environment... done
[autosummary] generating autosummary for: _api/imitation.algorithms.adversarial.airl.rst, _api/imitation.algorithms.adversarial.common.rst, _api/imitation.algorithms.adversarial.gail.rst, _api/imitation.algorithms.adversarial.rst, _api/imitation.algorithms.base.rst, _ap
i/imitation.algorithms.bc.rst, _api/imitation.algorithms.dagger.rst, _api/imitation.algorithms.density.rst, _api/imitation.algorithms.mce_irl.rst, _api/imitation.algorithms.preference_comparisons.rst, ..., development/contributing/code-of-conduct.rst, development/contri
buting/index.rst, development/contributing/ways-to-contribute.rst, development/license.rst, development/release-notes.rst, getting-started/first-steps.rst, getting-started/installation.rst, getting-started/variable-horizon.rst, getting-started/what-is-imitation.rst, ind
ex.rst
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 82 source files that are out of date
updating environment: [config changed ('version')] 82 added, 0 changed, 0 removed
reading sources... [100%] getting-started/what-is-imitation .. index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex py-modindex done
highlighting module code... [100%] typing
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in _build/html.

I didn't see anything obviously broken when clicking through some pages in the docs generated from this PR.

@Rocamonde
Copy link
Member

Rocamonde commented Aug 1, 2022

I am happy to upgrade to v5.1.1. if the checks are passing, but I suggest that instead of removing the version requirement, we update it. I find that not fixing version numbers in dependencies (at least the major and minor number) is a bad practice and leads to issues like these(#492 and #507) happening. We can allow for patches to automatically install, and then regularly review dependency versions and upgrade them (there are extensions for this -- see Dependabot)

@tomtseng tomtseng changed the title setup: Unpin Sphinx version (Issue #492) setup: Upgrade pinned Sphinx version to v5.1.1 (Issue #492) Aug 1, 2022
@tomtseng
Copy link
Collaborator Author

tomtseng commented Aug 1, 2022

Makes sense to me. I've updated the PR to pin to sphinx~=5.1.1.

One concern with pinning dependencies too strictly is that someone who uses imitation along with other libraries may get dependency conflicts, but I don't expect issues with pinning sphinx as it's only used for documentation generation.

@Rocamonde
Copy link
Member

Rocamonde commented Aug 1, 2022 via email

@AdamGleave
Copy link
Member

There's definitely a trade-off here in terms of greater reliability vs flexibility on versions. A compromise would be to pin packages that have caused us pain in the past. I think this is the first time Sphinx has broken for us, but we've had issues with flake8 and isort before.

Copy link
Member

@AdamGleave AdamGleave left a comment

Choose a reason for hiding this comment

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

LGTM. (Lint failure unrelated, docs build OK on RDT.)

@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #509 (94b1f0f) into master (4deb828) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #509      +/-   ##
==========================================
+ Coverage   96.82%   96.85%   +0.02%     
==========================================
  Files          82       82              
  Lines        7126     7126              
==========================================
+ Hits         6900     6902       +2     
+ Misses        226      224       -2     
Impacted Files Coverage Δ
src/imitation/algorithms/dagger.py 100.00% <0.00%> (+0.93%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us.

@AdamGleave AdamGleave merged commit 498f7b8 into master Aug 2, 2022
@AdamGleave AdamGleave deleted the tomtseng/sphinx-upgrade branch August 2, 2022 03:38
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