Skip to content

Commit

Permalink
Release 1.1.2 (#30)
Browse files Browse the repository at this point in the history
* Remove sdepy version from generated quickguide notebook
* Update readme links and license date
  • Loading branch information
m-cip committed Jan 16, 2021
1 parent 1641ca4 commit b8f93fc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 40 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2018-2020, Maurizio Cipollina.
Copyright (c) 2018-2021, Maurizio Cipollina.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ Start here
----------

- `Installation <https://pypi.org/project/sdepy>`_: ``pip install sdepy``
- `Quick Guide <https://sdepy.readthedocs.io/en/v1.1.1/intro.html#id2>`_
(as `notebook <https://nbviewer.jupyter.org/github/sdepy/sdepy-doc/blob/v1.1.1/quickguide.ipynb>`_)
- `Documentation <https://sdepy.readthedocs.io/en/v1.1.1>`_
(as `pdf <https://readthedocs.org/projects/sdepy/downloads/pdf/v1.1.1>`_)
- `Quick Guide <https://sdepy.readthedocs.io/en/v1.1.2/intro.html#id2>`_
(as `notebook <https://nbviewer.jupyter.org/github/sdepy/sdepy-doc/blob/v1.1.2/quickguide.ipynb>`_)
- `Documentation <https://sdepy.readthedocs.io/en/v1.1.2>`_
(as `pdf <https://readthedocs.org/projects/sdepy/downloads/pdf/v1.1.2>`_)
- `Source <https://github.com/sdepy/sdepy>`_
- `License <https://github.com/sdepy/sdepy/blob/v1.1.1/LICENSE.txt>`_
- `License <https://github.com/sdepy/sdepy/blob/master/LICENSE.txt>`_
- `Bug Reports <https://github.com/sdepy/sdepy/issues>`_


.. |readthedocs| image:: https://readthedocs.org/projects/sdepy/badge/?version=v1.1.1
:target: https://sdepy.readthedocs.io/en/v1.1.1
.. |readthedocs| image:: https://readthedocs.org/projects/sdepy/badge/?version=v1.1.2
:target: https://sdepy.readthedocs.io/en/v1.1.2
:alt: Documentation Status

.. |ci| image:: https://github.com/sdepy/sdepy/workflows/CI/badge.svg?branch=master
.. |ci| image:: https://github.com/sdepy/sdepy/workflows/CI/badge.svg?branch=v1.1.2
:target: https://github.com/sdepy/sdepy/actions

.. |codecov| image:: https://codecov.io/gh/sdepy/sdepy/branch/master/graph/badge.svg
.. |codecov| image:: https://codecov.io/gh/sdepy/sdepy/blob/v1.1.2/graph/badge.svg
:target: https://codecov.io/gh/sdepy/sdepy
2 changes: 1 addition & 1 deletion sdepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
from .tests.shared import _pytest_tester
test = _pytest_tester(__name__)

__version__ = '1.1.2-dev0'
__version__ = '1.1.2'

_exclude = ('sys',
'np', 'numpy', 'scipy',
Expand Down
30 changes: 1 addition & 29 deletions tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,34 +76,6 @@ def corr(a, b=None):
for j in range(n)])


# used to generate quickguide.py in
# versions <= 1.1.0
def getcode(in_, out, mode='w', header=''):
"""
Convert documentation file to python code.
Parse doc file named 'in_', transform doctests
into executable code and the rest into comments,
and save output in file named 'out'.
Inserts 'header' at the top.
"""
in_, out = str(pathlib.Path(in_)), str(pathlib.Path(out))
with open(in_) as i, open(out, mode) as o:
print(header, file=o)
sep = ''
while True:
a = i.readline()
a, EOF = a.strip(), a == ''
if EOF:
break
elif a[:3] in ('>>>', '...'):
print(a[4:], file=o)
sep = '\n\n'
else:
print((sep + '# ' + a) if a else sep + '#', file=o)
sep = ''


def getnotebook(in_, out,
skip=0, header=(), magic='',
to_markdown=lambda x: x,
Expand Down Expand Up @@ -180,7 +152,7 @@ def quickguide_make(execute=True):
out_executed = './dist/quickguide.ipynb'
header = (
'*This file, part of the* [SdePy](https://github.com/sdepy/sdepy) '
'*package* v{},\n'.format(sdepy.__version__),
'*package*,\n',
'*was automatically generated from* `{}`\n'.format(in_),
'\n',
'-----------------------------------------------\n')
Expand Down

0 comments on commit b8f93fc

Please sign in to comment.