Skip to content

Conversation

@dario-coscia
Copy link
Collaborator

In this PR I rename some modules using a singular convention #445 + add back compatibility for 0.1

@dario-coscia dario-coscia added pr-to-review Label for PR that are ready to been reviewed v0.2 labels Feb 19, 2025
@dario-coscia dario-coscia requested a review from ndem0 February 19, 2025 15:32
@dario-coscia dario-coscia self-assigned this Feb 19, 2025
Copy link
Member

Choose a reason for hiding this comment

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

Why not avno_block.py ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would go for average_neural_operator_block.py

from ...utils import check_consistency

from pina.model.layers import (
from pina.model.block import (
Copy link
Member

Choose a reason for hiding this comment

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

is there a way to avoid from pina? Does from . import ... work?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, you should always prefer the relative import

Copy link
Member

Choose a reason for hiding this comment

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

isn't better lowrank_block ?

Copy link
Member

Choose a reason for hiding this comment

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

rbf_block ?

import torch

from pina.solvers import SupervisedSolver
from pina.solver import SupervisedSolver
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about from . import SupervisedSolver?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, you should always prefer the relative import

Copy link
Collaborator

@GiovanniCanali GiovanniCanali left a comment

Choose a reason for hiding this comment

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

Sorry for the spam. All suggestions refer to renaming files, following the guidelines in the Discussions. In addition to the commented files, we might rename file in test_model directory as well. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest to change the name from messa_passing.py to message_passing.py

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, I removed the file cuz it was empty

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest to change the name from adaptive_func.py to adaptive_function.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest to change the name from adaptive_func_interface.py to adaptive_function_interface.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo: adaptive_refinement_callback

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest to rename from avno.py to average_neural_operator.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would rename it as test_spectral_convolution.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo: test_adaptive_refinement_callback.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest: test_data_module.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest test_system_equation.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

What about: test_reduced_order_model.py?

@dario-coscia
Copy link
Collaborator Author

Thanks @gc031298 and @FilippoOlivo for the suggestions, I will try to fix them asap!

dario-coscia and others added 4 commits February 21, 2025 09:00
* rm meta.py, plotter.py, writer.py
* modify __init__ file
* modify tests due to __init__ import
* solvers -> solver
* adaptive_functions -> adaptive_function
* callbacks -> callback
* operators -> operator
* pinns -> physics_informed_solver
* layers -> block
@FilippoOlivo FilippoOlivo requested review from FilippoOlivo and removed request for FilippoOlivo February 21, 2025 08:03
@GiovanniCanali
Copy link
Collaborator

Ready to merge on my side!

@FilippoOlivo
Copy link
Member

Ready to merge on my side!

Also for me!

@dario-coscia dario-coscia force-pushed the simplify_package branch 2 times, most recently from b003319 to 37c3caf Compare February 24, 2025 10:20
* Update pyproject.toml
* Create a Workflow file to test formatting in PR
* Adding black as dev dependency
* Formatting pina code
* Formatting tests
@FilippoOlivo FilippoOlivo merged commit 12b7787 into 0.2 Feb 24, 2025
16 checks passed
@dario-coscia dario-coscia deleted the simplify_package branch February 26, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-to-review Label for PR that are ready to been reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants