Skip to content

Commit

Permalink
Merge pull request #44 from executablebooks/pkg-rename
Browse files Browse the repository at this point in the history
✨ NEW: Migrate to sphinx-proof
  • Loading branch information
najuzilu committed Oct 9, 2020
2 parents 9ba9efb + 0e57edc commit 8af50ac
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
pip install -e.[testing]
- name: Run pytest
run: |
pytest --duration=10 --cov=sphinxcontrib --cov-report=xml --cov-report=term-missing
pytest --duration=10 --cov=sphinx_proof --cov-report=xml --cov-report=term-missing
- name: Create cov
run: coverage xml
- name: Upload to Codecov
if: matrix.python-version == 3.7
uses: codecov/codecov-action@v1
with:
name: sphinxcontrib-prettyproof-pytest-py3.7
name: sphinx-proof-pytest-py3.7
flags: pytests
file: ./coverage.xml
fail_ci_if_error: true
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ include LICENSE
include MANIFEST.in
include README.md

recursive-include sphinxcontrib *.js
recursive-include sphinxcontrib *.css
recursive-include sphinx_proof *.js
recursive-include sphinx_proof *.css
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sphinxcontrib-prettyproof
# sphinx-proof

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

## Get started

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

```
pip install sphinxcontrib-prettyproof
pip install sphinx-proof
```

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

```python
...
extensions = ["sphinxcontrib.prettyproof"]
extensions = ["sphinx_proof"]
...
```


## Documentation

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


## Contributing

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.
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.


[rtd-badge]: https://readthedocs.org/projects/sphinxcontrib-prettyproof/badge/?version=latest
[rtd-link]: https://sphinxcontrib-prettyproof.readthedocs.io/en/latest/?badge=latest
[github-ci]: https://github.com/executablebooks/sphinxcontrib-prettyproof/workflows/continuous-integration/badge.svg?branch=master
[github-link]: https://github.com/executablebooks/sphinxcontrib-prettyproof
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinxcontrib-prettyproof/branch/master/graph/badge.svg
[codecov-link]: https://codecov.io/gh/executablebooks/sphinxcontrib-prettyproof
[rtd-badge]: https://readthedocs.org/projects/sphinx-proof/badge/?version=latest
[rtd-link]: https://sphinx-proof.readthedocs.io/en/latest/?badge=latest
[github-ci]: https://github.com/executablebooks/sphinx-proof/workflows/continuous-integration/badge.svg?branch=master
[github-link]: https://github.com/executablebooks/sphinx-proof
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinx-proof/branch/master/graph/badge.svg
[codecov-link]: https://codecov.io/gh/executablebooks/sphinx-proof
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -- Project information -----------------------------------------------------

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

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

html_theme_options = {
"path_to_docs": "docs",
"repository_url": "https://github.com/executablebooks/sphinxcontrib-prettyproof",
"repository_url": "https://github.com/executablebooks/sphinx-proof",
"use_edit_page_button": True,
"use_issues_button": True,
"use_repository_button": True,
Expand Down
28 changes: 14 additions & 14 deletions docs/source/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sphinxcontrib-prettyproof
# sphinx-proof

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


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

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

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

```bash
pip install sphinxcontrib-prettyproof
pip install sphinx-proof
```

### JuputerBook Project

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

```yaml
sphinx:
extra_extensions:
- sphinxcontrib.prettyproof
- sphinx_proof
```

you may then use `jb build <project>` and the extension will be used by your `JupyterBook` project.

### Sphinx Project

Add `sphinxcontrib.prettyproof` to your sphinx `extensions` in the `conf.py`
Add `sphinx_proof` to your sphinx `extensions` in the `conf.py`

```python
...
extensions = ["sphinxcontrib.prettyproof"]
extensions = ["sphinx_proof"]
...
```

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


[rtd-badge]: https://readthedocs.org/projects/sphinxcontrib-prettyproof/badge/?version=latest
[rtd-link]: https://sphinxcontrib-prettyproof.readthedocs.io/en/latest/?badge=latest
[github-ci]: https://github.com/executablebooks/sphinxcontrib-prettyproof/workflows/continuous-integration/badge.svg?branch=master
[github-link]: https://github.com/executablebooks/sphinxcontrib-prettyproof
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinxcontrib-prettyproof/branch/master/graph/badge.svg
[codecov-link]: https://codecov.io/gh/executablebooks/sphinxcontrib-prettyproof
[rtd-badge]: https://readthedocs.org/projects/sphinx-proof/badge/?version=latest
[rtd-link]: https://sphinx-proof.readthedocs.io/en/latest/?badge=latest
[github-ci]: https://github.com/executablebooks/sphinx-proof/workflows/continuous-integration/badge.svg?branch=master
[github-link]: https://github.com/executablebooks/sphinx-proof
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinx-proof/branch/master/graph/badge.svg
[codecov-link]: https://codecov.io/gh/executablebooks/sphinx-proof
8 changes: 4 additions & 4 deletions docs/source/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can also install directly from the repository to get the latest `development
You can clone the repository:

```bash
git clone https://github.com/executablebooks/sphinxcontrib-prettyproof
git clone https://github.com/executablebooks/sphinx-proof
```

then run:
Expand All @@ -21,11 +21,11 @@ python setup.py install

## Package development

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

```bash
git clone https://github.com/executablebooks/sphinxcontrib-prettyproof
cd sphinxcontrib-prettyproof
git clone https://github.com/executablebooks/sphinx-proof
cd sphinx-proof
git checkout master
pip install -e .[all]
```
14 changes: 7 additions & 7 deletions docs/source/testing.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Testing

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

Run the tests with the following command:

```shell
>> cd sphinxcontrib-prettyproof
>> cd sphinx-proof
>> pip install -e .[testing]
>> pytest
```

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

```shell
>> cd sphinxcontrib-prettyproof
>> cd sphinx-proof
>> tox
```

To test the build of documentation run

```shell
>> cd sphinxcontrib-prettyproof
>> cd sphinx-proof
>> tox docs-update
```

or

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

```bash
pytest -v --cov=sphinxcontrib --cov-report=html
pytest -v --cov=sphinx_proof --cov-report=html
```

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

```bash
cd sphinxcontrib-prettyproof
cd sphinx-proof
pre-commit install
```

Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

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

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

setup(
name="sphinxcontrib-prettyproof",
name="sphinx-proof",
version=VERSION,
python_requires=">=3.6",
author="QuantEcon",
Expand All @@ -58,5 +58,4 @@
install_requires=["docutils>=0.15", "sphinx", "sphinx-book-theme"],
extras_require=extras,
include_package_data=True,
namespace_packages=["sphinxcontrib"],
)
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# -*- coding: utf-8 -*-
"""
sphinxcontrib.prettyproof
~~~~~~~~~~~~~~~~~~~~~~~~~~
This package is a namespace package that contains all extensions
distributed in the ``sphinx-contrib`` distribution.
:copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
sphinx_proof
~~~~~~~~~~~~
A Sphinx extension for producing proofs, theorems, lemmas, etc.
"""
from pathlib import Path
from typing import Any, Dict, Set, Union
Expand Down Expand Up @@ -57,9 +55,7 @@ def init_numfig(app: Sphinx, config: Config) -> None:


def copy_asset_files(app: Sphinx, exc: Union[bool, Exception]):
static_path = (
Path(__file__).parent.parent.joinpath("_static", "proof.css").absolute()
)
static_path = Path(__file__).parent.joinpath("_static", "proof.css").absolute()
asset_files = [str(static_path)]

if exc is None:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
sphinxcontrib.prettyproof.directive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sphinx_proof.directive
~~~~~~~~~~~~~~~~~~~~~~
A custom Sphinx Directive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
sphinxcontrib.prettyproof.domain
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sphinx_proof.domain
~~~~~~~~~~~~~~~~~~~
A Proof Sphinx Domain
Expand Down
4 changes: 2 additions & 2 deletions sphinxcontrib/prettyproof/nodes.py → sphinx_proof/nodes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
sphinxcontrib.prettyproof.nodes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sphinx_proof.nodes
~~~~~~~~~~~~~~~~~~
Enumerable and unenumerable nodes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
sphinxcontrib.prettyproof.proof_type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sphinx_proof.proof_type
~~~~~~~~~~~~~~~~~~~~~~~
List of proof-type directives
Expand Down
12 changes: 0 additions & 12 deletions sphinxcontrib/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/books/test-duplicatelabel/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# -- Project information -----------------------------------------------------

project = "sphinxcontrib-prettyproof Test"
project = "sphinx-proof Test"
copyright = "2020, QuantEcon Developers"
author = "QuantEcon Developers"

Expand All @@ -27,7 +27,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinxcontrib.prettyproof", "myst_parser"]
extensions = ["sphinx_proof", "myst_parser"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
4 changes: 2 additions & 2 deletions tests/books/test-missingref/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# -- Project information -----------------------------------------------------

project = "sphinxcontrib-prettyproof Test"
project = "sphinx-proof Test"
copyright = "2020, QuantEcon Developers"
author = "QuantEcon Developers"

Expand All @@ -27,7 +27,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinxcontrib.prettyproof", "myst_parser"]
extensions = ["sphinx_proof", "myst_parser"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down

0 comments on commit 8af50ac

Please sign in to comment.