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
[BUG] Addressing doc build issue due to failed soft dependency imports #2170
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fkiraly
added
documentation
Documentation & tutorials
maintenance
Continuous integration, unit testing & package distribution
labels
Mar 6, 2022
aiwalter
approved these changes
Mar 7, 2022
This was referenced Mar 7, 2022
fkiraly
added a commit
that referenced
this pull request
Mar 9, 2022
This updates the docs on soft dependency handling with the workflow implied by the fix in #2170. The main change is explaining that the check needs to be in two places, at the top of the module (warning), and in the estimator init (error). Other, minor changes: * restructuring of the "soft dependency" section, hopefully better to follow now * removal of duplicate "deprecation" section, newer version is on the "deprecation" page
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Documentation & tutorials
maintenance
Continuous integration, unit testing & package distribution
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an attempt to address the doc build fails that @aiwalter had reported, i.e., empty/missing pages for estimators with soft dependencies. This was also reported earlier as #2013.
The way this is done is via a minor change to
_check_soft_dependencies
, which gets an additional argumentseverity
that controls whether a warning is raised, or an exception.The extended utility is then used as follows:
That way, users as well as the doc build process can import classes, read docstrings, and will get an error only when the class is constructed. The informative error message is still raised at the earliest possible point in time.
This PR addresses the issue for (hopefully) all instances of
_check_soft_dependencies
preventing doc build previously.It also contains changes to make the error message more informative.
Changes still need to be made to dependent docs that outline how implementers/developer should deal with soft dependencies: the developer documentation, and the extension templates.
This PR also fixes the following bug:
fit
overwrites all models in all instances, [BUG] all BATS and TBATS objects share models, have side effects on each other #2174