Skip to content

Commit b9bdb94

Browse files
authored
add: root renderer (#319)
* init root renderer * Update docs folder * Update readme * Gallery only TIKZ * Use warnings deprecated * bump * Updates * Fixes * fmt2 * fix smpl import * rename: dir -> sense * toml -> tomlib * Fix wanring -> fail unicode * fallback to tomli * Fix typo
1 parent fa8a672 commit b9bdb94

33 files changed

+2339
-3689
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ PyFeyn is a Python-language based system for drawing Feynman diagrams. It was in
1616
* (graphviz)
1717
* (feynmp-auto/feynmf)
1818

19+
1920
## Installation
2021

2122
```sh
22-
poerty install --with docs --with dev
23-
poetry shell
23+
pip install pyfeyn2
2424
```
2525

26+
2627
## Documentation
2728

2829
* <https://pyfeyn2.readthedocs.io/en/stable/>
@@ -48,13 +49,12 @@ Several of these are integrated into pyfeyn2.
4849
* [ImageMagick security policy 'PDF' blocking conversion]( https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion )
4950
* [Graphviz missing on mac](https://graphviz.org/download/#mac)
5051

51-
## Development
52-
5352

54-
### package/python structure:
53+
## Development
5554

56-
* <https://mathspp.com/blog/how-to-create-a-python-package-in-2022>
57-
* <https://www.brainsorting.com/posts/publish-a-package-on-pypi-using-poetry/>
55+
```sh
56+
pip install -e . --user --break-system-packages
57+
```
5858

5959
[pypi image]: https://badge.fury.io/py/pyfeyn2.svg
6060
[pypi link]: https://pypi.org/project/pyfeyn2/

docs/source/conf.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
import re
1919
import sys
2020

21-
import toml
22-
2321
sys.path.insert(0, os.path.abspath("../.."))
2422
import copy
2523

24+
try:
25+
import tomllib # Python 3.11+
26+
except ImportError:
27+
import tomli as tomllib # Python <= 3.10
28+
2629
from smpl_doc import doc
2730
from smpl_io import io
2831

@@ -31,10 +34,14 @@
3134

3235
# -- Project information -----------------------------------------------------
3336

37+
3438
try:
35-
info = toml.load("../../pyproject.toml")
39+
with open("../../pyproject.toml", "rb") as f:
40+
info = tomllib.load(f)
3641
except FileNotFoundError:
37-
info = toml.load("pyproject.toml")
42+
with open("pyproject.toml", "rb") as f:
43+
info = tomllib.load(f)
44+
3845
project = info["project"]["name"]
3946
copyright = str(datetime.datetime.now().year) + ", Alexander Puck Neuwirth"
4047
author = ", ".join([a["name"] for a in info["project"]["authors"]])

docs/source/gallery/all/all.ipynb

Lines changed: 252 additions & 2 deletions
Large diffs are not rendered by default.

docs/source/gallery/feynman/feynman.ipynb

Lines changed: 144 additions & 65 deletions
Large diffs are not rendered by default.

docs/source/gallery/feynmf/feynmf.ipynb

Lines changed: 163 additions & 97 deletions
Large diffs are not rendered by default.

docs/source/gallery/overleaf/overleaf.ipynb

Lines changed: 216 additions & 281 deletions
Large diffs are not rendered by default.

docs/source/gallery/pyfeyn/pyfeyn.ipynb

Lines changed: 464 additions & 279 deletions
Large diffs are not rendered by default.

docs/source/gallery/wikipedia/wikipedia.ipynb

Lines changed: 93 additions & 66 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)