Skip to content

Commit c672abe

Browse files
committed
Final changes
1 parent fd7d71b commit c672abe

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

ci/azure_template_posix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
python.version: '3.13'
6565
XXHASH: true
6666
PYARROW: true
67+
BUILD_FLAGS: '-Csetup-args=-Dcython-coverage=true'
6768
python313_copy_on_write:
6869
python.version: '3.12'
6970
XXHASH: true

linearmodels/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ _cython_tree = [fs.copyfile('__init__.py')]
3333
cython_args = []
3434
cython_c_args = ['-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION']
3535
if get_option('cython-coverage')
36+
message('Building with Cython coverage support')
3637
cython_args += ['-Xlinetrace=True']
3738
cython_c_args += ['-DCYTHON_TRACE=1']
3839
endif

linearmodels/tests/test_examples.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,23 @@
4646

4747
nbs = sorted(glob.glob(os.path.join(NOTEBOOK_DIR, "*.ipynb")))
4848
ids = [os.path.split(nb)[-1].split(".")[0] for nb in nbs]
49-
if nbs: # pragma: no cover
50-
@pytest.fixture(params=nbs, ids=ids)
51-
def notebook(request):
52-
return request.param
53-
54-
@pytest.mark.slow
55-
@pytest.mark.example
56-
@pytest.mark.skipif(SKIP, reason="Required packages not available")
57-
def test_notebook(notebook):
58-
nb_name = os.path.split(notebook)[-1]
59-
if MISSING_XARRAY and nb_name in NOTEBOOKS_USING_XARRAY:
60-
pytest.skip(f"xarray is required to test {notebook}")
61-
62-
nb = nbformat.read(notebook, as_version=4)
63-
ep = ExecutePreprocessor(allow_errors=False, timeout=120, kernel_name=kernel_name)
64-
ep.preprocess(nb, {"metadata": {"path": NOTEBOOK_DIR}})
65-
66-
else:
49+
if not nbs: # pragma: no cover
6750
pytest.mark.skip(reason="No notebooks found so not tests run")
51+
52+
53+
@pytest.fixture(params=nbs, ids=ids)
54+
def notebook(request):
55+
return request.param
56+
57+
58+
@pytest.mark.slow
59+
@pytest.mark.example
60+
@pytest.mark.skipif(SKIP, reason="Required packages not available")
61+
def test_notebook(notebook):
62+
nb_name = os.path.split(notebook)[-1]
63+
if MISSING_XARRAY and nb_name in NOTEBOOKS_USING_XARRAY:
64+
pytest.skip(f"xarray is required to test {notebook}")
65+
66+
nb = nbformat.read(notebook, as_version=4)
67+
ep = ExecutePreprocessor(allow_errors=False, timeout=120, kernel_name=kernel_name)
68+
ep.preprocess(nb, {"metadata": {"path": NOTEBOOK_DIR}})

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ keywords=[
5353
"statistical inference",
5454
"econometrics",
5555
]
56-
5756
license = "NCSA"
5857
license-files = [ "LICENSE.md" ]
5958
maintainers = [
@@ -174,7 +173,6 @@ fix = false
174173
target-version = "py310"
175174

176175
[tool.ruff.lint]
177-
typing-modules = ["statsmodels.compat.python", "compat.python"]
178176

179177
select = [
180178
# pyflakes
@@ -269,7 +267,7 @@ minversion = "8.4.1"
269267
testpaths = "linearmodels"
270268
xfail_strict = true
271269
addopts = "--strict"
272-
empty_parameter_set_mark = "fail_at_collect"
270+
empty_parameter_set_mark = "xfail"
273271
filterwarnings = [
274272
"ignore:`formatargspec`:DeprecationWarning:statsmodels",
275273
"ignore:Method .ptp is deprecated:FutureWarning",
@@ -295,7 +293,6 @@ junit_family = "xunit2"
295293
markers = [
296294
"slow: mark a test as slow",
297295
"smoke: mark a test as a coding error (smoke) test"
298-
299296
]
300297

301298
[tool.isort]
@@ -383,6 +380,7 @@ no_implicit_optional=true
383380
strict_equality=true
384381
disallow_untyped_defs=true
385382
disallow_incomplete_defs=true
383+
show_error_context=true
386384

387385
[mypy-linearmodels.conftest]
388386
check_untyped_defs=false

0 commit comments

Comments
 (0)