Skip to content

Commit b7e176a

Browse files
Merge pull request mpmath#578 from skirpichev/cleanup
Cleanup top-level dir & misc fixes
2 parents bd6715d + becbe0d commit b7e176a

File tree

9 files changed

+36
-270
lines changed

9 files changed

+36
-270
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- name: Install libs
1616
run: |
1717
sudo apt update
18-
sudo apt install libmpc-dev
18+
sudo apt install libmpc-dev latexmk texlive-xetex
1919
- name: Install dependencies
2020
run: |
2121
pip install --upgrade --force-reinstall setuptools pip
22-
pip install --upgrade .[develop,gmpy]
22+
pip install --upgrade .[develop,gmpy,docs]
2323
- name: Linting with pycodestyle, etc
2424
run: |
2525
python -We:invalid -m compileall -f mpmath -q
@@ -36,8 +36,22 @@ jobs:
3636
run: |
3737
pytest
3838
codecov --required
39+
- name: Building docs
40+
run: |
41+
python setup.py build_sphinx -c doc/source -b html,latex
42+
make -C build/sphinx/latex all-pdf
3943
- name: Make packages
4044
run: python setup.py sdist bdist_wheel
45+
- name: Archive production artifacts
46+
uses: actions/upload-artifact@v2
47+
if: matrix.python-version == 3.6
48+
with:
49+
path: |
50+
dist/
51+
build/sphinx/html/
52+
build/sphinx/latex/mpmath.pdf
53+
coverage.xml
54+
build/coverage/html/
4155
- name: Publish package on PyPI
4256
if: matrix.python-version == 3.9 && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
4357
uses: pypa/gh-action-pypi-publish@v1.4.2

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# Regular Python bytecode file
1212
*.pyc
13+
__pycache__/
1314

1415
# Optimized Python bytecode file
1516
*.pyo
@@ -57,4 +58,4 @@ mpmath.egg-info/
5758
htmlcov/
5859

5960
# Visual Studio files
60-
.vs/
61+
.vs/

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2005-2018 Fredrik Johansson and mpmath contributors
1+
Copyright (c) 2005-2021 Fredrik Johansson and mpmath contributors
22

33
All rights reserved.
44

MANIFEST.in

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

TODO

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/source/conf.py

Lines changed: 16 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,48 @@
1-
# -*- coding: utf-8 -*-
2-
#
3-
# mpmath documentation build configuration file, created by
4-
# sphinx-quickstart on Sun Apr 13 00:14:30 2008.
5-
#
6-
# This file is execfile()d with the current directory set to its containing dir.
7-
#
8-
# The contents of this file are pickled, so don't put values in the namespace
9-
# that aren't pickleable (module imports are okay, they're removed automatically).
10-
#
11-
# All configuration values have a default value; values that are commented out
12-
# serve to show the default value.
1+
"""
2+
Mpmath documentation build configuration file.
133
14-
import sys
4+
This file is execfile()d with the current directory set to its
5+
containing dir.
156
16-
# If your extensions are in another directory, add it here.
17-
sys.path.insert(0, '../..')
7+
The contents of this file are pickled, so don't put values in the
8+
namespace that aren't pickleable (module imports are okay, they're
9+
removed automatically).
10+
"""
1811

19-
# General configuration
20-
# ---------------------
21-
22-
# Add any Sphinx extension module names here, as strings. They can be extensions
23-
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
24-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax']
12+
import mpmath
2513

26-
# MathJax file, which is free to use. See http://www.mathjax.org/docs/2.0/start.html
27-
# mathjax_path = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full'
2814

29-
# Add any paths that contain templates here, relative to this directory.
30-
templates_path = []
15+
# Add any Sphinx extension module names here, as strings.
16+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax']
3117

3218
# The suffix of source filenames.
3319
source_suffix = '.txt'
3420

3521
# The master toctree document.
3622
master_doc = 'index'
3723

38-
# General substitutions.
24+
# Project information.
3925
project = 'mpmath'
4026
copyright = '2007-2021, Fredrik Johansson and mpmath developers'
41-
42-
# The default replacements for |version| and |release|, also used in various
43-
# other places throughout the built documents.
44-
#
45-
# The short X.Y version.
46-
import mpmath
4727
version = mpmath.__version__
48-
# The full version, including alpha/beta/rc tags.
49-
release = mpmath.__version__
28+
release = version
5029

51-
# There are two options for replacing |today|: either, you set today to some
52-
# non-false value, then it is used:
53-
#today = ''
54-
# Else, today_fmt is used as the format for a strftime call.
30+
# Define how the current time is formatted using time.strftime().
5531
today_fmt = '%B %d, %Y'
5632

57-
# List of documents that shouldn't be included in the build.
58-
#unused_docs = []
59-
60-
# If true, '()' will be appended to :func: etc. cross-reference text.
61-
#add_function_parentheses = True
62-
63-
# If true, the current module name will be prepended to all description
64-
# unit titles (such as .. function::).
65-
#add_module_names = True
66-
67-
# If true, sectionauthor and moduleauthor directives will be shown in the
68-
# output. They are ignored by default.
69-
#show_authors = False
70-
71-
# The name of the Pygments (syntax highlighting) style to use.
72-
pygments_style = 'sphinx'
73-
74-
75-
# Options for HTML output
76-
# -----------------------
77-
7833
# The "theme" that the HTML output should use.
7934
html_theme = 'classic'
8035

81-
# Add any paths that contain custom static files (such as style sheets) here,
82-
# relative to this directory. They are copied after the builtin static files,
83-
# so a file named "default.css" will overwrite the builtin "default.css".
84-
html_static_path = []
85-
86-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
87-
# using the given strftime format.
88-
html_last_updated_fmt = '%b %d, %Y'
89-
90-
# If true, SmartyPants will be used to convert quotes and dashes to
91-
# typographically correct entities.
92-
#html_use_smartypants = True
93-
94-
# Content template for the index page.
95-
#html_index = ''
96-
97-
# Custom sidebar templates, maps document names to template names.
98-
#html_sidebars = {}
99-
100-
# Additional templates that should be rendered to pages, maps page names to
101-
# template names.
102-
#html_additional_pages = {}
103-
104-
# If false, no module index is generated.
105-
#html_use_modindex = True
106-
107-
# If true, the reST sources are included in the HTML build as _sources/<name>.
108-
#html_copy_source = True
109-
11036
# Output file base name for HTML help builder.
11137
htmlhelp_basename = 'mpmathdoc'
11238

113-
114-
# Options for LaTeX output
115-
# ------------------------
116-
117-
# The paper size ('letter' or 'a4').
118-
#latex_paper_size = 'letter'
119-
120-
# The font size ('10pt', '11pt' or '12pt').
121-
#latex_font_size = '10pt'
122-
12339
# Grouping the document tree into LaTeX files. List of tuples
12440
# (source start file, target name, title, author, document class [howto/manual]).
125-
latex_documents = [(master_doc, 'main.tex', 'mpmath documentation',
41+
latex_documents = [(master_doc, 'mpmath.tex', 'mpmath documentation',
12642
r'Fredrik Johansson \and mpmath contributors', 'manual')]
12743

12844
# Additional stuff for the LaTeX preamble.
12945
latex_preamble = r'\usepackage{amsfonts}'
13046

131-
# Documents to append as an appendix to all manuals.
132-
#latex_appendices = []
133-
134-
# If false, no module index is generated.
135-
#latex_use_modindex = True
136-
47+
# The name of default reST role, that is, for text marked up `like this`.
13748
default_role = 'math'
138-
pngmath_dvipng_args = ['-gamma 1.5', '-D 110']

epydoc.conf

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

pkgdocs.sh

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

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ develop = %(tests)s
3737
wheel
3838
gmpy =
3939
gmpy2>=2.1.0a4; platform_python_implementation!="PyPy"
40+
docs = sphinx
4041
[pycodestyle]
4142
select = E101,W191,W291,W293,E111,E112,E113,W292,W391
4243
exclude = .eggs,.git

0 commit comments

Comments
 (0)