Closed ReHoss closed 5 months ago
Did you follow the Contribution.md
to build the docs ?
Indeed, I did not. I thus will give it another try, and the dependencies are effectively present in docs/requirements.txt
.
However, the documentation part of README.md
should redirect to the Contribution part.
closing issue with latest README update
@thibmonsel, I still have the same error when following the contribution part.
First, the docs/requirements.txt
must be updated with the following package
pip install mkdocs-with-pdf
Second, I have a different but similar error on a fresh venv
with torchdde
installed with pip install .
:
ImportError: Importing 'torchdde.TorchLinearInterpolator' failed, possible causes are:
- an exception happened while importing
- an element in the path does not exist
ERROR - Error reading page 'interpolators/linear-interpolator.md':
ERROR - Could not collect 'torchdde.TorchLinearInterpolator'
Aborted with a BuildError!
I think, I know what is going on I make my latest changes in the branch neurips_submission
and not master
. Ill remove the pip install mkdocs-with-pdf
too !
If you pull the new master it should be ok
pulling does not solve the issue.
Could you give me the full error log
INFO - Building documentation...
INFO - Cleaning site directory
[31mERROR - [0mmkdocstrings.extension: Importing 'torchdde.TorchLinearInterpolator' failed, possible causes are:
- an exception happened while importing
- an element in the path does not exist
Traceback (most recent call last):
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/venv/venv_torchdde/lib/python3.10/site-packages/pytkdocs/loader.py", line 264, in get_object_tree
parent_module = importlib.import_module(parent_module_path)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/torchdde/__init__.py", line 1, in <module>
from .global_interpolation import TorchLinearInterpolator as TorchLinearInterpolator
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/torchdde/global_interpolation/__init__.py", line 1, in <module>
from .linear_interpolation import TorchLinearInterpolator as TorchLinearInterpolator
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/torchdde/global_interpolation/linear_interpolation.py", line 4, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/venv/venv_torchdde/lib/python3.10/site-packages/pytkdocs/cli.py", line 205, in main
output = json.dumps(process_json(line))
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/venv/venv_torchdde/lib/python3.10/site-packages/pytkdocs/cli.py", line 114, in process_json
return process_config(json.loads(json_input))
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/venv/venv_torchdde/lib/python3.10/site-packages/pytkdocs_tweaks/__init__.py", line 220, in process_config
datas = _process_config(config)
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/venv/venv_torchdde/lib/python3.10/site-packages/pytkdocs/cli.py", line 91, in process_config
obj = loader.get_object_documentation(path, members)
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/venv/venv_torchdde/lib/python3.10/site-packages/pytkdocs/loader.py", line 355, in get_object_documentation
leaf = get_object_tree(dotted_path, self.new_path_syntax)
File "/home/hosseinkhan/Documents/work/phd/git_repositories/torchdde/venv/venv_torchdde/lib/python3.10/site-packages/pytkdocs/loader.py", line 267, in get_object_tree
raise ImportError(
ImportError: Importing 'torchdde.TorchLinearInterpolator' failed, possible causes are:
- an exception happened while importing
- an element in the path does not exist
[31mERROR - [0mError reading page 'interpolators/linear-interpolator.md':
[31mERROR - [0mCould not collect 'torchdde.TorchLinearInterpolator'
Aborted with a BuildError!
EDIT: it works now after installing torch
, please add it in docs/requirements.txt
there is already torch
in the pyproject.toml
. Closing this issue.
None of the packages in install_requires
are installed when running pip install .
, except torchdde/*
since it is specified by the hatch include
directive.
You should replace the install_requires
keyword with dependencies
in the pyproject.toml
file as recommended in the official documentation https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency such that the end user gets a working installation.
pip --version
pip 22.0.2
fixed it, by changing the keywork, thanks !
Check out latest commit3f44a57
Hi,
Several problems I found regarding the documentation:
mkdocs
is not in the requirements/project dependenciesthe build need a bunch of extra plugins that should be specified to the user
when running
mkdocs build
an error occurs with the following output: