Skip to content

Commit

Permalink
Merge pull request #37 from pganssle/prepare_build
Browse files Browse the repository at this point in the history
Prepare for distribution builds
  • Loading branch information
pganssle committed Feb 24, 2019
2 parents 4c246d1 + f153d36 commit 67cd893
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 9 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@
Grid-strategy is a python package that enables the user
organize _matplotlib_ plots using different **grid strategies**.

Abstract
----
## Abstract

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

Detailed Description
----
## Detailed Description

It is often the case that you have some number of
plots to display (and this number may be unknown
Expand Down
6 changes: 6 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ strategy:
Black:
python.version: '3.7'
TOXENV: black-check
Docs:
python.version: '3.6'
TOXENV: docs
Build:
python.version: '3.6'
TOXENV: build

variables:
TOXENV: py
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
1 change: 1 addition & 0 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sphinx>=1.7.3,!=1.8.0
6 changes: 4 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[metadata]
name = grid-strategy
version = 0.0.1
description = A package for organizing matplotlib plots.
author = Grid Strategy Authors
author-email = paul@ganssle.io
summary = A package for organizing matplotlib plots.
description = file: README.md
url = https://github.com/matplotlib/grid-strategy
long_description = file: README.md
long_description_content_type = text/markdown
license = Apache License 2.0
license_file = LICENSE
classifiers =
Expand Down
6 changes: 4 additions & 2 deletions src/grid_strategy/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ def get_grid_arrangement(cls, n):
grid would be represented as ``(3, 3)``, because there are 2 rows
of length 3.
Example:
--------
**Example:**
.. code::
>>> GridStrategy.get_grid(7)
(2, 3, 2)
>>> GridStrategy.get_grid(6)
Expand Down
18 changes: 18 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,21 @@ description = test if black works
deps =
pytest-black
commands = pytest --black

[testenv:docs]
description = invoke sphinx-build to build the HTML docs, check that URIs are valid
basepython = python3.6
deps = -r docs/requirements-docs.txt
commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs \
"{toxworkdir}/docs_out" {posargs:-W --color}
sphinx-build -d "{toxworkdir}/docs_doctree" docs \
"{toxworkdir}/docs_out" {posargs:-W --color -blinkcheck}

[testenv:build]
description = Build the documentation
deps = twine
pep517
readme_renderer[md] >= 24.0
commands = python -m pep517.build --source --binary {toxinidir} \
--out-dir {toxinidir}/dists
twine check {toxinidir}/dists/*

0 comments on commit 67cd893

Please sign in to comment.