Skip to content

Commit

Permalink
add: use new asciidraw split package (#253)
Browse files Browse the repository at this point in the history
* Update dis

* Use asciidraw

* Revert "Update dis"

This reverts commit 66af7ff.

* Drop moved asciidraw code
APN-Pucky authored May 22, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3542cc6 commit 4757c9d
Showing 8 changed files with 1,435 additions and 1,615 deletions.
2,735 changes: 1,418 additions & 1,317 deletions poetry.lock

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions pyfeyn2/render/text/ascii.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from typing import List
from warnings import warn

from feynml.point import Point

from pyfeyn2.render.render import Render
from pyfeyn2.render.text.label import Label
from pyfeyn2.render.text.line import ASCIILine
from pyfeyn2.render.text.point import ASCIIPoint
from pyfeyn2.render.text.style import Cross

try:
import colorama
from termcolor import colored
@@ -19,6 +11,15 @@ def colored(text, color):
return text


from asciidraw.label import Label
from asciidraw.line import ASCIILine
from asciidraw.point import ASCIIPoint
from asciidraw.style import Cross
from feynml.point import Point

from pyfeyn2.render.render import Render


class Gluon(ASCIILine):
def __init__(self, **kwargs):
super().__init__(
86 changes: 0 additions & 86 deletions pyfeyn2/render/text/label.py

This file was deleted.

54 changes: 0 additions & 54 deletions pyfeyn2/render/text/line.py

This file was deleted.

18 changes: 0 additions & 18 deletions pyfeyn2/render/text/point.py

This file was deleted.

128 changes: 0 additions & 128 deletions pyfeyn2/render/text/style.py

This file was deleted.

8 changes: 5 additions & 3 deletions pyfeyn2/render/text/unicode.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from asciidraw.line import ASCIILine
from asciidraw.point import ASCIIPoint
from asciidraw.style import Compass
from pylatexenc.latex2text import LatexNodes2Text

from pyfeyn2.render.text.ascii import ASCIIRender, Label
from pyfeyn2.render.text.line import ASCIILine
from pyfeyn2.render.text.point import ASCIIPoint
from pyfeyn2.render.text.style import Compass


class ULabel(Label):
@@ -68,6 +68,8 @@ class UnicodeRender(ASCIIRender):
"square": ASCIIPoint("■"),
"dot": ASCIIPoint("●"),
"diamond": ASCIIPoint("◆"),
"vertical ellipse": ASCIIPoint("⬮"),
"horizontal ellipse": ASCIIPoint("⬬"),
"pentagram": ASCIIPoint("⛤"),
"star": ASCIIPoint("★"),
"blob": ASCIIPoint("◍"),
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -33,7 +33,9 @@ iminuit = "*"
colorama = "*"
termcolor = "*"
feynml = {version = ">=0.2.24", extras = ["interfaces"]}
#feynml= {path= "../feynml", develop = true, extras = ["interfaces"]}
#feynml= {path = "../feynml", develop = true, extras = ["interfaces"]}
asciidraw = ">=0.0.1"
#asciidraw = {path = "../asciidraw", develop = true}

[tool.poetry.scripts]
mkfeyndiag = "pyfeyn2.mkfeyndiag:main"

0 comments on commit 4757c9d

Please sign in to comment.