-
Notifications
You must be signed in to change notification settings - Fork 92
refactor: adopt _src pattern and migrate core components
#763
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
base: 0.3
Are you sure you want to change the base?
Conversation
- Restructured the repository to separate internal logic (`pina/_src`) from the public API. - Migrated central components (Graph, LabelTensor, Operator, Trainer) into `pina/_src/core/` for better organization. - Updated all subpackage `__init__.py` files to expose a clean, flat import surface for users. - Standardized module docstrings across Solvers, Models, Equations, Domains, and Callbacks to improve documentation quality. - Optimized internal dictionary handling in tensor storage functions.
|
Hi @adendek ! Thanks for the PR. At the moment, all tests are failing, probably due to an import error. Can you check it? Also, the |
|
I'fixed the UT and formatting. I guess they should be fine now. I'll need a little bit more time to update the docs. |
This branch was created to be able to run all tests using on my fork.
|
Hello @dario-coscia, I have successfully refactored the Sphinx documentation to align with the new As shown in the latest CI run executed on my fork, the
So the PR is ready to be reviewed. |

Description
This PR resolves #756 by implementing a major structural refactor. Following the design patterns of modern scientific libraries like JAX and Optax, it introduces a
pina/_srcdirectory to house internal logic while exposing a clean, flat public API.API Stability Notice
The public interface remains unchanged. Existing user scripts and external calls to PINA classes will continue to work as expected. This refactor purely reorganizes the internal source code and "hoists" definitions to their respective package levels for cleaner access.
Key Changes
pina._src.core/module.Checklist