Skip to content

Commit d7ebafd

Browse files
committed
Add code formatting to known issues
1 parent 72bb3c1 commit d7ebafd

File tree

1 file changed

+35
-23
lines changed

1 file changed

+35
-23
lines changed

doc/design.rst

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -339,59 +339,72 @@ Generally, one may consider addressing the other issues by choosing another task
339339
Poetry for Project Management
340340
+++++++++++++++++++++++++++++
341341

342+
**Description:**
343+
The commonly used
344+
342345
**Downsides:**
343346

344347
- There's a potential for another tool that addresses the issues better in the future.
348+
- poetry slightly diverges from stardanrd poetproject.toml e.g. [popetry...]
349+
- no workspaces support
345350

346-
**Rationale:**
351+
**Rationale/History:**
347352

348353
- Poetry was chosen for project management; however, adjustments and reevaluations might be necessary.
349-
350-
**History:**
351-
352354
- Initial choice for ease of dependency management and project configuration.
353355

354356
**Ideas/Possible Solutions:**
355357

358+
- uv, workspaces, scripts ...
356359
- Continuously evaluate alternative tools that might better serve the project's needs.
357360
- Stay updated on the development and new features of Poetry and its competitors.
358361

359362

360-
Black & Isort for Code Formatting
361-
+++++++++++++++++++++++++++++++++
363+
Code Formatting
364+
+++++++++++++++
365+
366+
**Description:**
367+
368+
Currently we use Black and Isort for code formatting, though running them on a larger code base as pre-commit hooks or such can take quite a bit of time.
362369

363370
**Downsides:**
364371

365-
- Potential for performance enhancements and consolidation under one tool.
372+
- Two tools and an aligned configuration of them are required to cleanly and correctly format the codebase.
373+
- Code needs to be processed at least twice as we apply two individual tools.
374+
- The performance of Black and Isort is okay but not great compared to other tools.
366375

367-
**Rationale:**
376+
**Rationale/History:**
368377

369-
- Black and Isort are currently used but may be supplanted by a more efficient tool.
378+
- Black and Isort have been used because they are battle-tested and widely used
379+
- When we opted for Black and Isort, ``ruff`` wasn't "a thing" yet and at best in its early stages.
380+
- Black and Isort already have been known by most python devs when we where selecting the tools
370381

371-
**History:**
382+
**Ideas/Solutions:**
372383

373-
- Initially chosen for their effectiveness and simplicity.
384+
As `Ruff <https://docs.astral.sh/ruff/>`_ is fairly stable and also tested and used by many Python projects
385+
we should consider transitioning to it.
374386

375-
**Ideas/Possible Solutions:**
387+
Advantages:
376388

377-
- Transition to Ruff for performance improvements:
378-
- One tool does it all
379-
- More widely adopted and has better performance metrics.
389+
- Well-tested
390+
- Widely used
391+
- Excellent performance
392+
- Single tool for imports and formatting the codebase
393+
- Simplifies adopting ruff for linting
380394

381395

382396
Pylint Instead of Ruff
383397
+++++++++++++++++++++++
384398

399+
**Description:**
400+
385401
**Downsides:**
386402

387403
- Pylint slower and less usable in pre-commit hooks.
388404

389-
**Rationale:**
405+
**Rationale/History:**
390406

391407
- Transitioning to Ruff provides better usability and speed for linting processes.
392-
393-
**History:**
394-
395408
- Pylint was used, but Ruff's emergence offers superior performance in many areas.
396409

397410
**Ideas/Possible Solutions:**
@@ -404,16 +417,15 @@ Pylint Instead of Ruff
404417
Workflows Dependency Structure
405418
++++++++++++++++++++++++++++++
406419

420+
**Description:**
421+
407422
**Downsides:**
408423

409424
- Lack of clear documentation and structure for workflow dependencies.
410425

411-
**Rationale:**
426+
**Rationale/History:**
412427

413428
- Proper documentation will streamline workflow management and dependency tracing.
414-
415-
**History:**
416-
417429
- Workflow dependencies were initially structured without thorough documentation.
418430

419431
**Ideas/Possible Solutions:**

0 commit comments

Comments
 (0)