-
Notifications
You must be signed in to change notification settings - Fork 6
Update pre commit #463
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
Open
aknierim
wants to merge
17
commits into
main
Choose a base branch
from
update-pre-commit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update pre commit #463
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c83c9ca
Use ruff pre-commit instead of flake8 and black
aknierim 3b4a4ac
Use context manager when using open
aknierim f159bb8
Fix formatting of python scripts in exercises-latex
aknierim b506d6e
Fix formatting of python solutions in exercises-toolbox
aknierim 7fa951c
Fix formatting of numpy solutions in exercises-toolbox
aknierim 3f1c461
Fix formatting of matplotlib solutions in exercises-toolbox
aknierim f5410b1
Fix formatting of scipy solutions in exercises-toolbox
aknierim 7a4f826
Fix formatting of uncertainties solutions in exercises-toolbox
aknierim 44e6539
Fix formatting of make (python) solutions in exercises-toolbox
aknierim d5e3194
Fix formatting of python solutions in exercises-toolbox/8-all
aknierim 49726cd
Fix formatting and imports of intro and latex scripts
aknierim 6976af6
Fix formatting and imports of make example plots
aknierim c2565d4
Fix formatting of setup.py
aknierim 705ac5b
Fix import order in python/muon_plot.py
aknierim d648d5b
Use ruff-format in nbqa
aknierim 287058d
Update README
aknierim 5357b04
Update nb formatting
aknierim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,17 @@ | ||
| repos: | ||
| - repo: https://github.com/psf/black-pre-commit-mirror | ||
| rev: 23.9.1 | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: "v0.12.3" | ||
| hooks: | ||
| - id: black | ||
| language_version: python3.12 | ||
| - id: ruff-format | ||
| - id: ruff-check | ||
| args: ["--fix", "--show-fixes"] | ||
| - repo: https://github.com/nbQA-dev/nbQA | ||
| rev: 1.7.0 | ||
| rev: 1.9.1 | ||
| hooks: | ||
| - id: nbqa-black | ||
| additional_dependencies: [black==23.9.1] | ||
| - id: nbqa-pyupgrade | ||
| additional_dependencies: [pyupgrade==2.7.3] | ||
| - repo: https://github.com/pycqa/flake8 | ||
| rev: 6.1.0 | ||
| hooks: | ||
| - id: flake8 | ||
| args: ["--max-line-length=88", "--extend-ignore=E203"] | ||
| - id: nbqa-ruff-format | ||
| additional_dependencies: [ruff] | ||
|
|
||
| - repo: https://github.com/kynan/nbstripout | ||
| rev: 0.6.0 | ||
| rev: 0.8.1 | ||
| hooks: | ||
| - id: nbstripout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| #! /usr/bin/env python | ||
| # encoding: utf-8 | ||
|
|
||
| import numpy as np | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
exercises-toolbox/8-all/303_Der_Lock-In-Verstaerker/loesung.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
exercises-toolbox/8-all/354_Gedaempfte_und_erzwungene_Schwingungen/loesung.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
exercises-toolbox/8-all/702_Aktivierung_mit_Neutronen/loesung.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,12 @@ | ||
| from linregress import ulinregress | ||
| import matplotlib.pyplot as plt | ||
|
|
||
| # begin solution | ||
| import numpy as np | ||
| import uncertainties as unc | ||
| import uncertainties.unumpy as unp | ||
| from uncertainties.unumpy import nominal_values as noms, std_devs as stds | ||
| import matplotlib.pyplot as plt | ||
| from linregress import ulinregress | ||
| from uncertainties.unumpy import nominal_values as noms | ||
| from uncertainties.unumpy import std_devs as stds | ||
|
Comment on lines
+1
to
+9
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this mess with the automated template build? |
||
|
|
||
| Delta_t_0 = np.genfromtxt("Delta_t_0.txt") | ||
| N_0 = np.genfromtxt("N_0.txt") | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this, we should introduce the keyword argument in the python notebook.