Skip to content

Conversation

@adendek
Copy link

@adendek adendek commented Jan 18, 2026

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/_src directory 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

  • Source/API Separation: Moved all implementation logic to pina/_src, leaving top-level directories as "hoisted" interfaces.
  • Core Consolidation: Migrated foundational components (Graph, LabelTensor, Operator, Trainer) into a centralized pina._src.core/ module.
  • Documentation Standard: Rewrote and standardized docstrings for all major modules to better reflect PINA's scientific and physical modeling capabilities.

Checklist

  • Code follows the project’s Code Style Guidelines
  • Tests have been added or updated
  • Documentation has been updated if necessary
  • Pull request is linked to an open issue

- 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.
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.

1 participant