Skip to content

Conversation

@aknierim
Copy link
Member

  • Update pre-commit config to use ruff instead of black and pyflake8
  • Add ruff.toml to configure ruff linter and formatter
  • Update formatting and fix imports in all python scripts

@aknierim aknierim requested a review from chrbeckm July 16, 2025 08:30
@chrbeckm
Copy link
Member

Are the pre-commit steps in the readme.md with this still up to date?

@aknierim
Copy link
Member Author

Are the pre-commit steps in the readme.md with this still up to date?

They are now :)

Comment on lines +1 to +9
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
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this mess with the automated template build?

Comment on lines 1 to 6
import matplotlib.pyplot as plt
import numpy as np








x = np.linspace(0, 10, 1000)
y = x ** np.sin(x)

Copy link
Member

Choose a reason for hiding this comment

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

May consider the layout on the tex slides for this, slide 162 ff. We used this spaced layout to easier introduce the latter matplotlib settings without changing the position of "reference" lines.

Comment on lines 1 to 6
import matplotlib.pyplot as plt
import numpy as np








x = np.linspace(0, 10, 1000)
y = x ** np.sin(x)
# set figure size and use constrained_layout
Copy link
Member

Choose a reason for hiding this comment

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

same as mattex1.py

Comment on lines 1 to 6
import matplotlib.pyplot as plt
import numpy as np








x = np.linspace(0, 10, 1000)
y = x ** np.sin(x)

Copy link
Member

Choose a reason for hiding this comment

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

Same as mattex1.py

print() # Für den Abstand zur letzten Lösung
# end solution
for metal, mass in zip(metals, masses):
for metal, mass in zip(metals, masses, strict=False):
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants