Skip to content

Update style guide for Ruff linting and formatting - #1011

Merged
samanrassam merged 4 commits into
devfrom
HMS-2494
Nov 25, 2026
Merged

samanrassam merged 4 commits into
devfrom
HMS-2494

Conversation

@samanrassam

@samanrassam samanrassam commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Template

Before Marking as Ready for Review

  • Add relevant information to the sections below (Summary etc)
  • Rebase or merge the latest dev (or other targeted branch)
  • Update documentation if needed
  • Add an entry to the SPRINTLOG.md if needed
  • Choose an appropriate label. See here for information on the labelling options
  • The code follows the style guidelines
  • Perform a self-review: read the diff as if reviewing someone else's code
  • I have commented the code, particularly in hard-to-understand areas
  • Verify that all checks and tests have passed

If the target branch is master:

Summary

The style guide was copied from dds_web and still said that this repository doesn't use pylint, that we format with Black, and that the line length is 88 (with 120 as the goal). Since #927 we use Ruff for both linting and formatting. The pylint section now says that, points to the configuration in pyproject.toml, and describes what the Ruff workflow runs and how to fix issues locally. The line length section now says 100, which is what ruff format uses, and that long lines are not linted since E501 is ignored.

Related Issue/Ticket

HMS-2494

Testing

Checked each statement against pyproject.toml and .github/workflows/lint-ruff.yml, and with ruff rule that the ignored PLR0914 and PLR0917 are preview rules in ruff 0.15.2, which is why the text says "stable pylint rules". ruff check . and ruff format --check . with ruff 0.15.2 pass on the branch, and prettier --check . passes. The file isn't part of the Sphinx docs, so there was nothing to build.

Reviewer Notes

requirements-dev.txt installs ruff without a version while the workflow pins 0.15.2, so the guide says to use the version from the workflow.

dds_web has the same file with the same outdated text, but dds_web still uses Black (at 100), so that is left for a separate ticket.


Once all boxes are checked, mark the PR as Ready for Review and tag at least one team member as the initial reviewer.

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.86%. Comparing base (2d98ae4) to head (172cfcc).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1011   +/-   ##
=======================================
  Coverage   59.86%   59.86%           
=======================================
  Files          33       33           
  Lines        3179     3179           
=======================================
  Hits         1903     1903           
  Misses       1276     1276           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samanrassam samanrassam added the type: docs Improvements or additions to documentation label Nov 17, 2026
@samanrassam
samanrassam marked this pull request as ready for review November 17, 2026 16:21
@samanrassam
samanrassam requested a review from a team as a code owner November 17, 2026 16:21

@jimdale jimdale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This all looks good - I don't have any improvements to suggest

Comment thread docs/procedures/style_guidelines.md Resolved
@samanrassam
samanrassam requested a review from valyo November 24, 2026 17:07
@samanrassam
samanrassam merged commit e19ec6a into dev Nov 25, 2026
15 checks passed
@samanrassam
samanrassam deleted the HMS-2494 branch November 25, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants