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

[MAINTENANCE] Lint Docs #8936

Merged
merged 31 commits into from Mar 29, 2024
Merged

[MAINTENANCE] Lint Docs #8936

merged 31 commits into from Mar 29, 2024

Conversation

Kilo59
Copy link
Member

@Kilo59 Kilo59 commented Nov 6, 2023

Enable linting for the docs directory code.
Mostly involved swapping os.path and glob usage with pathlib.Path methods.

Also enabled type-checking for some docs related modules.

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses black + ruff)
  • Appropriate tests and docs have been updated

For more information about contributing, see Contribute.

After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!

@Kilo59 Kilo59 self-assigned this Nov 6, 2023
Copy link

netlify bot commented Nov 6, 2023

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit 124d991
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/66072ac999c702000883c032

@github-actions github-actions bot added the core label Nov 6, 2023
@ghost
Copy link

ghost commented Nov 6, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@Kilo59
Copy link
Member Author

Kilo59 commented Nov 7, 2023

@anthonyburdi if I wanted to manually test these changes, what we be the best way to do that?

Or would you expect the CI to fail if something was off?

@Kilo59 Kilo59 marked this pull request as ready for review November 7, 2023 00:30
docs/ruff.toml Outdated
Copy link
Member Author

Choose a reason for hiding this comment

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

If we want different linting rules for the docs code we can customize it in this file

Comment on lines -145 to -157
def _get_os_path(self, path: str) -> str:
"""Gets an os-specific path from a path found in a markdown file"""
return path.replace("/", os.path.sep)
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't need this method at all if using pathlib

Copy link
Member

@anthonyburdi anthonyburdi left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for making these updates.

Copy link
Contributor

@Shinnnyshinshin Shinnnyshinshin left a comment

Choose a reason for hiding this comment

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

🙇🏼

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 82.55%. Comparing base (453af44) to head (124d991).

Files Patch % Lines
...eat_expectations/compatibility/docstring_parser.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8936   +/-   ##
========================================
  Coverage    82.55%   82.55%           
========================================
  Files          511      511           
  Lines        46381    46381           
========================================
  Hits         38288    38288           
  Misses        8093     8093           
Flag Coverage Δ
3.10 64.60% <0.00%> (ø)
3.10 aws_deps ?
3.10 big ?
3.10 databricks ?
3.10 filesystem ?
3.10 mssql ?
3.10 mysql ?
3.10 postgresql ?
3.11 64.60% <0.00%> (ø)
3.11 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds 53.98% <0.00%> (ø)
3.11 aws_deps 48.99% <0.00%> (ø)
3.11 big 64.00% <0.00%> (ø)
3.11 databricks 48.21% <0.00%> (ø)
3.11 filesystem 63.78% <0.00%> (ø)
3.11 mssql 47.43% <0.00%> (ø)
3.11 mysql 47.48% <0.00%> (ø)
3.11 postgresql 54.27% <0.00%> (ø)
3.11 snowflake 48.74% <0.00%> (-0.01%) ⬇️
3.11 spark 60.66% <0.00%> (ø)
3.11 trino 53.90% <0.00%> (ø)
3.8 64.60% <0.00%> (-0.02%) ⬇️
3.8 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds 53.98% <0.00%> (ø)
3.8 aws_deps 49.00% <0.00%> (ø)
3.8 big 64.00% <0.00%> (ø)
3.8 databricks 48.23% <0.00%> (ø)
3.8 filesystem 63.79% <0.00%> (-0.01%) ⬇️
3.8 mssql 47.41% <0.00%> (ø)
3.8 mysql 47.47% <0.00%> (ø)
3.8 postgresql 54.26% <0.00%> (ø)
3.8 snowflake 48.76% <0.00%> (ø)
3.8 spark 60.62% <0.00%> (ø)
3.8 trino 53.89% <0.00%> (ø)
3.9 64.61% <0.00%> (ø)
3.9 aws_deps ?
3.9 big ?
3.9 databricks ?
3.9 mssql ?
3.9 mysql ?
3.9 postgresql ?
3.9 spark ?
3.9 trino ?
cloud 0.00% <0.00%> (ø)
docs-basic 54.50% <0.00%> (ø)
docs-creds-needed 55.07% <0.00%> (ø)
docs-spark 54.60% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Kilo59 Kilo59 added this pull request to the merge queue Mar 29, 2024
Merged via the queue into develop with commit 200c968 Mar 29, 2024
187 of 218 checks passed
@Kilo59 Kilo59 deleted the m/_/docs-lint branch March 29, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants