Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"defaultMode": "default",
"allow": [
"Edit"
],
"ask": [
"Edit(/pina/**)",
"Edit(/tests/**)",
"Edit(/docs/**)",
"Bash"
]
}
}
44 changes: 22 additions & 22 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@

# The default owners for everything in the repo
# (Pull requests touching any file in "/" will require review from at least one of these)
* @mathLab/pina-developers
pina/ @mathLab/pina-developers
readme/ @mathLab/pina-developers
tests/ @mathLab/pina-developers
tutorials/ @mathLab/pina-developers
pyproject.toml @mathLab/pina-developers @ndem0
* @PINA-org/pina-maintainers
pina/ @PINA-org/pina-maintainers
readme/ @PINA-org/pina-maintainers
tests/ @PINA-org/pina-maintainers
tutorials/ @PINA-org/pina-maintainers
pyproject.toml @PINA-org/pina-committee @ndem0

# Owners for documentation
docs/ @mathLab/pina-developers @dario-coscia
docs/ @PINA-org/pina-maintainers

# Owners for JOSS
joss/ @ndem0 @annaivagnes @dario-coscia

# Owners for project-wide config (GitHub workflows, formatting, etc.)
.github/ @ndem0 @dario-coscia
.gitattributes @ndem0 @dario-coscia
.gitignore @ndem0 @dario-coscia
.github/ @PINA-org/pina-committee
.gitattributes @PINA-org/pina-committee
.gitignore @PINA-org/pina-committee

# Security & policy files
CITATION.cff @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
CONTRIBUTING.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
LICENSE.rst @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
SECURITY.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
CODE_OF_CONDUCT.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
MAINTAINERS.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
ANTITRUST.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
CHARTER.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
GOVERNANCE.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
STEERING-COMMITTEE.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
TRADEMARKS.md @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
utils @FilippoOlivo @GiovanniCanali @ndem0 @dario-coscia
CITATION.cff @PINA-org/pina-committee
CONTRIBUTING.md @PINA-org/pina-committee
LICENSE.rst @PINA-org/pina-committee
SECURITY.md @PINA-org/pina-committee
CODE_OF_CONDUCT.md @PINA-org/pina-committee
MAINTAINERS.md @PINA-org/pina-committee
ANTITRUST.md @PINA-org/pina-committee
CHARTER.md @PINA-org/pina-committee
GOVERNANCE.md @PINA-org/pina-committee
STEERING-COMMITTEE.md @PINA-org/pina-committee
TRADEMARKS.md @PINA-org/pina-committee
utils @PINA-org/pina-committee
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This PR fixes #ISSUE_NUMBER. <!-- Possible other comments. -->

## Checklist

- [ ] Code follows the project’s [Code Style Guidelines](https://github.com/mathLab/PINA/blob/master/CONTRIBUTING.md#code-style--guidelines)
- [ ] Code follows the project’s [Code Style Guidelines](https://github.com/PINA-org/PINA/blob/master/CONTRIBUTING.md#code-style--guidelines)
- [ ] Tests have been added or updated
- [ ] Documentation has been updated if necessary
- [ ] Pull request is linked to an open issue
4 changes: 2 additions & 2 deletions .github/workflows/monthly-tagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:

- name: Create and push the tag
run: |
python utils/mathlab_versioning.py set --only-date "post$(date +%y%m)"
VERS=$(python utils/mathlab_versioning.py get)
python utils/pina_versioning.py set --only-date "post$(date +%y%m)"
VERS=$(python utils/pina_versioning.py get)
git config --global user.name 'Monthly Tag bot'
git config --global user.email 'mtbot@noreply.github.com'
git add pyproject.toml
Expand Down
11 changes: 5 additions & 6 deletions .opencode/commands/pina-agentic.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ such as: skill loaded, I'have read the promt and I am ready, etc.

**Hard constraints:**
- Respect `.opencode/skills/RULES.md`.
- Never write files into the user's project directory. Inline code snippets
in chat are fine; if a file must be written, use a `/tmp/.pina-agent` location
and say so explicitly
- Ask before writing files into the user's project. Inline code snippets are
fine, but confirm the target path first. Anything under `pina/`, `tests/`, or
`docs/` requires explicit user approval before you modify it.
- Avoid redundant operator calls.
- Don't do broad sweeps of the repo. Targeted API lookups (grep/read a
specific file to verify a constructor signature) are fine when the
Expand Down Expand Up @@ -53,6 +53,5 @@ Guidelines:
a session, not a one-shot handoff.
- **Close the loop on delivery.** Once the script is finalized (working,
sanity-checked, no open questions left), ask the user whether they'd like
it saved to a file and, if so, where — remember this respects the "never
write to the user's project" constraint, so confirm a scratch/output path
rather than assuming one.
it saved to a file and, if so, where. Confirm the path before writing, and
get explicit approval for any source file change.
30 changes: 30 additions & 0 deletions .opencode/opencode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://opencode.ai/config.json",
"permissions": [
{
"action": "edit",
"resource": "*",
"effect": "allow"
},
{
"action": "edit",
"resource": "pina/*",
"effect": "ask"
},
{
"action": "edit",
"resource": "tests/*",
"effect": "ask"
},
{
"action": "edit",
"resource": "docs/*",
"effect": "ask"
},
{
"action": "shell",
"resource": "*",
"effect": "ask"
}
]
}
28 changes: 10 additions & 18 deletions .opencode/skills/RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@

These rules apply to **every skill** in this repository.

1. **No source code modification** — Never modify, create, or delete any source
code files (`.py`, `.cpp`, `.js`, `.ts`, `.rs`, etc.) or any files under
`pina/`, `tests/`, `docs/`, or similar source directories.

2. **Read-only guidance** — Skills exist solely to provide guidance, templates,
and interactive Q&A. Output explanations, code snippets for the user to
copy, and checklists — never write files to the user's project.

3. **Scope** — If the user asks to edit or write source files, politely decline
and explain that this skill only provides guidance.

4. **Avoid redundant operator calls in equations** — Differential operators
1. **Avoid redundant operator calls in equations** — Differential operators
(`grad`, `div`, `laplacian`, etc.) are **not cached**: every call triggers a
new backward pass through the autograd graph. Always compute an operator
once for all relevant components and extract what you need, rather than
Expand Down Expand Up @@ -43,20 +32,20 @@ These rules apply to **every skill** in this repository.
This also applies to spatial gradients, divergences, and any other
operator that can be computed for all components at once.

5. **Inference goes through the solver, not the raw model** — Always call
2. **Inference goes through the solver, not the raw model** — Always call
`solver(input_tensor)` for evaluation at inference time,
not `model(input_tensor)` or `solver.model(input_tensor)`.
The solver handles label propagation and any post-processing internally.
Only bypass the solver and call `model(input)` directly when there is a
specific reason (e.g., multiple models with different forward passes at
training vs. inference).

6. **Prefer solver defaults, acknowledge in chat** — Use the default values
3. **Prefer solver defaults, acknowledge in chat** — Use the default values
for solver parameters (optimizer, scheduler, loss, weighting, etc.) unless
the user explicitly provides different values. Let the user know in chat
which defaults are active so they're aware of what's running under the hood.

