Skip to content

Commit 67cd893

Browse files
authored
Merge pull request #37 from pganssle/prepare_build
Prepare for distribution builds
2 parents 4c246d1 + f153d36 commit 67cd893

File tree

7 files changed

+36
-9
lines changed

7 files changed

+36
-9
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@
99
Grid-strategy is a python package that enables the user
1010
organize _matplotlib_ plots using different **grid strategies**.
1111

12-
Abstract
13-
----
12+
## Abstract
1413

1514
This package would add a mechanism for creating a grid of
1615
subplots based on the number of axes to be plotted and
1716
a strategy for how they should be arranged, with some
1817
sensible strategy as the default.
1918

20-
Detailed Description
21-
----
19+
## Detailed Description
2220

2321
It is often the case that you have some number of
2422
plots to display (and this number may be unknown

azure-pipelines.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ strategy:
1616
Black:
1717
python.version: '3.7'
1818
TOXENV: black-check
19+
Docs:
20+
python.version: '3.6'
21+
TOXENV: docs
22+
Build:
23+
python.version: '3.6'
24+
TOXENV: build
1925

2026
variables:
2127
TOXENV: py

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
# Add any paths that contain custom static files (such as style sheets) here,
9292
# relative to this directory. They are copied after the builtin static files,
9393
# so a file named "default.css" will overwrite the builtin "default.css".
94-
html_static_path = ["_static"]
94+
html_static_path = []
9595

9696
# Custom sidebar templates, must be a dictionary that maps document names
9797
# to template names.

docs/requirements-docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Sphinx>=1.7.3,!=1.8.0

setup.cfg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[metadata]
22
name = grid-strategy
33
version = 0.0.1
4+
description = A package for organizing matplotlib plots.
45
author = Grid Strategy Authors
56
author-email = paul@ganssle.io
6-
summary = A package for organizing matplotlib plots.
7-
description = file: README.md
7+
url = https://github.com/matplotlib/grid-strategy
8+
long_description = file: README.md
9+
long_description_content_type = text/markdown
810
license = Apache License 2.0
911
license_file = LICENSE
1012
classifiers =

src/grid_strategy/strategies.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ def get_grid_arrangement(cls, n):
2727
grid would be represented as ``(3, 3)``, because there are 2 rows
2828
of length 3.
2929
30-
Example:
31-
--------
30+
31+
**Example:**
32+
3233
.. code::
34+
3335
>>> GridStrategy.get_grid(7)
3436
(2, 3, 2)
3537
>>> GridStrategy.get_grid(6)

tox.ini

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,21 @@ description = test if black works
3939
deps =
4040
pytest-black
4141
commands = pytest --black
42+
43+
[testenv:docs]
44+
description = invoke sphinx-build to build the HTML docs, check that URIs are valid
45+
basepython = python3.6
46+
deps = -r docs/requirements-docs.txt
47+
commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs \
48+
"{toxworkdir}/docs_out" {posargs:-W --color}
49+
sphinx-build -d "{toxworkdir}/docs_doctree" docs \
50+
"{toxworkdir}/docs_out" {posargs:-W --color -blinkcheck}
51+
52+
[testenv:build]
53+
description = Build the documentation
54+
deps = twine
55+
pep517
56+
readme_renderer[md] >= 24.0
57+
commands = python -m pep517.build --source --binary {toxinidir} \
58+
--out-dir {toxinidir}/dists
59+
twine check {toxinidir}/dists/*

0 commit comments

Comments
 (0)