%global _empty_manifest_terminate_build 0 Name: python-nrpylatex Version: 1.3.post1 Release: 1 Summary: LaTeX Interface to SymPy (CAS) for General Relativity License: BSD License (BSD) URL: https://github.com/zachetienne/nrpylatex Source0: https://mirrors.aliyun.com/pypi/web/packages/aa/de/859741f6b9cc873b1830cb28f0f33dd6e3bb0580baf7db31bb3acdd7a2e6/nrpylatex-1.3.post1.tar.gz BuildArch: noarch Requires: python3-sympy %description [![CI](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml/badge.svg)](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml) [![PyPI](https://img.shields.io/pypi/v/nrpylatex.svg)](https://pypi.org/project/nrpylatex/) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) [![arXiv](https://img.shields.io/badge/arXiv-2111.05861-B31B1B)](https://arxiv.org/abs/2111.05861) [NRPy+](https://github.com/zachetienne/nrpytutorial)'s LaTeX Interface to SymPy (CAS) for General Relativity - automatic expansion of - [Einstein summation convention](https://en.wikipedia.org/wiki/Einstein_notation) - Levi-Civita and Christoffel symbols - Lie and covariant derivatives - metric inverse and determinant - automatic index raising and lowering - arbitrary coordinate system (default) - exception handling and debugging ## § Installation To install **NRPyLaTeX** using [PyPI](https://pypi.org/project/nrpylatex/), run the following command in the terminal $ pip install nrpylatex ## § Exporting (CAS) If you are using Mathematica instead of SymPy, run the following code to convert your output from sympy import mathematica_code namespace = parse_latex(...) for var in namespace: exec(f'{var} = mathematica_code({var})') If you are using a different CAS, reference the SymPy [documentation](https://docs.sympy.org/latest/modules/printing.html) to find the relevant printing function. ## § Interactive Tutorial (MyBinder) [Quick Start](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) | [NRPy+ Integration](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-SymPy_LaTeX_Interface.ipynb) | [Guided Example (BSSN Formalism)](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-LaTeX_Interface_Example-BSSN_Cartesian.ipynb) ## § Documentation and Usage [Getting Started and API Reference](https://zachetienne.github.io/nrpylatex/) ### Simple Example ([Kretschmann Scalar](https://en.wikipedia.org/wiki/Kretschmann_scalar)) **Python REPL or Script (*.py)** >>> from nrpylatex import parse_latex >>> parse_latex(r""" ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') >>> from sympy import simplify >>> print(simplify(K)) 48*G**2*M**2/r**6 **IPython REPL or Jupyter Notebook** In [1]: %load_ext nrpylatex In [2]: %%parse_latex Out[2]: ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') In [3]: from sympy import simplify In [4]: print(simplify(K)) Out[4]: 48*G**2*M**2/r**6 %package -n python3-nrpylatex Summary: LaTeX Interface to SymPy (CAS) for General Relativity Provides: python-nrpylatex BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-nrpylatex [![CI](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml/badge.svg)](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml) [![PyPI](https://img.shields.io/pypi/v/nrpylatex.svg)](https://pypi.org/project/nrpylatex/) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) [![arXiv](https://img.shields.io/badge/arXiv-2111.05861-B31B1B)](https://arxiv.org/abs/2111.05861) [NRPy+](https://github.com/zachetienne/nrpytutorial)'s LaTeX Interface to SymPy (CAS) for General Relativity - automatic expansion of - [Einstein summation convention](https://en.wikipedia.org/wiki/Einstein_notation) - Levi-Civita and Christoffel symbols - Lie and covariant derivatives - metric inverse and determinant - automatic index raising and lowering - arbitrary coordinate system (default) - exception handling and debugging ## § Installation To install **NRPyLaTeX** using [PyPI](https://pypi.org/project/nrpylatex/), run the following command in the terminal $ pip install nrpylatex ## § Exporting (CAS) If you are using Mathematica instead of SymPy, run the following code to convert your output from sympy import mathematica_code namespace = parse_latex(...) for var in namespace: exec(f'{var} = mathematica_code({var})') If you are using a different CAS, reference the SymPy [documentation](https://docs.sympy.org/latest/modules/printing.html) to find the relevant printing function. ## § Interactive Tutorial (MyBinder) [Quick Start](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) | [NRPy+ Integration](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-SymPy_LaTeX_Interface.ipynb) | [Guided Example (BSSN Formalism)](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-LaTeX_Interface_Example-BSSN_Cartesian.ipynb) ## § Documentation and Usage [Getting Started and API Reference](https://zachetienne.github.io/nrpylatex/) ### Simple Example ([Kretschmann Scalar](https://en.wikipedia.org/wiki/Kretschmann_scalar)) **Python REPL or Script (*.py)** >>> from nrpylatex import parse_latex >>> parse_latex(r""" ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') >>> from sympy import simplify >>> print(simplify(K)) 48*G**2*M**2/r**6 **IPython REPL or Jupyter Notebook** In [1]: %load_ext nrpylatex In [2]: %%parse_latex Out[2]: ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') In [3]: from sympy import simplify In [4]: print(simplify(K)) Out[4]: 48*G**2*M**2/r**6 %package help Summary: Development documents and examples for nrpylatex Provides: python3-nrpylatex-doc %description help [![CI](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml/badge.svg)](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml) [![PyPI](https://img.shields.io/pypi/v/nrpylatex.svg)](https://pypi.org/project/nrpylatex/) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) [![arXiv](https://img.shields.io/badge/arXiv-2111.05861-B31B1B)](https://arxiv.org/abs/2111.05861) [NRPy+](https://github.com/zachetienne/nrpytutorial)'s LaTeX Interface to SymPy (CAS) for General Relativity - automatic expansion of - [Einstein summation convention](https://en.wikipedia.org/wiki/Einstein_notation) - Levi-Civita and Christoffel symbols - Lie and covariant derivatives - metric inverse and determinant - automatic index raising and lowering - arbitrary coordinate system (default) - exception handling and debugging ## § Installation To install **NRPyLaTeX** using [PyPI](https://pypi.org/project/nrpylatex/), run the following command in the terminal $ pip install nrpylatex ## § Exporting (CAS) If you are using Mathematica instead of SymPy, run the following code to convert your output from sympy import mathematica_code namespace = parse_latex(...) for var in namespace: exec(f'{var} = mathematica_code({var})') If you are using a different CAS, reference the SymPy [documentation](https://docs.sympy.org/latest/modules/printing.html) to find the relevant printing function. ## § Interactive Tutorial (MyBinder) [Quick Start](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) | [NRPy+ Integration](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-SymPy_LaTeX_Interface.ipynb) | [Guided Example (BSSN Formalism)](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-LaTeX_Interface_Example-BSSN_Cartesian.ipynb) ## § Documentation and Usage [Getting Started and API Reference](https://zachetienne.github.io/nrpylatex/) ### Simple Example ([Kretschmann Scalar](https://en.wikipedia.org/wiki/Kretschmann_scalar)) **Python REPL or Script (*.py)** >>> from nrpylatex import parse_latex >>> parse_latex(r""" ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') >>> from sympy import simplify >>> print(simplify(K)) 48*G**2*M**2/r**6 **IPython REPL or Jupyter Notebook** In [1]: %load_ext nrpylatex In [2]: %%parse_latex Out[2]: ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') In [3]: from sympy import simplify In [4]: print(simplify(K)) Out[4]: 48*G**2*M**2/r**6 %prep %autosetup -n nrpylatex-1.3.post1 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-nrpylatex -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Jun 20 2023 Python_Bot - 1.3.post1-1 - Package Spec generated