Skip to content

Commit 8af50ac

Browse files
authored
Merge pull request #44 from executablebooks/pkg-rename
✨ NEW: Migrate to sphinx-proof
2 parents 9ba9efb + 0e57edc commit 8af50ac

File tree

18 files changed

+66
-83
lines changed

18 files changed

+66
-83
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ jobs:
3434
pip install -e.[testing]
3535
- name: Run pytest
3636
run: |
37-
pytest --duration=10 --cov=sphinxcontrib --cov-report=xml --cov-report=term-missing
37+
pytest --duration=10 --cov=sphinx_proof --cov-report=xml --cov-report=term-missing
3838
- name: Create cov
3939
run: coverage xml
4040
- name: Upload to Codecov
4141
if: matrix.python-version == 3.7
4242
uses: codecov/codecov-action@v1
4343
with:
44-
name: sphinxcontrib-prettyproof-pytest-py3.7
44+
name: sphinx-proof-pytest-py3.7
4545
flags: pytests
4646
file: ./coverage.xml
4747
fail_ci_if_error: true

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ include LICENSE
77
include MANIFEST.in
88
include README.md
99

10-
recursive-include sphinxcontrib *.js
11-
recursive-include sphinxcontrib *.css
10+
recursive-include sphinx_proof *.js
11+
recursive-include sphinx_proof *.css

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sphinxcontrib-prettyproof
1+
# sphinx-proof
22

33
[![Documentation Status][rtd-badge]][rtd-link]
44
[![Github-CI][github-ci]][github-link]
@@ -13,34 +13,34 @@ corollary, algorithm, example, property, observation and proposition directives.
1313

1414
## Get started
1515

16-
To get started with `sphinxcontrib-prettyproof`, first install it through `pip`:
16+
To get started with `sphinx-proof`, first install it through `pip`:
1717

1818
```
19-
pip install sphinxcontrib-prettyproof
19+
pip install sphinx-proof
2020
```
2121

22-
then, add `sphinxcontrib.prettyproof` to your sphinx `extensions` in the `conf.py`
22+
then, add `sphinx_proof` to your sphinx `extensions` in the `conf.py`
2323

2424
```python
2525
...
26-
extensions = ["sphinxcontrib.prettyproof"]
26+
extensions = ["sphinx_proof"]
2727
...
2828
```
2929

3030

3131
## Documentation
3232

