Skip to content
Closed
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
28 changes: 20 additions & 8 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
coverage:
status:
project:
default:
default: false
coverage:
target: 88%
paths:
- "src/metatrain/utils/.*"
- "src/metatrain/cli/.*"
coverage_gap:
paths:
- "src/metatrain/gap/.*"
coverage_pet:
paths:
- "src/metatrain/pet/.*"
coverage_soap_bpnn:
paths:
- "src/metatrain/soap_bpnn/.*"
coverage_llpr:
paths:
- "src/metatrain/llpr/.*"
coverage_nanopet:
paths:
- "src/metatrain/deprecated/nanopet/.*"
patch:
default:
informational: true
Expand All @@ -11,13 +30,6 @@ coverage:
- "tests/.*"
- "examples/.*"
- "src/metatrain/utils/testing/.*"
# we don't check coverage for the architectures
- "src/metatrain/deprecated/.*"
- "src/metatrain/experimental/.*"
- "src/metatrain/gap/.*"
- "src/metatrain/pet/.*"
- "src/metatrain/soap_bpnn/.*"
- "src/metatrain/llpr/.*"
# we don't currently run distributed tests on CI
- "src/metatrain/utils/distributed/.*"

Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/architecture-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,21 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.13"
- run: pip install tox
- run: pip install tox coverage[toml]

- name: run architecture tests
run: tox -e ${{ matrix.architecture-name }}-tests
- name: run architecture tests and generate coverage
run: |
coverage erase
coverage run --source src/metatrain \
$(which tox) -e ${{ matrix.architecture-name }}-tests
env:
# Use the CPU only version of torch when building/running the code
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu

- name: upload to codecov.io
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
files: .coverage
flags: coverage_${{ matrix.architecture-name }}
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions docs/src/architectures/gap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
GAP
===

[![GAP coverage](https://codecov.io/gh/metatensor/metatrain/branch/main/graph/badge.svg?flag=coverage_gap)](https://codecov.io/gh/metatensor/metatrain/tree/main/src/metatrain/gap)

This is an implementation of the sparse Gaussian Approximation Potential
(GAP) :footcite:p:`bartok_representing_2013` using Smooth Overlap of Atomic Positions
(SOAP) :footcite:p:`bartok_gaussian_2010` implemented in `featomic <FEATOMIC_>`_.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/architectures/llpr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
LLPR
====

[![LLPR coverage](https://codecov.io/gh/metatensor/metatrain/branch/main/graph/badge.svg?flag=coverage_llpr)](https://codecov.io/gh/metatensor/metatrain/tree/main/src/metatrain/llpr)

The LLPR architecture is a "wrapper" architecture that enables cheap uncertainty
quantification (UQ) via the last-layer prediction rigidity (LLPR) approach proposed
by Bigi et al. :footcite:p:`bigi_mlst_2024` It is compatible with the following
Expand Down
2 changes: 2 additions & 0 deletions docs/src/architectures/nanopet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
NanoPET (deprecated)
======================

[![NanoPET coverage](https://codecov.io/gh/metatensor/metatrain/branch/main/graph/badge.svg?flag=coverage_nanopet)](https://codecov.io/gh/metatensor/metatrain/tree/main/src/metatrain/deprecated/nanopet)

.. warning::

This is an **deprecated model**. You should not use it for anything important, and
Expand Down
2 changes: 2 additions & 0 deletions docs/src/architectures/pet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
PET
===

[![PET coverage](https://codecov.io/gh/metatensor/metatrain/branch/main/graph/badge.svg?flag=coverage_pet)](https://codecov.io/gh/metatensor/metatrain/tree/main/src/metatrain/pet)

PET is a cleaner, more user-friendly reimplementation of the original
PET model :footcite:p:`pozdnyakov_smooth_2023`. It is designed for better
modularity and maintainability, while preseving compatibility with the original
Expand Down
2 changes: 2 additions & 0 deletions docs/src/architectures/soap-bpnn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SOAP-BPNN
=========

[![SOAP-BPNN coverage](https://codecov.io/gh/metatensor/metatrain/branch/main/graph/badge.svg?flag=coverage_soap_bpnn)](https://codecov.io/gh/metatensor/metatrain/tree/main/src/metatrain/soap_bpnn)

This is a Behler-Parrinello type neural network :footcite:p:`behler_generalized_2007`,
which, instead of their original atom-centered symmetry functions, we use the Smooth
overlap of atomic positions (SOAP) :footcite:p:`bartok_representing_2013` as the atomic
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ envlist =
soap-bpnn-tests
pet-tests
nanopet-tests
llpr-tests

[testenv]
package = editable
Expand Down Expand Up @@ -112,7 +113,6 @@ commands =
python -m pip install --no-build-isolation sphericart torch-spex>=0.1,<0.2 wigners cmake
pytest {posargs}


[testenv:pet-tests]
description = Run PET tests with pytest
passenv = *
Expand Down Expand Up @@ -144,13 +144,13 @@ changedir = src/metatrain/deprecated/nanopet/tests/
commands =
pytest {posargs}

[testenv:llpr]
[testenv:llpr-tests]
description = Run LLPR tests with pytest
passenv = *
deps =
pytest
extras = llpr
changedir = src/metatrain/experimental/llpr/tests/
changedir = src/metatrain/llpr/tests/
commands =
pytest {posargs}

Expand Down