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

Update model processing #85

Merged
merged 51 commits into from
Sep 10, 2024
Merged

Update model processing #85

merged 51 commits into from
Sep 10, 2024

Conversation

timmens
Copy link
Member

@timmens timmens commented Jun 30, 2024

In this PR, I update the model processing. I mainly focus on the following things:

  • Adding type hints to process_model.py
  • Improving the user interface through user Model dataclass which adds autocompletion and error handling at the creation of the user model
  • Improving the user interface through grid dataclass that add autocompletion and error handling at the grid creation time.
    • Implement DiscreteGrid, LinspaceGrid, LogspaceGrid, which inherit from baseclass Grid, and ContinuousGrid.
  • Update create_params_template.py
  • Remove black formatter and replace by ruff-formatter (this also means we can remove nbqa)

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

src/lcm/create_params_template.py Outdated Show resolved Hide resolved
src/lcm/grid_helpers.py Show resolved Hide resolved
src/lcm/grids.py Outdated Show resolved Hide resolved
src/lcm/grids.py Outdated Show resolved Hide resolved
src/lcm/model.py Outdated Show resolved Hide resolved
src/lcm/model.py Outdated Show resolved Hide resolved
Copy link
Member

@hmgaudecker hmgaudecker left a comment

Choose a reason for hiding this comment

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

Thanks a lot, that is much nicer to read now!

This clarity reveals some parts that could use high-level improvements -- ofc I did not follow instructions in that respect and noted them. Feel free to push off to some issue wherever you think that is more useful, though! Or, of course, tell me that this or that comment is nonsense.

explanations/dispatchers.ipynb Show resolved Hide resolved
src/lcm/__init__.py Show resolved Hide resolved
src/lcm/create_params_template.py Outdated Show resolved Hide resolved
src/lcm/create_params_template.py Outdated Show resolved Hide resolved
src/lcm/process_model.py Outdated Show resolved Hide resolved
src/lcm/entry_point.py Show resolved Hide resolved
src/lcm/interfaces.py Show resolved Hide resolved
src/lcm/model.py Outdated Show resolved Hide resolved
src/lcm/model.py Outdated Show resolved Hide resolved
src/lcm/simulate.py Outdated Show resolved Hide resolved
Copy link
Member

@hmgaudecker hmgaudecker left a comment

Choose a reason for hiding this comment

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

Excellent work, many thanks!

@timmens timmens merged commit ff66bad into main Sep 10, 2024
7 checks passed
@timmens timmens deleted the update-process-model branch September 10, 2024 16:27
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