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

When I followed the contributor guildline,"make pre-commit" ourred an error"rstcheck Failed" #1604

Open
peter-ni-noob opened this issue Dec 22, 2023 · 6 comments

Comments

@peter-ni-noob
Copy link
Contributor

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: rstcheck/rstcheck-core#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: rstcheck/rstcheck-core#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: rstcheck/rstcheck-core#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.

@peter-ni-noob
Copy link
Contributor Author

as usual ,I didn't change anything.

@PPsyrius
Copy link
Collaborator

@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.

@peter-ni-noob
Copy link
Contributor Author

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ㄒ)/~~.

@arkid15r
Copy link
Collaborator

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!

@peter-ni-noob
Copy link
Contributor Author

I just commented related pre-commit configuration block out,and all passed.
the this issue will be closed.

@arkid15r
Copy link
Collaborator

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.

@arkid15r arkid15r reopened this Dec 26, 2023
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

No branches or pull requests

3 participants