Skip to content

Commit 7f357fe

Browse files
committed
DOC: remove scpdt references from README
1 parent 58ff06a commit 7f357fe

File tree

1 file changed

+16
-45
lines changed

1 file changed

+16
-45
lines changed

README.md

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ the output. Thus the example source needs to be valid python code still.
8282

8383
```
8484
$ pip install -e .
85-
$ pytest --pyargs scpdt
85+
$ pytest --pyargs scipy_doctest
8686
```
8787

8888
## Usage
@@ -100,7 +100,7 @@ For example,
100100

101101
```
102102
>>> from scipy import linalg
103-
>>> from scpdt import testmod
103+
>>> from scipy_doctest import testmod
104104
>>> res, hist = testmod(linalg, strategy='api')
105105
>>> res
106106
TestResults(failed=0, attempted=764)
@@ -116,15 +116,15 @@ the behavior of the eponymous functions of the `doctest` module).
116116

117117
There is a basic CLI, which also mimics that of the `doctest` module:
118118
```
119-
$ python -m scpdt foo.py
119+
$ python -m scipy_doctest foo.py
120120
```
121121

122122
Note that, just like `$ python -m doctest foo.py`, this may
123123
fail if `foo.py` is a part of a package due to package imports.
124124

125125
Text files can also be CLI-checked:
126126
```
127-
$ python -m scpdt bar.rst
127+
$ python -m scipy_doctest bar.rst
128128
```
129129

130130

@@ -148,49 +148,20 @@ passing the instance to `testmod` or constructors of `DT*` objects. Defaults
148148
are provided, based on a long-term usage in SciPy.
149149

150150

151-
### The Scpdt Pytest Plugin
151+
### The SciPy Doctest Pytest Plugin
152152

153-
The pytest plugin enables the use of scpdt tools to perform doctests.
153+
The pytest plugin enables the use of `scipy_doctest` tools to perform doctests.
154154

155155
Follow the given instructions to utilize the pytest plugin for doctesting.
156156

157-
### Running doctests on Scipy
158-
1. **Install plugin**
159-
160-
Start by installing the pytest plugin via pip:
161-
162-
```bash
163-
pip install git+https://github.com/ev-br/scpdt.git@main
164-
```
165-
166-
2. **Configure Your Doctesting Experience**
167-
168-
To tailor your doctesting experience, you can utilize an instance of `DTConfig`.
169-
An in-depth explanation is given in the [tailoring your doctesting experience](https://github.com/ev-br/scpdt#tailoring-your-doctesting-experience) section.
170-
171-
3. **Run Doctests**
172-
173-
Doctesting is configured to execute on SciPy using the `dev.py` module.
174-
175-
To run all doctests, use the following command:
176-
```bash
177-
python dev.py test --doctests
178-
```
179-
180-
To run doctests on specific SciPy modules, e.g: `cluster`, use the following command:
181-
182-
```bash
183-
python dev.py test --doctests -s cluster
184-
```
185-
186-
### Running Doctests on Other Packages/Projects
157+
### Running Doctests on Packages/Projects
187158

188159
If you want to run doctests on packages or projects other than SciPy, follow these steps:
189160

190161
1. **Install the plugin**
191162

192163
```bash
193-
pip install git+https://github.com/ev-br/scpdt.git@main
164+
pip install git+https://github.com/scipy/scipy_doctest.git@main
194165
```
195166

196167
2. **Register or Load the Plugin**
@@ -202,14 +173,14 @@ To do this, add the following line of code:
202173
```python
203174
# In your conftest.py file or test module
204175

