Skip to content

Commit 778914c

Browse files
authored
Merge pull request #82 from tomography/0.5.x
REL: 0.5.5
2 parents 2ab9f58 + aec3112 commit 778914c

File tree

16 files changed

+193
-352
lines changed

16 files changed

+193
-352
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Test pull requests
5+
6+
on: pull_request
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.8", "3.9", "3.10"]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install flake8 pytest
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
python -m pip install .
29+
- name: Lint with flake8
30+
run: |
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35+
- name: Test with pytest
36+
run: |
37+
pytest

azure-pipelines.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

docs/source/api/xdesign.geometry.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Two dimensional entities
5353
Curve
5454
Circle
5555
Polygon
56+
RegularPolygon
5657
Triangle
5758
Rectangle
5859
Square

docs/source/conf.py

Lines changed: 33 additions & 182 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@
3434
'sphinx.ext.autosummary',
3535
'sphinx.ext.doctest',
3636
'sphinx.ext.intersphinx',
37-
'sphinx.ext.todo',
38-
'sphinx.ext.coverage',
39-
'sphinx.ext.mathjax',
40-
'sphinx.ext.ifconfig',
41-
'sphinx.ext.viewcode',
4237
'sphinx.ext.napoleon',
38+
'sphinx.ext.viewcode',
39+
'sphinx.ext.todo',
4340
'sphinxcontrib.bibtex',
4441
'nbsphinx',
45-
'IPython.sphinxext.ipython_console_highlighting',
42+
]
43+
44+
bibtex_bibfiles = [
45+
'bibtex/refs.bib',
46+
'bibtex/cite.bib',
4647
]
4748

4849
# Napoleon settings
@@ -57,6 +58,9 @@
5758
napoleon_use_param = False
5859
napoleon_use_rtype = False
5960

61+
# Bibtex settings
62+
bibtex_bibfiles = ['bibtex/cite.bib', 'bibtex/refs.bib']
63+
6064
# Add any paths that contain templates here, relative to this directory.
6165
templates_path = ['_templates']
6266

@@ -76,55 +80,17 @@
7680
copyright = u'2016, UChicago Argonne, LLC'
7781
author = u'Doga Gursoy'
7882

79-
# The version info for the project you're documenting, acts as replacement for
80-
# |version| and |release|, also used in various other places throughout the
81-
# built documents.
82-
#
83-
# The short X.Y version.
84-
# The full version, including alpha/beta/rc tags.
85-
# release = '0.3'
86-
87-
# The language for content autogenerated by Sphinx. Refer to documentation
88-
# for a list of supported languages.
89-
#
90-
# This is also used if you do content translation via gettext catalogs.
91-
# Usually you set "language" from the command line for these cases.
92-
language = None
93-
94-
# There are two options for replacing |today|: either, you set today to some
95-
# non-false value, then it is used:
96-
#today = ''
97-
# Else, today_fmt is used as the format for a strftime call.
98-
#today_fmt = '%B %d, %Y'
99-
10083
# List of patterns, relative to source directory, that match files and
10184
# directories to ignore when looking for source files.
10285
exclude_patterns = ['_build', '**.ipynb_checkpoints']
10386

104-
# The reST default role (used for this markup: `text`) to use for all
105-
# documents.
106-
#default_role = None
107-
108-
# If true, '()' will be appended to :func: etc. cross-reference text.
109-
#add_function_parentheses = True
110-
111-
# If true, the current module name will be prepended to all description
112-
# unit titles (such as .. function::).
113-
#add_module_names = True
114-
11587
# If true, sectionauthor and moduleauthor directives will be shown in the
11688
# output. They are ignored by default.
117-
#show_authors = False
89+
show_authors = True
11890

11991
# The name of the Pygments (syntax highlighting) style to use.
12092
pygments_style = 'sphinx'
12193

122-
# A list of ignored prefixes for module index sorting.
123-
#modindex_common_prefix = []
124-
125-
# If true, keep warnings as "system message" paragraphs in the built documents.
126-
#keep_warnings = False
127-
12894
# If true, `todo` and `todoList` produce output, else they produce nothing.
12995
todo_include_todos = True
13096

