pdoc3 / pdoc

:snake: :arrow_right: :scroll: Auto-generate API documentation for Python projects
https://pdoc3.github.io/pdoc/
GNU Affero General Public License v3.0
1.12k stars 145 forks source link

pdoc3 doesn't use the latest version of the python file #381

Open danleonte opened 2 years ago

danleonte commented 2 years ago

I used pdoc3 do document my python package https://github.com/danleonte/Ambit_Stochastics. In particular, i used to run

```pdoc3 --html ambit_stochastics````

or

```pdoc3 --html ambit_stochastics --force````

When I try to do it now, pdoc doesn't use the python files in the folder, but some older version of that. For example, the code in https://danleonte.github.io/Ambit_Stochastics/trawl.html, which can be viewed via the 'expand code button', is different from the one in the github repo. Further, the latex code doesn't render anymore. I uninstalled and reinstalled pdoc3 and it didn t help.

More interestingly, even after i removed one of the scripts, pdoc3 still generated documentation for that script.

kernc commented 2 years ago

We defer to importlib.import_module() to import referenced modules: https://github.com/pdoc3/pdoc/blob/4aa70de2221a34a3003a7e5f52a9b91965f0e359/pdoc/__init__.py#L202-L226 Maybe it prefers the pip-installed version of ambit_stochastics, if not the one in the current directory?