7. **Use float values in domain fixed-point variables** —
4. **Use float values in domain fixed-point variables** —
`CartesianDomain({"t": 0})` or `EllipsoidDomain({"t": 0})` stores the value
`0` as a Python `int`, causing `torch.full` to produce an int64 tensor. This
later fails when `requires_grad_()` is called (int tensors don't support
Expand All @@ -74,7 +63,7 @@ These rules apply to **every skill** in this repository.
EllipsoidDomain({"t": 0.0})
```

8. **Detach LabelTensors before converting to NumPy** —
5. **Detach LabelTensors before converting to NumPy** —
A `LabelTensor` with `requires_grad=True` cannot be passed to
`matplotlib` or `numpy` directly — PyTorch raises
`"Can't call numpy() on Tensor that requires grad"`. Always call
Expand All @@ -91,12 +80,15 @@ These rules apply to **every skill** in this repository.
plt.plot(theta.detach().numpy(), dtheta_dt.detach().numpy())
```

9. **Don't call `problem.move_discretisation_into_conditions()` in user scripts** —
6. **Don't call `problem.move_discretisation_into_conditions()` in user scripts** —
The Trainer calls this internally before training — the user doesn't need
to invoke it manually. Keep user-facing scripts simple:
`problem.discretise_domain(...)` per domain and nothing more.

10. **Smoke-Test Training Runs** - Before delivering training code, run a short
7. **Smoke-Test Training Runs** - Before delivering training code, run a short
smoke test using only a few epochs to confirm that the pipeline executes
successfully and does not fail. After the test passes, restore the final
configuration to the intended number of training epochs.

8. **Modify files** - If the request will modify source files (`pina`, `tests`),
announce which files and wait for the user's explicit approval before editing.
1 change: 0 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@ ruff check . # lint

## Rules

- Never modify source code (`pina/`, `tests/`, `docs/`). Skills are read-only guidance.
- Stay conversational — walk through the workflow naturally.
2 changes: 1 addition & 1 deletion API_scheme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


Here is a high-level overview of PINA’s main modules. For full details, refer to the
<a href="https://mathlab.github.io/PINA/"><b>documentation</b></a>.
<a href="https://pina-org.github.io/PINA/"><b>documentation</b></a>.

```mermaid
flowchart TB
Expand Down
12 changes: 6 additions & 6 deletions CHARTER.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Charter for the PINA Organization

This is the organizational charter for the PINA Organization. In this Charter and related documents, “PINA Organization” means the entity designated in this Charter as the governing body of the PINA project. At the time of writing, this is the PINA Steering Committee. If governance changes in the future, references to “PINA Organization” automatically refer to the successor entity named here without rewriting other policies. By adding their name to the [Steering Committee.md file](https://github.com/mathLab/PINA/blob/master/STEERING-COMMITTEE.md), Steering Committee members agree as follows.
This is the organizational charter for the PINA Organization. In this Charter and related documents, “PINA Organization” means the entity designated in this Charter as the governing body of the PINA project. At the time of writing, this is the PINA Steering Committee. If governance changes in the future, references to “PINA Organization” automatically refer to the successor entity named here without rewriting other policies. By adding their name to the [Steering Committee.md file](https://github.com/PINA-org/PINA/blob/master/STEERING-COMMITTEE.md), Steering Committee members agree as follows.

## 1. Mission

Expand All @@ -19,7 +19,7 @@ By pursuing these goals, the Organization aims to be a cornerstone resource in c

**2.1 Purpose**. The Steering Committee will be responsible for all technical oversight, project approval and oversight, policy oversight, and trademark management.

**2.2 Composition**. The Steering Committee voting members are listed in the [STEERING-COMMITEE.md](https://github.com/mathLab/PINA/blob/master/STEERING-COMMITTEE.md) file in the repository.
**2.2 Composition**. The Steering Committee voting members are listed in the [STEERING-COMMITEE.md](https://github.com/PINA-org/PINA/blob/master/STEERING-COMMITTEE.md) file in the repository.
Voting members may be added or removed by no less than 75% affirmative vote of the Steering Committee.
The Steering Committee will appoint a Chair responsible for organizing Steering Committee activity.

Expand All @@ -39,11 +39,11 @@ In addition to the method set out in section 2.2, the membership of a Steering C

## 5. Trademarks

Any names, trademarks, service marks, logos, mascots, or similar indicators of source or origin and the goodwill associated with them arising out of the PINA's activities or PINA projects' activities (the "Marks"), are controlled by the PINA Organization. PINA Marks may be only used in accordance with the [trademark policy](https://github.com/mathLab/PINA/blob/master/TRADEMARKS.md).
Any names, trademarks, service marks, logos, mascots, or similar indicators of source or origin and the goodwill associated with them arising out of the PINA's activities or PINA projects' activities (the "Marks"), are controlled by the PINA Organization. PINA Marks may be only used in accordance with the [trademark policy](https://github.com/PINA-org/PINA/blob/master/TRADEMARKS.md).

## 6. Antitrust Policy

The Steering Committee is bound by the [antitrust policy](https://github.com/mathLab/PINA/blob/master/ANTITRUST.md).
The Steering Committee is bound by the [antitrust policy](https://github.com/PINA-org/PINA/blob/master/ANTITRUST.md).

## 7. No Confidentiality

Expand All @@ -59,11 +59,11 @@ In order to be eligible to be a PINA project, a project must:
- For code, a license on the Open Source Initiative's list of [Popular Licenses](https://opensource.org/licenses).
- For data, a license on the Open Knowledge Foundation's list of [Recommended Conformant Licenses](http://opendefinition.org/licenses/).
- For specifications, a community developed and maintained specification agreement, such the [Open Web Foundation Agreements](https://www.openwebfoundation.org/the-agreements) or [Community Specification Agreement](https://github.com/CommunitySpecification/1.0).
* Include and adhere to the PINA's policies, including the [trademark policy](https://github.com/mathLab/PINA/blob/master/TRADEMARKS.md), the [antitrust policy](https://github.com/mathLab/PINA/blob/master/ANTITRUST.md), and the [code of conduct](https://github.com/mathLab/PINA/blob/master/CODE_OF_CONDUCT.md).
* Include and adhere to the PINA's policies, including the [trademark policy](https://github.com/PINA-org/PINA/blob/master/TRADEMARKS.md), the [antitrust policy](https://github.com/PINA-org/PINA/blob/master/ANTITRUST.md), and the [code of conduct](https://github.com/PINA-org/PINA/blob/master/CODE_OF_CONDUCT.md).

## 9. Amendments

Amendments to this charter, the [antitrust policy](https://github.com/mathLab/PINA/blob/master/ANTITRUST.md), the [trademark policy](https://github.com/mathLab/PINA/blob/master/TRADEMARKS.md), or the [code of conduct](https://github.com/mathLab/PINA/blob/master/CODE_OF_CONDUCT.md) may only be made with at least a 75% affirmative vote of the Steering Committee.
Amendments to this charter, the [antitrust policy](https://github.com/PINA-org/PINA/blob/master/ANTITRUST.md), the [trademark policy](https://github.com/PINA-org/PINA/blob/master/TRADEMARKS.md), or the [code of conduct](https://github.com/PINA-org/PINA/blob/master/CODE_OF_CONDUCT.md) may only be made with at least a 75% affirmative vote of the Steering Committee.

---
## Attribution
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ We encourage all contributions, big or small!

## Reporting Bugs

If you find a bug, please open an [issue](https://github.com/mathLab/PINA/issues) and include:
If you find a bug, please open an [issue](https://github.com/PINA-org/PINA/issues) and include:
- A clear and descriptive title
- Steps to reproduce the problem
- What you expected to happen
Expand All @@ -42,7 +42,7 @@ If you find a bug, please open an [issue](https://github.com/mathLab/PINA/issues
## Suggesting Enhancements

We welcome new ideas! If you have an idea to improve PINA:
1. Check the [issue tracker](https://github.com/mathLab/PINA/issues) or the [discussions](https://github.com/mathLab/PINA/discussions) to see if someone has already suggested it.
1. Check the [issue tracker](https://github.com/PINA-org/PINA/issues) or the [discussions](https://github.com/PINA-org/PINA/discussions) to see if someone has already suggested it.
2. If not, open a new issue describing:
- The enhancement you'd like
- Why it would be useful
Expand Down
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Governance Policy

This document provides the governance policy for the PINA. Maintainers agree to this policy and to abide by all PINA polices, including the [code of conduct](https://github.com/mathLab/PINA/blob/master/CODE_OF_CONDUCT.md), [trademark policy](https://github.com/mathLab/PINA/blob/master/TRADEMARKS.md), and [antitrust policy](https://github.com/mathLab/PINA/blob/master/ANTITRUST.md) by adding their name to the [maintainers.md file](https://github.com/mathLab/PINA/blob/master/MAINTAINERS.md).
This document provides the governance policy for the PINA. Maintainers agree to this policy and to abide by all PINA polices, including the [code of conduct](https://github.com/PINA-org/PINA/blob/master/CODE_OF_CONDUCT.md), [trademark policy](https://github.com/PINA-org/PINA/blob/master/TRADEMARKS.md), and [antitrust policy](https://github.com/PINA-org/PINA/blob/master/ANTITRUST.md) by adding their name to the [maintainers.md file](https://github.com/PINA-org/PINA/blob/master/MAINTAINERS.md).

## 1. Roles.

Expand Down
Loading
Loading