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

Add numpydoc validation hook and fix f-string syntax #546

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

Ktyby21
Copy link
Contributor

@Ktyby21 Ktyby21 commented Jan 8, 2025

Contributor checklist


Description

This PR introduces the numpydoc-validation pre-commit hook to enforce consistent docstring styles in the project. The hook has been configured to validate all Python files, excluding the tests directory.

Additionally, this PR includes fixes for:
1. f-string syntax issues in send_dbs_to_scribe.py to ensure proper string formatting.
2. Adjustments to make the code compliant with the new validation requirements.

Changes
• Added numpydoc-validation to .pre-commit-config.yaml.
• Fixed unmatched brackets in f-strings in send_dbs_to_scribe.py.

Testing
• Ran pre-commit locally to ensure the hook works and validates docstrings correctly.
• Verified that all f-string-related issues have been resolved.

Related issue

  • #ISSUE_NUMBER

Copy link

github-actions bot commented Jan 8, 2025

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Data rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

  • The linting and formatting workflow within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis andrewtavis self-requested a review January 8, 2025 21:02
@@ -81,14 +81,14 @@
)
language_db_dict["translation"]["full_path_to_scribe_ios_db"] = (
PATH_TO_SCRIBE_DATA_ROOT.parent
/ f"{language_db_dict["translation"]['scribe_ios_db_path']}"
/ f"{language_db_dict['translation']['scribe_ios_db_path']}"
Copy link
Member

Choose a reason for hiding this comment

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

Great catch on these, @Ktyby21! Thanks for this :)

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

Really great to have this on the project, @Ktyby21! Looking forward to our docstrings improving because of it 😊

@andrewtavis andrewtavis merged commit 015b423 into scribe-org:main Jan 8, 2025
6 checks passed
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