When I followed the contributor guildline,"make pre-commit" ourred an error"rstcheck Failed"
env:python 3.9 linux ubuntun rstcheck.................................................................Failed
- hook id: rstcheck
- exit code: 1
WARNING:rstcheck_core.checker:An AttributeError error occured. This is most probably due to a code block directive (code/code-block/sourcecode) without a specified language. This may result in a false negative for source: 'docs/source/contributing.rst'. The reason can also be another directive. For more information see the FAQ (https://rstcheck-core.rtfd.io/en/latest/faq) or the corresponding github issue: https://github.com/rstcheck/rstcheck-core/issues/3.
WARNING:rstcheck_core.checker:An AttributeError error occured. This is most probably due to a code block directive (code/code-block/sourcecode) without a specified language. This may result in a false negative for source: 'docs/source/changelog.rst'. The reason can also be another directive. For more information see the FAQ (https://rstcheck-core.rtfd.io/en/latest/faq) or the corresponding github issue: https://github.com/rstcheck/rstcheck-core/issues/3.
WARNING:rstcheck_core.checker:An AttributeError error occured. This is most probably due to a code block directive (code/code-block/sourcecode) without a specified language. This may result in a false negative for source: 'docs/source/index.rst'. The reason can also be another directive. For more information see the FAQ (https://rstcheck-core.rtfd.io/en/latest/faq) or the corresponding github issue: https://github.com/rstcheck/rstcheck-core/issues/3.
docs/source/api.rst:4: (INFO/1) No directive entry for "automodule" in module "docutils.parsers.rst.languages.en".
docs/source/api.rst:4: (ERROR/3) Unknown directive type "automodule".
docs/source/api.rst:5: (INFO/1) No directive entry for "automodule" in module "docutils.parsers.rst.languages.en".
docs/source/api.rst:5: (ERROR/3) Unknown directive type "automodule".
docs/source/modules.rst:4: (INFO/1) No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en".
docs/source/modules.rst:4: (ERROR/3) Unknown directive type "autosummary".
Error! Issues detected.
as usual ,I didn't change anything.
@peter-ni-noob Please ensure you've pip install -r insert_filename_here.txt everything in the python-holidays\requirements folder.
I'm still determining how to proceed if that doesn't work since I've only coded with WSL2 on Windows, but @arkid15r likely has the answer here.
Thank you for your help,I apply "make setup" to install this project,and I saw pip install --upgrade pip pip install --requirement requirements/dev.txt pip install --requirement requirements/docs.txt pip install --requirement requirements/runtime.txt pip install --requirement requirements/tests.txt in MakeFile,so I have installed everything in the python-holidays\requirements. I think the cause of the error is in docs/source/api.rst:4: (ERROR/3) Unknown directive type "automodule", but I dont really know rstcheck/(ㄒoㄒ)/~~.
I was able to reproduce this with python3.9 I guess the best work around now would be commenting related pre-commit configuration block out.
You might also need to run make package after make setup if you see importlib_metadata.PackageNotFoundError: No package metadata was found for holidays error.
Thanks for reporting this!
I just commented related pre-commit configuration block out,and all passed. the this issue will be closed.
Yeah, that's a workaround for now. I'd prefer to not close the issue yet if you don't mind. At least until we look deeper into the problem.