33-
See the [Sphinxcontrib Pretty Proof documentation](https://sphinxcontrib-prettyproof.readthedocs.io/en/latest/) for more information.
33+
See the [Sphinx Proof documentation](https://sphinx-proof.readthedocs.io/en/latest/) for more information.
3434

3535

3636
## Contributing
3737

38-
We welcome all contributions! See the [EBP Contributing Guide](https://executablebooks.org/en/latest/contributing.html) for general details, and below for guidance specific to sphinxcontrib-prettyproof.
38+
We welcome all contributions! See the [EBP Contributing Guide](https://executablebooks.org/en/latest/contributing.html) for general details, and below for guidance specific to sphinx-proof.
3939

4040

41-
[rtd-badge]: https://readthedocs.org/projects/sphinxcontrib-prettyproof/badge/?version=latest
42-
[rtd-link]: https://sphinxcontrib-prettyproof.readthedocs.io/en/latest/?badge=latest
43-
[github-ci]: https://github.com/executablebooks/sphinxcontrib-prettyproof/workflows/continuous-integration/badge.svg?branch=master
44-
[github-link]: https://github.com/executablebooks/sphinxcontrib-prettyproof
45-
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinxcontrib-prettyproof/branch/master/graph/badge.svg
46-
[codecov-link]: https://codecov.io/gh/executablebooks/sphinxcontrib-prettyproof
41+
[rtd-badge]: https://readthedocs.org/projects/sphinx-proof/badge/?version=latest
42+
[rtd-link]: https://sphinx-proof.readthedocs.io/en/latest/?badge=latest
43+
[github-ci]: https://github.com/executablebooks/sphinx-proof/workflows/continuous-integration/badge.svg?branch=master
44+
[github-link]: https://github.com/executablebooks/sphinx-proof
45+
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinx-proof/branch/master/graph/badge.svg
46+
[codecov-link]: https://codecov.io/gh/executablebooks/sphinx-proof

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -- Project information -----------------------------------------------------
22

3-
project = "sphinxcontrib-prettyproof"
3+
project = "sphinx-proof"
44
copyright = "2020, QuantEcon Developers"
55
author = "QuantEcon Developers"
66
master_doc = "index"
@@ -11,7 +11,7 @@
1111
# Add any Sphinx extension module names here, as strings. They can be
1212
# extensions coming with Sphinx (named "sphinx.ext.*") or your custom
1313
# ones.
14-
extensions = ["sphinxcontrib.prettyproof", "myst_parser", "sphinxcontrib.bibtex"]
14+
extensions = ["sphinx_proof", "myst_parser", "sphinxcontrib.bibtex"]
1515

1616
# Add any paths that contain templates here, relative to this directory.
1717
templates_path = ["_templates"]
@@ -37,7 +37,7 @@
3737

3838
html_theme_options = {
3939
"path_to_docs": "docs",
40-
"repository_url": "https://github.com/executablebooks/sphinxcontrib-prettyproof",
40+
"repository_url": "https://github.com/executablebooks/sphinx-proof",
4141
"use_edit_page_button": True,
4242
"use_issues_button": True,
4343
"use_repository_button": True,

docs/source/index.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sphinxcontrib-prettyproof
1+
# sphinx-proof
22

33
```{toctree}
44
:hidden:
@@ -21,7 +21,7 @@ corollary, algorithm, example, property, observation and proposition directives.
2121

2222

2323
```{warning}
24-
sphinxcontrib-prettyproof `0.0.2` is in a development stage and may change rapidly.
24+
sphinx-proof `0.0.2` is in a development stage and may change rapidly.
2525
```
2626

2727
**Features**:
@@ -33,40 +33,40 @@ sphinxcontrib-prettyproof `0.0.2` is in a development stage and may change rapid
3333
(getting-started)=
3434
## Getting Started
3535

36-
To get started with `sphinxcontrib-prettyproof`, first install it through `pip`:
36+
To get started with `sphinx-proof`, first install it through `pip`:
3737

3838
```bash
39-
pip install sphinxcontrib-prettyproof
39+
pip install sphinx-proof
4040
```
4141

4242
### JuputerBook Project
4343

44-
Add `sphinxcontrib.prettyproof` to your [extra_extensions](https://jupyterbook.org/advanced/sphinx.html#custom-sphinx-extensions) config in `_config.yml`
44+
Add `sphinx_proof` to your [extra_extensions](https://jupyterbook.org/advanced/sphinx.html#custom-sphinx-extensions) config in `_config.yml`
4545

4646
```yaml
4747
sphinx:
4848
extra_extensions:
49-
- sphinxcontrib.prettyproof
49+
- sphinx_proof
5050
```
5151
5252
you may then use `jb build <project>` and the extension will be used by your `JupyterBook` project.
5353

5454
### Sphinx Project
5555

56-
Add `sphinxcontrib.prettyproof` to your sphinx `extensions` in the `conf.py`
56+
Add `sphinx_proof` to your sphinx `extensions` in the `conf.py`
5757

5858
```python
5959
...
60-
extensions = ["sphinxcontrib.prettyproof"]
60+
extensions = ["sphinx_proof"]
6161
...
6262
```
6363

6464
you may then build using `make html` and the extension will be used by your `Sphinx` project.
6565

6666

67-
[rtd-badge]: https://readthedocs.org/projects/sphinxcontrib-prettyproof/badge/?version=latest
68-
[rtd-link]: https://sphinxcontrib-prettyproof.readthedocs.io/en/latest/?badge=latest
69-
[github-ci]: https://github.com/executablebooks/sphinxcontrib-prettyproof/workflows/continuous-integration/badge.svg?branch=master
70-
[github-link]: https://github.com/executablebooks/sphinxcontrib-prettyproof
71-
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinxcontrib-prettyproof/branch/master/graph/badge.svg
72-
[codecov-link]: https://codecov.io/gh/executablebooks/sphinxcontrib-prettyproof
67+
[rtd-badge]: https://readthedocs.org/projects/sphinx-proof/badge/?version=latest
68+
[rtd-link]: https://sphinx-proof.readthedocs.io/en/latest/?badge=latest
69+
[github-ci]: https://github.com/executablebooks/sphinx-proof/workflows/continuous-integration/badge.svg?branch=master
70+
[github-link]: https://github.com/executablebooks/sphinx-proof
71+
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinx-proof/branch/master/graph/badge.svg
72+
[codecov-link]: https://codecov.io/gh/executablebooks/sphinx-proof

docs/source/install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You can also install directly from the repository to get the latest `development
1010
You can clone the repository:
1111

1212
```bash
13-
git clone https://github.com/executablebooks/sphinxcontrib-prettyproof
13+
git clone https://github.com/executablebooks/sphinx-proof
1414
```
1515

1616
then run:
@@ -21,11 +21,11 @@ python setup.py install
2121

2222
## Package development
2323

24-
To install `sphinxcontrib-prettyproof` for package development:
24+
To install `sphinx-proof` for package development:
2525

2626
```bash
27-
git clone https://github.com/executablebooks/sphinxcontrib-prettyproof
28-
cd sphinxcontrib-prettyproof
27+
git clone https://github.com/executablebooks/sphinx-proof
28+
cd sphinx-proof
2929
git checkout master
3030
pip install -e .[all]
3131
```

docs/source/testing.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
# Testing
22

3-
For code tests, `sphinxcontrib-prettyproof` uses [pytest](https://docs.pytest.org/).
3+
For code tests, `sphinx-proof` uses [pytest](https://docs.pytest.org/).
44

55
Run the tests with the following command:
66

77
```shell
8-
>> cd sphinxcontrib-prettyproof
8+
>> cd sphinx-proof
99
>> pip install -e .[testing]
1010
>> pytest
1111
```
1212

1313
To run the tests in multiple isolated environments, you can also run [tox](https://tox.readthedocs.io/)
1414

1515
```shell
16-
>> cd sphinxcontrib-prettyproof
16+
>> cd sphinx-proof
1717
>> tox
1818
```
1919

2020
To test the build of documentation run
2121

2222
```shell
23-
>> cd sphinxcontrib-prettyproof
23+
>> cd sphinx-proof
2424
>> tox docs-update
2525
```
2626

2727
or
2828

2929
```shell
30-
>> cd sphinxcontrib-prettyproof/docs
30+
>> cd sphinx-proof/docs
3131
>> make clean
3232
>> make html
3333
```
@@ -39,7 +39,7 @@ We use [pytest](https://docs.pytest.org/en/latest/) for testing, [pytest-regress
3939
To run tests with coverage and an html coverage report:
4040

4141
```bash
42-
pytest -v --cov=sphinxcontrib --cov-report=html
42+
pytest -v --cov=sphinx_proof --cov-report=html
4343
```
4444

4545
## Writing Tests
@@ -72,7 +72,7 @@ Installing using `[code style]` will make the [pre-commit](https://pre-commit.co
7272
To install `pre-commit` run the following
7373

7474
```bash
75-
cd sphinxcontrib-prettyproof
75+
cd sphinx-proof
7676
pre-commit install
7777
```
7878

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
SHORT_DESCRIPTION = "A Sphinx extension for producing proofs, theorems, axioms, etc."
1616

17-
BASE_URL = "https://github.com/executablebooks/sphinxcontrib-prettyproof"
17+
BASE_URL = "https://github.com/executablebooks/sphinx-proof"
1818
URL = f"{BASE_URL}/archive/{VERSION}.tar.gz"
1919

2020
# Define all extras
@@ -39,7 +39,7 @@
3939
extras["all"] = set(ii for jj in extras.values() for ii in jj)
4040

4141
setup(
42-
name="sphinxcontrib-prettyproof",
42+
name="sphinx-proof",
4343
version=VERSION,
4444
python_requires=">=3.6",
4545
author="QuantEcon",
@@ -58,5 +58,4 @@
5858
install_requires=["docutils>=0.15", "sphinx", "sphinx-book-theme"],
5959
extras_require=extras,
6060
include_package_data=True,
61-
namespace_packages=["sphinxcontrib"],
6261
)

sphinxcontrib/prettyproof/__init__.py renamed to sphinx_proof/__init__.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
sphinxcontrib.prettyproof
4-
~~~~~~~~~~~~~~~~~~~~~~~~~~
5-
This package is a namespace package that contains all extensions
6-
distributed in the ``sphinx-contrib`` distribution.
7-
:copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
8-
:license: BSD, see LICENSE for details.
3+
sphinx_proof
4+
~~~~~~~~~~~~
5+
6+
A Sphinx extension for producing proofs, theorems, lemmas, etc.
97
"""
108
from pathlib import Path
119
from typing import Any, Dict, Set, Union
@@ -57,9 +55,7 @@ def init_numfig(app: Sphinx, config: Config) -> None:
5755

5856

5957
def copy_asset_files(app: Sphinx, exc: Union[bool, Exception]):
60-
static_path = (
61-
Path(__file__).parent.parent.joinpath("_static", "proof.css").absolute()
62-
)
58+
static_path = Path(__file__).parent.joinpath("_static", "proof.css").absolute()
6359
asset_files = [str(static_path)]
6460

6561
if exc is None:
File renamed without changes.

0 commit comments

Comments
 (0)