Skip to content

Commit 2ec01f1

Browse files
authored
Merge pull request #153 from ev-br/upd_pyproject.toml
Rename to `scipy_doctest`
2 parents b814568 + 902e2e8 commit 2ec01f1

27 files changed

+50
-47
lines changed

.github/workflows/pip.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ jobs:
4545
# Tests that require Scipy and MPL will be skipped
4646
- name: Self-test without SciPy and MPL
4747
run: |
48-
pytest --pyargs scpdt -v
48+
pytest --pyargs scipy_doctest -v
4949
5050
- name: Self-test CLI without SciPy and MPL
5151
run: |
52-
python -m scpdt scpdt/tests/finder_cases.py -vv
52+
python -m scipy_doctest scipy_doctest/tests/finder_cases.py -vv
5353
5454
# Install Scipy and MPL
5555
- name: Install optional dependencies
@@ -59,29 +59,29 @@ jobs:
5959
# Tests that require Scipy and MPL can now run
6060
- name: Self-test with SciPy and MPL
6161
run: |
62-
pytest --pyargs scpdt -v
62+
pytest --pyargs scipy_doctest -v
6363
6464
- name: Self-test CLI with SciPy and MPL
6565
run: |
66-
python -m scpdt scpdt/tests/finder_cases.py -vv
66+
python -m scipy_doctest scipy_doctest/tests/finder_cases.py -vv
6767
6868
- name: Test testfile CLI
6969
run: |
70-
python -m scpdt ./scpdt/tests/scipy_ndimage_tutorial_clone.rst -v
70+
python -m scipy_doctest ./scipy_doctest/tests/scipy_ndimage_tutorial_clone.rst -v
7171
7272
- name: Run testmod a scipy submodule
7373
run: |
74-
python -c'from scipy.linalg import _basic; from scpdt import testmod; testmod(_basic, verbose=True)'
74+
python -c'from scipy.linalg import _basic; from scipy_doctest import testmod; testmod(_basic, verbose=True)'
7575
7676
- name: Run testmod a scipy submodule -- Public API onlly
7777
run: |
7878
python -m pip install pooch
79-
python -c'from scipy import ndimage; from scpdt import testmod; testmod(ndimage, verbose=True, strategy="api")'
79+
python -c'from scipy import ndimage; from scipy_doctest import testmod; testmod(ndimage, verbose=True, strategy="api")'
8080
8181
- name: Test pytest plugin
82-
# This test will fail in a venv where scpdt has not been installed and the plugin has not been activated
82+
# This test will fail in a venv where scipy_doctest has not been installed and the plugin has not been activated
8383
run: |
84-
test_files=("scpdt/tests/module_cases.py" "scpdt/tests/stopwords_cases.py" "scpdt/tests/local_file_cases.py")
84+
test_files=("scipy_doctest/tests/module_cases.py" "scipy_doctest/tests/stopwords_cases.py")
8585
for file in "${test_files[@]}"; do
8686
python -m pytest "${file}" --doctest-modules
8787
done

pyproject.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ requires = ["flit_core >=3.2,<4"]
33
build-backend = "flit_core.buildapi"
44

55
[project]
6-
name = "scpdt"
7-
authors = [
8-
{name = "Evgeni Burovski et al", email = "[email protected]"}
6+
name = "scipy_doctest"
7+
maintainers = [
8+
{name = "SciPy developers", email = "[email protected]"}
99
]
1010
readme = "README.md"
1111
requires-python = ">=3.8"
1212
license={file = "LICENSE"}
1313
dynamic = ["version", "description"]
1414
classifiers = [
15-
"Private :: Do Not Upload",
15+
"Development Status :: 4 - Beta",
16+
"License :: OSI Approved :: BSD License",
17+
"Intended Audience :: Developers",
1618
"Programming Language :: Python :: 3",
17-
"Framework :: Pytest"
19+
"Framework :: Pytest",
1820
]
1921
dependencies = [
2022
"numpy>=1.19.5",
@@ -36,4 +38,4 @@ addopts = "--verbose --color=yes"
3638
# specify project entrypoints to make each plugin discoverable by pytest
3739
# ref: https://docs.pytest.org/en/latest/how-to/writing_plugins.html#making-your-plugin-installable-by-others
3840
[project.entry-points.pytest11]
39-
scpdt = "scpdt.plugin"
41+
scipy_doctest = "scipy_doctest.plugin"

scpdt/__init__.py renamed to scipy_doctest/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66

77

8-
__version__ = "0.1"
8+
__version__ = "1.1dev0"
99

1010
from .impl import DTChecker, DTFinder, DTParser, DTRunner, DebugDTRunner, DTConfig # noqa
1111
from .frontend import testmod, testfile, find_doctests, run_docstring_examples # noqa
File renamed without changes.

scipy_doctest/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .impl import DTConfig
2+
3+
4+
dt_config = DTConfig()
5+
File renamed without changes.
File renamed without changes.

scpdt/plugin.py renamed to scipy_doctest/plugin.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22
A pytest plugin that provides enhanced doctesting for Pydata libraries
33
"""
44
import bdb
5-
import os
6-
import shutil
75
import warnings
86
import doctest
97

10-
118
import pytest
12-
from _pytest import doctest as pydoctest, mark, outcomes
9+
import _pytest
10+
from _pytest import doctest as pydoctest, outcomes
1311
from _pytest.doctest import DoctestModule, DoctestTextfile
1412
from _pytest.pathlib import import_path
1513

16-
from scpdt.impl import DTChecker, DTParser, DebugDTRunner
17-
from scpdt.conftest import dt_config
18-
from scpdt.util import np_errstate, matplotlib_make_nongui, temp_cwd
19-
from scpdt.frontend import find_doctests
14+
from .impl import DTParser, DebugDTRunner
15+
from .conftest import dt_config
16+
from .util import np_errstate, matplotlib_make_nongui, temp_cwd
17+
from .frontend import find_doctests
2018

2119

2220
def pytest_addoption(parser):
@@ -85,7 +83,7 @@ def _maybe_add_markers(item, config):
8583

8684
extra_skip = dt_config.pytest_extra_skip
8785
skip_it = item.name in extra_skip
88-
if item.name in extra_skip:
86+
if skip_it:
8987
reason = extra_skip[item.name] or ''
9088
item.add_marker(
9189
pytest.mark.skip(reason=reason)
@@ -163,7 +161,7 @@ def _is_deprecated(module):
163161

164162
res = False
165163
try:
166-
with warnings.catch_warnings() as w:
164+
with warnings.catch_warnings():
167165
warnings.simplefilter('error', DeprecationWarning)
168166
getattr(module, names[0])
169167
res = False
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)