Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

update formatting throughout codebase #475

Conversation

stevebachmeier
Copy link
Contributor

Update formatting

Description

Changes and notes

We previously settled on sticking with numpy style documentation.

This PR makes small tweaks for consistency. Most notably, it implements
a new type hints extension so that we do not need to duplicate
type hints in the signature as well as the docstring.

Testing

@@ -358,33 +357,39 @@ class Builder:

Attributes
----------
logging: LoggingInterface
configuration : ``LayeredConfigTree``
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't get this to work so I just kept it nit-picked. Quotes didn't work but for some reason double back-ticks did 🤷‍♂️

@@ -50,6 +50,7 @@
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx_autodoc_typehints",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the thing that allows us to not type hint parameters and returns in the docstring even though we already have them typed in the signature.

@stevebachmeier stevebachmeier marked this pull request as ready for review August 27, 2024 00:36
src/vivarium/component.py Show resolved Hide resolved
@stevebachmeier stevebachmeier force-pushed the feature/sbachmei/MIC-5243-numpy-style-consistency branch from 199bacd to 98a55b0 Compare August 27, 2024 23:05
@stevebachmeier stevebachmeier merged commit 8c5f156 into epic/results-documentation Aug 27, 2024
6 checks passed
@stevebachmeier stevebachmeier deleted the feature/sbachmei/MIC-5243-numpy-style-consistency branch August 27, 2024 23:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants