Skip to content

Commit 178708f

Browse files
committed
DOC: End of life
Add end-of-life notices to documentation
1 parent d378c12 commit 178708f

File tree

7 files changed

+111
-7
lines changed

7 files changed

+111
-7
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@
44
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/odc5c4ukhru5xicl/branch/master?svg=true)](https://ci.appveyor.com/project/bashtage/ng-numpy-randomstate/branch/master)
55
[![PyPI version](https://badge.fury.io/py/randomstate.svg)](https://badge.fury.io/py/randomstate)
66

7+
# Future development in [randomgen](https://github.com/bashtage/randomgen)
8+
9+
**End-of-life notification**
10+
11+
This library was designed to bring alternative generators to the NumPy
12+
infrastructure. It as been successful in advancing the conversation
13+
for a future implementation of a new random number API in NumPy which
14+
will allow new algorithms and/or generators. The next step
15+
in this process is to separate the basic (or core RNG) from the
16+
functions that transform random bits into useful random numbers.
17+
This has been implemented in a successor project **randomgen**
18+
available on [GitHub](https://github.com/bashtage/randomgen) or
19+
[PyPi](https://pypi.org/project/randomstate/).
20+
21+
[randomgen](https://github.com/bashtage/randomgen) has a slightly different API, so please see the [randomgen documentation](https://bashtage.github.io/randomgen).
22+
23+
24+
-----------------------------------------------------------------------
25+
26+
## Introduction
27+
728
This is a library and generic interface for alternative random
829
generators in Python and NumPy.
930

README.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@ randomstate
33

44
|Travis Build Status| |Appveyor Build Status| |PyPI version|
55

6+
Future development in `randomgen <https://github.com/bashtage/randomgen>`__
7+
===========================================================================
8+
9+
**End-of-life notification**
10+
11+
This library was designed to bring alternative generators to the NumPy
12+
infrastructure. It as been successful in advancing the conversation for
13+
a future implementation of a new random number API in NumPy which will
14+
allow new algorithms and/or generators. The next step in this process is
15+
to separate the basic (or core RNG) from the functions that transform
16+
random bits into useful random numbers. This has been implemented in a
17+
successor project **randomgen** available on
18+
`GitHub <https://github.com/bashtage/randomgen>`__ or
19+
`PyPi <https://pypi.org/project/randomstate/>`__.
20+
21+
`randomgen <https://github.com/bashtage/randomgen>`__ has a slightly
22+
different API, so please see the `randomgen
23+
documentation <https://bashtage.github.io/randomgen>`__.
24+
25+
--------------
26+
27+
Introduction
28+
------------
29+
630
This is a library and generic interface for alternative random
731
generators in Python and NumPy.
832

doc/source/conf.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
# built documents.
6565
#
6666
# The short X.Y version.
67-
version = '.'.join(map(str,LooseVersion(randomstate.__version__).version[:2]))
67+
version = '.'.join(map(str, LooseVersion(randomstate.__version__).version[:2]))
6868
# The full version, including alpha/beta/rc tags.
6969
release = randomstate.__version__
7070

@@ -145,6 +145,9 @@
145145

146146
# The name of an image file (relative to this directory) to place at the top
147147
# of the sidebar.
148+
html_sidebars = {
149+
'**': ['logo-text.html', 'globaltoc.html', 'searchbox.html']
150+
}
148151
#html_logo = None
149152

150153
# The name of an image file (within the static path) to use as favicon of the
@@ -245,8 +248,8 @@
245248
# (source start file, target name, title,
246249
# author, documentclass [howto, manual, or own class]).
247250
latex_documents = [
248-
(master_doc, 'randomstate.tex', 'randomstate Documentation',
249-
'Kevin Sheppard', 'manual'),
251+
(master_doc, 'randomstate.tex', 'randomstate Documentation',
252+
'Kevin Sheppard', 'manual'),
250253
]
251254

252255
# The name of an image file (relative to this directory) to place at the top of
@@ -289,9 +292,9 @@
289292
# (source start file, target name, title, author,
290293
# dir menu entry, description, category)
291294
texinfo_documents = [
292-
(master_doc, 'randomstate', 'randomstate Documentation',
293-
author, 'randomstate', 'NumPy-like random number generation supporting multiple core PRNG.',
294-
'Random Numbers'),
295+
(master_doc, 'randomstate', 'randomstate Documentation',
296+
author, 'randomstate', 'NumPy-like random number generation supporting multiple core PRNG.',
297+
'Random Numbers'),
295298
]
296299

297300
# Documents to append as an appendix to all manuals.
@@ -306,4 +309,4 @@
306309
# If true, do not generate a @detailmenu in the "Top" node's menu.
307310
#texinfo_no_detailmenu = False
308311

309-
autosummary_generate = True
312+
autosummary_generate = True

doc/source/index.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
randomstate's documentation
22
===========================
3+
4+
.. warning::
5+
6+
**End-of-life notification**
7+
8+
This library was designed to bring alternative generators to the NumPy
9+
infrastructure. It as been successful in advancing the conversation
10+
for a future implementation of a new random number API in NumPy which
11+
will allow new algorithms and/or generators. The next step
12+
in this process is to separate the basic (or core RNG) from the
13+
functions that transform random bits into useful random numbers.
14+
This has been implemented in a successor project **randomgen**
15+
available on `GitHub`_ or `PyPi`_.
16+
17+
`randomgen`_ has a slightly different API, so please see the `randomgen documentation`_.
18+
19+
.. _`GitHub`: https://github.com/bashtage/randomgen
20+
.. _`PyPi`: https://pypi.org/project/randomstate/
21+
.. _`randomgen`: https://github.com/bashtage/randomgen
22+
.. _`randomgen documentation`: https://bashtage.github.io/randomgen
23+
24+
325
This package contains drop-in replacements for the NumPy RandomState object
426
that change the core random number generator.
527

randomstate/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@
5959
"""
6060
from __future__ import division, absolute_import, print_function
6161

62+
import warnings
63+
64+
from randomstate._deprecated import (DEPRECATION_MESSAGE,
65+
RandomStateDeprecationWarning)
66+
warnings.warn(DEPRECATION_MESSAGE, RandomStateDeprecationWarning)
67+
6268
from randomstate.prng.mt19937 import *
6369
from randomstate.entropy import random_entropy
6470
import randomstate.prng

randomstate/_deprecated.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
DEPRECATION_MESSAGE = """
2+
**End-of-life notification**
3+
4+
This library was designed to bring alternative generators to the NumPy
5+
infrastructure. It as been successful in advancing the conversation
6+
for a future implementation of a new random number API in NumPy which
7+
will allow new algorithms and/or generators. The next step
8+
in this process is to separate the basic (or core RNG) from the
9+
functions that transform random bits into useful random numbers.
10+
This has been implemented in a successor project **randomgen**
11+
available on GitHub
12+
13+
https://github.com/bashtage/randomgen
14+
15+
or PyPi
16+
17+
https://pypi.org/project/randomstate/.
18+
19+
randomgen has a slightly different API, so please see the randomgen documentation
20+
21+
https://bashtage.github.io/randomgen.
22+
"""
23+
24+
25+
class RandomStateDeprecationWarning(Warning):
26+
pass

randomstate/randomstate.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ from cpython cimport Py_INCREF, PyComplex_FromDoubles, PyComplex_RealAsDouble, \
2222

2323

2424
import randomstate
25+
from randomstate._deprecated import (DEPRECATION_MESSAGE,
26+
RandomStateDeprecationWarning)
2527
from binomial cimport binomial_t
2628
from randomstate.entropy import random_entropy
2729

0 commit comments

Comments
 (0)