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

Docs failing #2342

Closed
PekkaSavolainen opened this issue Oct 4, 2023 · 5 comments
Closed

Docs failing #2342

PekkaSavolainen opened this issue Oct 4, 2023 · 5 comments
Assignees
Labels
bug Something isn't working Docs

Comments

@PekkaSavolainen
Copy link
Member

Building the docs locally and on readthedocs.org have been failing for a week now in 0.8-dev branch. Most likely they will fail in master branch the next time they are built.

@PekkaSavolainen PekkaSavolainen added bug Something isn't working Docs labels Oct 4, 2023
@PekkaSavolainen PekkaSavolainen self-assigned this Oct 4, 2023
@PekkaSavolainen PekkaSavolainen mentioned this issue Oct 4, 2023
5 tasks
@PekkaSavolainen
Copy link
Member Author

We should also duplicate the docs/requirements.txt from spinetoolbox to spinedb-api side.

PekkaSavolainen added a commit to spine-tools/Spine-Database-API that referenced this issue Oct 5, 2023
- Set language = "en" to prevent a warning
- Add builder: html just in case

Re spine-tools/Spine-Toolbox#2342
PekkaSavolainen added a commit to spine-tools/Spine-Database-API that referenced this issue Oct 5, 2023
@PekkaSavolainen
Copy link
Member Author

PekkaSavolainen commented Oct 5, 2023

Now docs/requirements.txt on both toolbox and spinedb-api branches 0.8-dev and master are compatible with Spine Toolbox requirements. Bottom line is that the newest Sphinx version we can use is 5.1.1 until we support a more recent dagster version.
The sphinx.ext.viewcode extension is enabled on toolbox side but disabled on spinedb-api because of this error when running build_doc (or make html) script.

Exception occurred:
  File "C:\Users\ttepsa\.conda\envs\sphinx4\lib\site-packages\sphinx\ext\viewcode.py", line 269, in collect_pages
    lines[start])
IndexError: list index out of range
The full traceback has been saved in C:\Users\ttepsa\AppData\Local\Temp\1\sphinx-err-zn5i7mox.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

@PekkaSavolainen
Copy link
Member Author

PekkaSavolainen commented Oct 6, 2023

Yesterday, It looks like I left sphinx.ext.viewcode enabled on spinedb-api side when I was supposed to disable it (in commit spine-tools/Spine-Database-API@eea4e31). I thought enabling it was going to crash the CI on readthedocs.org but to my surprise it actually passed. After that commit there's been a few updates to that part of the code, so I tried running build_docs locally in commit spine-tools/Spine-Database-API@9e4f5eb. It gives me this error

[AutoAPI] Ignoring C:\data\GIT\SPINEDBAPI\spinedb_api\alembic\versions/9da58d2def22_create_entity_group_table.py
[AutoAPI] Ignoring C:\data\GIT\SPINEDBAPI\spinedb_api\alembic\versions/bba1e2ef5153_move_to_entity_based_design.py
[AutoAPI] Ignoring C:\data\GIT\SPINEDBAPI\spinedb_api\alembic\versions/bf255c179bce_get_rid_of_unused_fields_in_parameter_.py
[AutoAPI] Ignoring C:\data\GIT\SPINEDBAPI\spinedb_api\alembic\versions/ce9faa82ed59_create_entity_alternative_table.py
[AutoAPI] Ignoring C:\data\GIT\SPINEDBAPI\spinedb_api\alembic\versions/defbda3bf2b5_add_tool_feature_tables.py
[AutoAPI] Ignoring C:\data\GIT\SPINEDBAPI\spinedb_api\alembic\versions/fbb540efbf15_add_support_for_mysql.py
[AutoAPI] Ignoring C:\data\GIT\SPINEDBAPI\spinedb_api\alembic\versions/fd542cebf699_drop_on_update_clauses_from_object_and_.py
[AutoAPI] Reading files... [100%] C:\data\GIT\SPINEDBAPI\spinedb_api\spine_io\importers\__init__.pyconnector.py
[AutoAPI] Mapping Data... [  1%] C:\data\GIT\SPINEDBAPI\spinedb_api\compatibility.py
Extension error:
Handler <function _process_docstring at 0x000001E55A74E830> for event 'autodoc-process-docstring' threw an exception (exception: type object 'DatabaseMapping' has no attribute 'item_types')

But it looks like this commit passes on readthedocs.org. When I comment out functions setup(), _skip_member(), and _process_docstring() in /docs/source/conf.py, the local build_doc process passes.

So, the question is @manuelma, did you notice that the refactoring done in DatabaseMapping and it's inherited members probably fixed the build_doc build process with viewcode enabled and there seems to be no need for those 3 added functions in conf.py? Or are you still working on this?

EDIT
Looking at the discussion on gitter/element, it looks like this part is still under development, so I'll leave you to it.

@manuelma
Copy link
Collaborator

manuelma commented Oct 6, 2023

Sorry @PekkaSavolainen I forgot to tell you. I removed the "inherited-members" option and restablished viewcode. I don't need "inherited-members" anymore. Yes, it's cool, I'll take care of it. Thank you!

@PekkaSavolainen
Copy link
Member Author

Building the docs now works on both spinetoolbox and spinedb-api so I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Docs
Projects
None yet
Development

No branches or pull requests

2 participants