Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
fix coverage
delete unused code
  • Loading branch information
virgesmith committed Oct 22, 2024
1 parent 396c162 commit 208384c
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.11" ]
python-version: [ "3.12" ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "pip: Python ${{ matrix.python-version }} coverage"
uses: actions/setup-python@v5
with:
Expand All @@ -27,7 +29,7 @@ jobs:
python -m pip install pybind11 pytest
- name: Build
run: |
CFLAGS=-coverage python -m pip install .
CXXFLAGS=-coverage python -m pip install .
- name: Test
run: |
python -m pytest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mpi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: "pip: Python ${{ matrix.python-version }}"
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ coverage:
threshold: 1% # leeway
patch:
default:
target: 80%
target: 75%
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = [
"setuptools>=42",
"wheel",
"pybind11>=2.6.0",
"pybind11>=2.13",
"numpy",
"pytest"
]
Expand Down
21 changes: 0 additions & 21 deletions src/Error.cpp

This file was deleted.

24 changes: 0 additions & 24 deletions src/Error.h

This file was deleted.

1 change: 0 additions & 1 deletion src/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "Module.h"
#include "Timer.h"
#include "Log.h"
#include "Error.h"
#include "Helpers.h"

#include <pybind11/pybind11.h>
Expand Down
3 changes: 1 addition & 2 deletions src/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "NPArray.h"
#include "DataFrame.h"
#include "Log.h"
#include "Error.h"

#include "NewOrder.h"

Expand Down Expand Up @@ -223,6 +222,6 @@ PYBIND11_MODULE(_neworder_core, m)
init_env(mpi);

// Map custom C++ exceptions to python ones
py::register_exception_translator(no::exception_translator);
//py::register_exception_translator(no::exception_translator);
}

1 change: 0 additions & 1 deletion src/Timeline.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "Timeline.h"
#include "Log.h"
#include "Error.h"

#include <pybind11/chrono.h>

Expand Down
12 changes: 12 additions & 0 deletions test/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ def __init__(self) -> None:
with pytest.raises(TypeError):
_ = TestModel()

def test_not_implemented() -> None:

class TestModel(no.Model):
def __init__(self) -> None:
super().__init__(no.NoTimeline())

def step(self) -> None:
raise NotImplementedError()

with pytest.raises(NotImplementedError):
no.run(TestModel())


def test_default_seeder() -> None:
class DefaultModel(no.Model):
Expand Down

0 comments on commit 208384c

Please sign in to comment.