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

Fix packaging and documentation #97

Merged
merged 3 commits into from Jul 20, 2021
Merged

Conversation

astrojuanlu
Copy link
Contributor

Fix #96

@astrojuanlu
Copy link
Contributor Author

Also, you can enable the PR builder on Read the Docs to see how this would look like: https://blog.readthedocs.com/pull-request-builder-general-availability/

@takuseno
Copy link
Owner

@astrojuanlu Thanks! It's enabled now!

@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #97 (c9b18bb) into master (e278526) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #97   +/-   ##
=======================================
  Coverage   92.97%   92.97%           
=======================================
  Files          99       99           
  Lines        7383     7383           
=======================================
  Hits         6864     6864           
  Misses        519      519           

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 e278526...c9b18bb. Read the comment docs.

@astrojuanlu astrojuanlu reopened this Jul 20, 2021
@astrojuanlu
Copy link
Contributor Author

The Read the Docs build is done now! Still fails importing, but as I said it looks like a problem with the aurosummary templates

@astrojuanlu
Copy link
Contributor Author

As I explained in sphinx-doc/sphinx#7989, the WARNING: [autosummary] failed to import 'd3rlpy.algos.AWAC': no module named d3rlpy.algos.AWAC doesn't actually mean that the d3rlpy.algos.AWAC module is being imported. Rather, it is masking a deeper error:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/d3rlpy/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/importer.py", line 70, in import_module
    return importlib.import_module(modname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/d3rlpy/envs/latest/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/src/docs/../d3rlpy/__init__.py", line 6, in <module>
    from . import (
  File "/src/docs/../d3rlpy/algos/__init__.py", line 3, in <module>
    from .awac import AWAC
  File "/src/docs/../d3rlpy/algos/awac.py", line 3, in <module>
    from ..argument_utility import (
  File "/src/docs/../d3rlpy/argument_utility.py", line 6, in <module>
    from .models.encoders import EncoderFactory, create_encoder_factory
  File "/src/docs/../d3rlpy/models/__init__.py", line 1, in <module>
    from . import encoders, optimizers, q_functions
  File "/src/docs/../d3rlpy/models/encoders.py", line 7, in <module>
    from ..torch_utility import Swish
  File "/src/docs/../d3rlpy/torch_utility.py", line 10, in <module>
    from .dataset import TransitionMiniBatch
ModuleNotFoundError: No module named 'd3rlpy.dataset'

However, launching a Python interpreter doesn't have this problem. I think I got how to fix it, will push one more commit.

This requires installing the code to build the docs.
@astrojuanlu
Copy link
Contributor Author

@takuseno problem fixed, have a look at the build logs 👍🏽

@astrojuanlu
Copy link
Contributor Author

@astrojuanlu astrojuanlu changed the title Fix packaging Fix packaging and documentation Jul 20, 2021
Copy link
Owner

@takuseno takuseno left a comment

Choose a reason for hiding this comment

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

Thanks for the change! You save my days!!! I've left one minor comment. I'd like you to take a look at it. Thanks!

setup.py Outdated Show resolved Hide resolved
Copy link
Owner

@takuseno takuseno left a comment

Choose a reason for hiding this comment

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

Thanks for the change! I'll merge this when the test has passed.

@takuseno takuseno merged commit a6eeb92 into takuseno:master Jul 20, 2021
@astrojuanlu astrojuanlu deleted the fix-packaging branch July 20, 2021 23:24
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.

Installation problems on virtual environments with source releases
2 participants