diff --git a/README.rst b/README.rst index 7b2e71b1..d749e85d 100644 --- a/README.rst +++ b/README.rst @@ -28,13 +28,13 @@ performs constant folding, and it can compile its expressions into Python bytecode for fast(er) execution. If you are looking for a full-blown Computer Algebra System, look at -`sympy `_ or -`PyGinac `_. If you are looking for a +`sympy `__ or +`PyGinac `__. If you are looking for a basic, small and extensible set of symbolic operations, pymbolic may well be for you. Resources: -* `documentation `_ -* `download `_ (via the package index) -* `source code via git `_ (also bug tracker) +* `PyPI package `__ +* `Documentation `__ +* `Source code (GitHub) `__ diff --git a/doc/index.rst b/doc/index.rst index 6dce626d..fb159ba4 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -101,9 +101,9 @@ As a final example, we can now derive from *MyMapper* to multiply all Pymbolic around the web ----------------------- -* `download `_ (via the package index) -* `documentation `_ -* `source code via git `_ (also bug tracker) +* `PyPI package `__ +* `Documentation `__ +* `Source code (GitHub) `__ Contents -------- diff --git a/doc/misc.rst b/doc/misc.rst index 28e9ec93..eacd0b18 100644 --- a/doc/misc.rst +++ b/doc/misc.rst @@ -5,17 +5,23 @@ This command should install :mod:`pymbolic`:: pip install pymbolic -You may need to run this with :command:`sudo`. -If you don't already have `pip `_, +You may need to run this with :command:`sudo` if you are not in a virtual environment +(not recommended). If you don't already have `pip `__, run this beforehand:: - curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py - python get-pip.py + python -m ensurepip -For a more manual installation, download the source, unpack it, -and say:: +For a more manual installation, download the source, unpack it, and run:: - python setup.py install + pip install . + +This should also install all the required dependencies (see ``pyproject.toml`` +for a complete list). + +For development, you may want to install in `editable mode +`__:: + + pip install --no-build-isolation --editable .[test] Why pymbolic when there's already sympy? ======================================== @@ -65,10 +71,10 @@ At any rate, to answer your question, here goes: This part is a bit of a red herring though, since this can be implemented for sympy (and, in fact, `I have - `_). + `__). Also, I noticed that sympy's codegen module implements something similar (e.g. `here - `_). + `__). The remaining issue is that most of sympy's behaviors aren't available to extend in this style. @@ -98,7 +104,7 @@ Version 2015.3 .. note:: This version is currently under development. You can get snapshots from - Pymbolic's `git repository `_ + Pymbolic's `git repository `__ * Add :mod:`pymbolic.geometric_algebra`. * First documented version. @@ -133,19 +139,13 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Frequently Asked Questions -========================== - -The FAQ is maintained collaboratively on the -`Wiki FAQ page `_. - Glossary ======== .. glossary:: mix-in - See `Wikipedia article `_. + See `Wikipedia article `__. Be sure to mention the mix-in before the base classe being mixed in the list of base classes. This way, the mix-in can override base class diff --git a/pymbolic/algorithm.py b/pymbolic/algorithm.py index a3ae005f..1d9b7077 100644 --- a/pymbolic/algorithm.py +++ b/pymbolic/algorithm.py @@ -28,7 +28,7 @@ def integer_power(x, n, one=1): """Compute :math:`x^n` using only multiplications. - See also the `C2 wiki `_. + See also the `C2 wiki `__. """ assert isinstance(n, int) @@ -60,7 +60,7 @@ def extended_euclidean(q, r): See also the `Wikipedia article on the Euclidean algorithm - `_. + `__. """ import pymbolic.traits as traits @@ -138,7 +138,7 @@ def fft(x, sign=1, where :math:`z = \exp(-2i\pi\operatorname{sign}/n)` and ``n == len(x)``. Works for all positive *n*. - See also `Wikipedia `_. + See also `Wikipedia `__. """ # revision 293076305 diff --git a/pymbolic/compiler.py b/pymbolic/compiler.py index a5b37781..9880e91b 100644 --- a/pymbolic/compiler.py +++ b/pymbolic/compiler.py @@ -30,7 +30,7 @@ class CompileMapper(StringifyMapper): def map_constant(self, expr, enclosing_prec): # work around numpy bug #1137 (locale-sensitive repr) - # http://projects.scipy.org/numpy/ticket/1137 + # https://github.com/numpy/numpy/issues/1735 try: import numpy except ImportError: diff --git a/pymbolic/geometric_algebra/__init__.py b/pymbolic/geometric_algebra/__init__.py index bf058333..dcffc8d4 100644 --- a/pymbolic/geometric_algebra/__init__.py +++ b/pymbolic/geometric_algebra/__init__.py @@ -25,7 +25,7 @@ __doc__ = """ -See `Wikipedia `_ for an idea +See `Wikipedia `__ for an idea of what this is. .. versionadded:: 2013.2 @@ -139,7 +139,7 @@ def permutation_sign(p): def bit_count(i): """Count the number of set bits in *i*.""" - # nicked from http://wiki.python.org/moin/BitManipulation + # nicked from https://wiki.python.org/moin/BitManipulation count = 0 while i: @@ -408,11 +408,11 @@ class MultiVector: [DFM] L. Dorst, D. Fontijne, and S. Mann, `Geometric Algebra for Computer Science: An Object-Oriented Approach to Geometry - `_. Morgan Kaufmann, 2010. + `__. Morgan Kaufmann, 2010. [HS] D. Hestenes and G. Sobczyk, `Clifford Algebra to Geometric Calculus: A Unified Language for Mathematics and Physics - `_. Springer, 1987. + `__. Springer, 1987. The object behaves much like the corresponding :class:`galgebra.mv.Mv` object in :mod:`galgebra`, especially with respect to the supported diff --git a/pymbolic/imperative/utils.py b/pymbolic/imperative/utils.py index 5041ef1f..e17b6773 100644 --- a/pymbolic/imperative/utils.py +++ b/pymbolic/imperative/utils.py @@ -43,7 +43,7 @@ def get_dot_dependency_graph( # deprecated use_insn_ids=None,): - """Return a string in the `dot `_ language depicting + """Return a string in the `dot `__ language depicting dependencies among kernel statements. :arg statements: A sequence of statements, each of which is stringified by diff --git a/pymbolic/interop/maxima.py b/pymbolic/interop/maxima.py index 82812a24..db4c351b 100644 --- a/pymbolic/interop/maxima.py +++ b/pymbolic/interop/maxima.py @@ -32,7 +32,7 @@ """ # Inspired by similar code in Sage at: -# http://trac.sagemath.org/sage_trac/browser/sage/interfaces/maxima.py +# https://github.com/sagemath/sage/blob/master/src/sage/interfaces/maxima.py import re from sys import intern diff --git a/pymbolic/mapper/constant_converter.py b/pymbolic/mapper/constant_converter.py index 3f512713..44135128 100644 --- a/pymbolic/mapper/constant_converter.py +++ b/pymbolic/mapper/constant_converter.py @@ -24,7 +24,7 @@ class ConstantToNumpyConversionMapper(pymbolic.mapper.IdentityMapper): - """Because of `this numpy bug `_, + """Because of `this numpy bug `__, sized :mod:`numpy` number (i.e. ones with definite bit width, such as :class:`numpy.complex64`) have a low likelihood of surviving expression construction. diff --git a/pymbolic/mapper/graphviz.py b/pymbolic/mapper/graphviz.py index 71eb3cbb..fd36f6cf 100644 --- a/pymbolic/mapper/graphviz.py +++ b/pymbolic/mapper/graphviz.py @@ -28,7 +28,7 @@ class GraphvizMapper(WalkMapper): - """Produces code for `dot `_ that yields + """Produces code for `dot `__ that yields an expression tree of the traversed expression(s). .. automethod:: get_dot_code