@@ -151,16 +117,6 @@
151117
"display_version": True,
152118
}
153119

154-
# Add any paths that contain custom themes here, relative to this directory.
155-
#html_theme_path = []
156-
157-
# The name for this set of Sphinx documents. If None, it defaults to
158-
# "<project> v<release> documentation".
159-
#html_title = None
160-
161-
# A shorter title for the navigation bar. Default is the same as html_title.
162-
#html_short_title = None
163-
164120
# The name of an image file (relative to this directory) to place at the top
165121
# of the sidebar.
166122
#html_logo = None
@@ -170,149 +126,44 @@
170126
# pixels large.
171127
#html_favicon = None
172128

173-
# Add any paths that contain custom static files (such as style sheets) here,
174-
# relative to this directory. They are copied after the builtin static files,
175-
# so a file named "default.css" will overwrite the builtin "default.css".
176-
# html_static_path = ['_static']
177-
178-
# Add any extra paths that contain custom files (such as robots.txt or
179-
# .htaccess) here, relative to this directory. These files are copied
180-
# directly to the root of the documentation.
181-
#html_extra_path = []
182-
183-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
184-
# using the given strftime format.
185-
#html_last_updated_fmt = '%b %d, %Y'
186-
187-
# If true, SmartyPants will be used to convert quotes and dashes to
188-
# typographically correct entities.
189-
#html_use_smartypants = True
190-
191-
# Custom sidebar templates, maps document names to template names.
192-
#html_sidebars = {}
193-
194-
# Additional templates that should be rendered to pages, maps page names to
195-
# template names.
196-
#html_additional_pages = {}
197-
198-
# If false, no module index is generated.
199-
#html_domain_indices = True
200-
201-
# If false, no index is generated.
202-
#html_use_index = True
203-
204-
# If true, the index is split into individual pages for each letter.
205-
#html_split_index = False
206-
207-
# If true, links to the reST sources are added to the pages.
208-
#html_show_sourcelink = True
209-
210-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
211-
#html_show_sphinx = True
212-
213-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
214-
#html_show_copyright = True
215-
216-
# If true, an OpenSearch description file will be output, and all pages will
217-
# contain a <link> tag referring to it. The value of this option must be the
218-
# base URL from which the finished HTML is served.
219-
#html_use_opensearch = ''
220-
221-
# This is the file name suffix for HTML files (e.g. ".xhtml").
222-
#html_file_suffix = None
223-
224129
# Language to be used for generating the HTML full-text search index.
225130
# Sphinx supports the following languages:
226131
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
227132
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
228-
#html_search_language = 'en'
229-
230-
# A dictionary with options for the search language support, empty by default.
231-
# Now only 'ja' uses this config value
232-
#html_search_options = {'type': 'default'}
233-
234-
# The name of a javascript file (relative to the configuration directory) that
235-
# implements a search results scorer. If empty, the default will be used.
236-
#html_search_scorer = 'scorer.js'
133+
html_search_language = 'en'
237134

238135
# Output file base name for HTML help builder.
239136
htmlhelp_basename = 'xdesigndoc'
240137

241-
# -- Options for LaTeX output ---------------------------------------------
242-
243-
latex_elements = {
244-
# The paper size ('letterpaper' or 'a4paper').
245-
#'papersize': 'letterpaper',
246-
247-
# The font size ('10pt', '11pt' or '12pt').
248-
#'pointsize': '10pt',
249-
250-
# Additional stuff for the LaTeX preamble.
251-
#'preamble': '',
252-
253-
# Latex figure (float) alignment
254-
#'figure_align': 'htbp',
255-
}
256-
257-
# Grouping the document tree into LaTeX files. List of tuples
258-
# (source start file, target name, title,
259-
# author, documentclass [howto, manual, or own class]).
260-
latex_documents = [
261-
(master_doc, 'xdesign.tex', u'XDesign Documentation', copyright, 'manual'),
138+
nbsphinx_execute_arguments = [
139+
"--InlineBackend.figure_formats={'svg', 'pdf'}",
140+
"--InlineBackend.rc={'figure.dpi': 96}",
262141
]
263142

264-
# The name of an image file (relative to this directory) to place at the top of
265-
# the title page.
266-
#latex_logo = None
267-
268-
# For "manual" documents, if this is true, then toplevel headings are parts,
269-
# not chapters.
270-
#latex_use_parts = False
271-
272-
# If true, show page references after internal links.
273-
#latex_show_pagerefs = False
143+
# This is processed by Jinja2 and inserted before each notebook
144+
nbsphinx_prolog = r"""
145+
{% set docname = env.doc2path(env.docname, base='docs/source') %}
274146
275-
# If true, show URL addresses after external links.
276-
#latex_show_urls = False
147+
.. only:: html
277148
278-
# Documents to append as an appendix to all manuals.
279-
#latex_appendices = []
149+
.. role:: raw-html(raw)
150+
:format: html
280151
281-
# If false, no module index is generated.
282-
#latex_domain_indices = True
283-
284-
# -- Options for manual page output ---------------------------------------
285-
286-
# One entry per manual page. List of tuples
287-
# (source start file, name, description, authors, manual section).
288-
man_pages = [(master_doc, 'xdesign', u'XDesign Documentation', [author], 1)]
289-
290-
# If true, show URL addresses after external links.
291-
#man_show_urls = False
292-
293-
# -- Options for Texinfo output -------------------------------------------
294-
295-
# Grouping the document tree into Texinfo files. List of tuples
296-
# (source start file, target name, title, author,
297-
# dir menu entry, description, category)
298-
texinfo_documents = [
299-
(
300-
master_doc, 'xdesign', u'XDesign Documentation', author, copyright,
301-
'Benchmarking tools for tomography.', 'Miscellaneous'
302-
),
303-
]
152+
.. nbinfo::
304153
305-
# Documents to append as an appendix to all manuals.
306-
#texinfo_appendices = []
154+
This page was generated from `{{ docname }}`__.
155+
Interactive online version:
156+
:raw-html:`<a href="https://mybinder.org/v2/gh/tomography/xdesign/{{ env.config.release }}?filepath={{ docname }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a>`
307157
308-
# If false, no module index is generated.
309-
# texinfo_domain_indices = True
158+
__ https://github.com/tomography/xdesign/blob/
159+
{{ env.config.release }}/{{ docname }}
310160
311-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
312-
# texinfo_show_urls = 'footnote'
161+
.. raw:: latex
313162
314-
# If true, do not generate a @detailmenu in the "Top" node's menu.
315-
# texinfo_no_detailmenu = False
163+
\nbsphinxstartnotebook{\scriptsize\noindent\strut
164+
\textcolor{gray}{The following section was generated from
165+
\sphinxcode{\sphinxupquote{\strut {{ docname | escape_latex }}}} \dotfill}}
166+
"""
316167

317168
# Example configuration for intersphinx: refer to the Python standard library.
318169
intersphinx_mapping = {
@@ -339,13 +190,13 @@ def __getattr__(cls, name):
339190
'matplotlib.patheffects',
340191
'matplotlib.axis',
341192
'matplotlib.collections',
193+
'matplotlib.colors',
342194
'cached_property',
343195
'scipy',
344196
'scipy.stats',
345197
'scipy.ndimage',
346198
'scipy.spatial',
347199
'cycler',
348-
'phasepack',
349200
]
350201

351202
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

docs/source/examples.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,3 @@ To `run <http://jupyter.readthedocs.org/en/latest/running.html>`_ these examples
1616
demos/Parameterized
1717
demos/NoReferenceMetrics
1818
demos/FullReferenceMetrics
19-
demos/WetCircles
20-
21-
22-
23-
.. automodule:: xdesign
24-
:members:
25-
:undoc-members:
26-
:show-inheritance:

0 commit comments

Comments
 (0)