Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

docs: Add Documentation for Using #fmt: skip with Equations in Black Formatter #64

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

uwcdc
Copy link
Member

@uwcdc uwcdc commented Jan 24, 2024

Summary of Changes

This PR updates the contributing.rst file to include information about the use of #fmt: skip tags for Black formatting exceptions for equations in the "caustics" project documentation.

Changes Made

Added a new section titled "Black Formatting Exceptions for Equations."
Provided information on how to use #fmt: skip for exempting specific code blocks from Black formatting.
Included best practices for using #fmt: skip with equations.
Example Usage

psi = (q2 * (x2 + self.s2) + y2).sqrt() # fmt: skip
Context

Maintaining consistent and readable code is crucial in the "caustics" project, and we use the Black code formatter for this purpose. However, there are scenarios where automatic formatting may interfere with the desired layout of equations. This PR introduces the use of #fmt: skip tags to selectively exempt equations from Black formatting.

Testing

Verified the changes locally by rendering the contributing.rst file and confirming that the new section is displayed correctly.

@uwcdc uwcdc requested a review from lsetiawan January 24, 2024 01:12
@uwcdc uwcdc self-assigned this Jan 24, 2024
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5087adf) 89.51% compared to head (84e25b9) 89.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##           black_doc      #64   +/-   ##
==========================================
  Coverage      89.51%   89.51%           
==========================================
  Files             36       36           
  Lines           1955     1955           
==========================================
  Hits            1750     1750           
  Misses           205      205           

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

@lsetiawan lsetiawan merged commit 9451cbf into uw-ssec:black_doc Jan 24, 2024
13 checks passed
@lsetiawan lsetiawan linked an issue Jan 24, 2024 that may be closed by this pull request
5 tasks
lsetiawan added a commit to lsetiawan/caustics that referenced this pull request Jan 30, 2024
…iela-Institute#150)

* docs: Update contributing.rst with Black fmt exceptions (uw-ssec#64)

* fix: Update caustics formatting

---------

Co-authored-by: Cordero Core <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

style: Add Black formatting exceptions for equations
2 participants