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: Fix the overindentation of lists #5915

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Mar 6, 2023

There were a considerable number of bulleted and enumerated lists whose line markers were indented. This would cause them to be rendered as an indented code block. Instead, the lists should be indented to exactly the same level as the preceding text paragraph.

@sphuber sphuber force-pushed the fix/docs-enumeration-indentation branch from 9ee3e26 to 6379fd3 Compare March 6, 2023 11:16
There were a considerable number of bulleted and enumerated lists whose
line markers were indented. This would cause them to be rendered as an
indented code block. Instead, the lists should be indented to exactly
the same level as the preceding text paragraph.
@sphuber sphuber force-pushed the fix/docs-enumeration-indentation branch 2 times, most recently from fd8aad5 to c315064 Compare March 6, 2023 12:40
@sphuber sphuber requested a review from unkcpz March 6, 2023 12:55
@sphuber sphuber force-pushed the fix/docs-enumeration-indentation branch from c315064 to 2f063c7 Compare March 6, 2023 14:53
Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sphuber, just one minor request. All changes looks good.
I am wondering why we don't use any pre-commit hook for reStructuredText? I find there are some such as https://github.com/peterjc/flake8-rst-docstrings, can we adopt it in aiida-core?

Comment on lines 104 to 112
* 'db_name': The name of the external database.
* 'db_uri': The base URI of the external database.
* 'uri': The exact URI of where the data can be retrieved. Ideally this is a persistent URI.
* 'id': The external ID with which the data is identified in the external database.
* 'version': The version of the data, if any.
* 'extras': Optional dictionary with other fields for source description.
* 'source_md5': MD5 checksum of the data.
* 'description': Human-readable free form description of the data's source.
* 'license': A string with the type of license that applies to the data, if any.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are already here. I don't think single quotes are needed here as the name of the keys.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want me to change them to backticks to make them inline code, or just remove the quotes entirely? Think backticks would be good, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no preference, to be honest, I think just removing the quotes is clear enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had another look and since they are keys in the database, I think double backticks are more appropriate.

@sphuber
Copy link
Contributor Author

sphuber commented Mar 6, 2023

Thanks @sphuber, just one minor request. All changes looks good. I am wondering why we don't use any pre-commit hook for reStructuredText? I find there are some such as https://github.com/peterjc/flake8-rst-docstrings, can we adopt it in aiida-core?

This would be only for the docstrings of the code though, wouldn't it? It wouldn't lint the docs. Anyway, I would be in favor of this, but maybe just use pydocstyle in that case. We already use it for aiida-quantumespresso and other plugin packages. Haven't added it to aiida-core yet since it would be a lot of work to correct all the docstrings. But I guess we could of course start with a blacklist of all files that need to be fixed and we can progressively fix them.

@unkcpz
Copy link
Member

unkcpz commented Mar 6, 2023

This would be only for the docstrings of the code though, wouldn't it? It wouldn't lint the docs. Anyway, I would be in favor of this, but maybe just use pydocstyle in that case.

I see, thanks. But not related to this PR anyway.

@sphuber sphuber force-pushed the fix/docs-enumeration-indentation branch from 2f063c7 to f0ed217 Compare March 6, 2023 21:24
@sphuber sphuber merged commit 3fdbe9c into aiidateam:main Mar 6, 2023
@sphuber sphuber deleted the fix/docs-enumeration-indentation branch March 6, 2023 21:35
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

Successfully merging this pull request may close these issues.

2 participants