205-
pytest_plugins = "scpdt"
176+
pytest_plugins = "scipy_doctest"
206177
```
207178

208179
Check out the [pytest documentation](https://docs.pytest.org/en/stable/how-to/writing_plugins.html#requiring-loading-plugins-in-a-test-module-or-conftest-file) for more information on requiring/loading plugins in a test module or `conftest.py` file.
209180

210181
3. **Configure your doctesting experience**
211182

212-
An in-depth explanation is given in the [tailoring your doctesting experience](https://github.com/ev-br/scpdt#tailoring-your-doctesting-experience) section.
183+
An in-depth explanation is given in the [tailoring your doctesting experience](https://github.com/scipy/scipy_doctest#tailoring-your-doctesting-experience) section.
213184

214185
4. **Run doctests**
215186

@@ -232,7 +203,7 @@ $ pytest --pyargs <your-package> --doctest-modules --doctest-collect=api
232203

233204
### Tailoring Your Doctesting Experience
234205

235-
[DTConfig](https://github.com/ev-br/scpdt/blob/671083d65b54111770cee71c9bc790ac652d59ab/scpdt/impl.py#L16) offers a variety of attributes that allow you to fine-tune your doctesting experience.
206+
[DTConfig](https://github.com/scipy/scipy_doctest/blob/main/scipy_doctest/impl.py#L23) offers a variety of attributes that allow you to fine-tune your doctesting experience.
236207

237208
These attributes include:
238209
1. **default_namespace (dict):** Defines the namespace in which examples are executed.
@@ -252,16 +223,16 @@ Typically, it is entered for each DocTest (especially in API documentation), ens
252223
12. **nameerror_after_exception (bool):** Controls whether subsequent examples in the same test, after one has failed, may raise spurious NameErrors. Set to `True` if you want to observe these errors or if your test is expected to raise NameErrors. The default is `False`.
253224

254225
To set any of these attributes, create an instance of `DTConfig` called `dt_config`.
255-
This instance is already set as an [attribute of pytest's `Config` object](https://github.com/ev-br/scpdt/blob/671083d65b54111770cee71c9bc790ac652d59ab/scpdt/plugin.py#L27).
226+
This instance is already set as an [attribute of pytest's `Config` object](https://github.com/scipy/scipy_doctest/blob/58ff06a837b7bff1dbac6560013fc6fd07952ae2/scipy_doctest/plugin.py#L39).
256227

257228
**Example:**
258229

259230
```python
260231
dt_config = DTConfig()
261232
dt_config.stopwords = {'plt.', '.hist', '.show'}
262233
dt_config.local_resources = {
263-
'scpdt.tests.local_file_cases.local_files': ['scpdt/tests/local_file.txt'],
264-
'scpdt.tests.local_file_cases.sio': ['scpdt/tests/octave_a.mat']
234+
'scipy_doctest.tests.local_file_cases.local_files': ['scipy_doctest/tests/local_file.txt'],
235+
'scipy_doctest.tests.local_file_cases.sio': ['scipy_doctest/tests/octave_a.mat']
265236
}
266237
dt_config.skiplist = {
267238
'scipy.special.sinc',
@@ -270,7 +241,7 @@ dt_config.skiplist = {
270241
}
271242
```
272243

273-
If you don't set these attributes, the [default settings](https://github.com/ev-br/scpdt/blob/671083d65b54111770cee71c9bc790ac652d59ab/scpdt/impl.py#L73) of the attributes are used.
244+
If you don't set these attributes, the [default settings](https://github.com/scipy/scipy_doctest/blob/58ff06a837b7bff1dbac6560013fc6fd07952ae2/scipy_doctest/impl.py#L94) of the attributes are used.
274245

275246
By following these steps, you will be able to effectively use the Scpdt pytest plugin for doctests in your Python projects.
276247

@@ -299,7 +270,7 @@ instead of `$ pytest --pyargs scipy`.
299270
If push comes to shove, you may try using the magic env variable:
300271
` PY_IGNORE_IMPORTMISMATCH=1 pytest ...`,
301272
however the need usually indicates an issue with the package itself.
302-
(see [gh-107](https://github.com/ev-br/scpdt/pull/107) for an example).
273+
(see [gh-107](https://github.com/scipy/scipy_doctest/pull/107) for an example).
303274

304275
- *Optional dependencies are not that optional*
305276

0 commit comments

Comments
 (0)