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

clean code #92

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions clean-modular-code/clean-code-present.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ kernelspec:
* Use [expressive object names](python-expressive-code)
* [Make your code DRY](dry-code)


+++ {"editable": true, "slideshow": {"slide_type": "slide"}, "jp-MarkdownHeadingCollapsed": true}


### PEP 8 & consistent code format

* Generally accepted rules for code format: PEP 8
Expand All @@ -33,8 +35,10 @@ kernelspec:

+++ {"editable": true, "slideshow": {"slide_type": "skip"}}


## Notes


```{code-cell} ipython3
---
editable: true
Expand Down Expand Up @@ -73,8 +77,10 @@ if x:
* Black
* Ruff


+++ {"editable": true, "slideshow": {"slide_type": "slide"}, "jp-MarkdownHeadingCollapsed": true}


#### [Other tools to consider](tools-code-style)

* `pre-commit` hooks: use with .git; apply every time you commit changes
Expand Down Expand Up @@ -380,6 +386,7 @@ print(path)

* Usability sometimes means failing (gracefully and with intention).


+++ {"editable": true, "slideshow": {"slide_type": "slide"}}

### Strategies
Expand All @@ -391,6 +398,7 @@ print(path)

## Fail fast


```{code-cell} ipython3
---
editable: true
Expand Down