forked from kpedro88/pyfeyn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start switch to hatch * Add ci file * Adjust make * no codecov * use all * Install more CI * Hatch with latex * add feynmf to ci * Makefile hatch * docs * More latex
- Loading branch information
Showing
8 changed files
with
164 additions
and
5,434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
# Run daily at 0:01 UTC | ||
schedule: | ||
- cron: '1 0 * * *' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
|
||
- uses: astral-sh/setup-uv@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
uv pip install --system '.[test]' | ||
uv pip list | ||
- name: Install external packages | ||
run: >- | ||
sudo apt-get update -y && | ||
sudo apt-get install -y | ||
latexmk | ||
graphviz | ||
texlive-latex-base | ||
texlive-fonts-extra | ||
texlive-extra-utils | ||
texlive-metapost | ||
texlive-latex-extra | ||
feynmf | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov --cov-report=xml -r sx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,105 @@ | ||
[tool.poetry] | ||
[build-system] | ||
requires = [ | ||
"hatchling", | ||
"hatch-vcs", | ||
] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "pyfeyn2" | ||
version = "0.0.0" | ||
description = "PyFeyn is a package which makes drawing Feynman diagrams simple and programmatic. Feynman diagrams are important constructs in perturbative field theory, so being able to draw them in a programmatic fashion is important if attempting to enumerate a large number of diagram configurations is important. The output quality of PyFeyn diagrams (into PDF or EPS formats) is very high, and special effects can be obtained by using constructs from PyX, which PyFeyn is based around" | ||
authors = ["Alexander Puck Neuwirth <[email protected]>"] | ||
dynamic = ["version"] | ||
description = 'PyFeyn is a package which makes drawing Feynman diagrams simple and programmatic. Feynman diagrams are important constructs in perturbative field theory, so being able to draw them in a programmatic fashion is important if attempting to enumerate a large number of diagram configurations is important. The output quality of PyFeyn diagrams (into PDF or EPS formats) is very high, and special effects can be obtained by using constructs from PyX, which PyFeyn is based around' | ||
readme = "README.md" | ||
repository = "https://github.com/APN-Pucky/pyfeyn2" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
particle = "*" | ||
xsdata = {version = "*", extras = ["cli","lxml","soap"]} | ||
pylatex = "*" | ||
dot2tex = "*" | ||
matplotlib = ">=1.4.0,<4.0.0" | ||
Wand = "*" | ||
numpy = "*" # Upper limit due to feynman using np.complex | ||
pyx = ">=0.12,<1.0.0" # Original pyfeyn | ||
pydot = "*" | ||
feynman=">=2.1" | ||
cssutils= "*" | ||
pylatexenc = "*" | ||
pygments = "*" | ||
graphviz = "*" | ||
ipyparallel = "*" | ||
deprecated = "*" | ||
deprecation = "*" | ||
cssselect ="*" | ||
smpl_io = "*" | ||
smpl_doc = "*" | ||
smpl_util= "*" | ||
iminuit = "*" | ||
colorama = "*" | ||
termcolor = "*" | ||
feynml = {version = ">=0.2.24", extras = ["interfaces"]} | ||
#feynml= {path = "../feynml", develop = true, extras = ["interfaces"]} | ||
#asciidraw = {path = "../asciidraw", develop = true} | ||
asciidraw = ">=0.1.2" | ||
|
||
[tool.poetry.scripts] | ||
mkfeyndiag = "pyfeyn2.mkfeyndiag:main" | ||
|
||
[tool.poetry.group.docs] | ||
optional = true | ||
|
||
[tool.poetry.group.docs.dependencies] | ||
sphinx = "<8.0.0" | ||
sphinx-rtd-theme = "*" | ||
sphinxcontrib-napoleon = "*" | ||
nbsphinx = "*" | ||
jupyter-sphinx = "*" | ||
sphinx_autobuild = "*" | ||
sphinx_math_dollar = "*" | ||
myst-parser = "*" | ||
toml = "*" | ||
|
||
[tool.poetry.group.test] | ||
optional = true | ||
requires-python = ">=3.8" | ||
keywords = [] | ||
authors = [ | ||
{ name = "Alexander Puck Neuwirth", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
dependencies = [ | ||
"feynml", | ||
"pylatex", | ||
"dot2tex", | ||
"matplotlib", | ||
"Wand", | ||
"numpy", | ||
"pyx", # Original pyfeyn | ||
"pydot", | ||
"feynman>=2.1", | ||
"pylatexenc", | ||
"pygments", | ||
"graphviz", | ||
"ipyparallel", | ||
"iminuit", | ||
"feynml[interfaces]>=0.2.24", | ||
"asciidraw>=0.1.2", | ||
] | ||
|
||
[tool.poetry.group.test.dependencies] | ||
pytest = "*" | ||
pytest-cov = "*" | ||
pytest-profiling = "*" | ||
pytest-line-profiler-apn = ">=0.1.3" | ||
[project.urls] | ||
Documentation = "https://github.com/APN-Pucky/pyfeyn2#readme" | ||
Issues = "https://github.com/APN-Pucky/pyfeyn2/issues" | ||
Source = "https://github.com/APN-Pucky/pyfeyn2/" | ||
|
||
[tool.poetry.group.dev] | ||
optional = true | ||
[project.optional-dependencies] | ||
lint = [ | ||
"ruff", | ||
] | ||
docs = [ | ||
"sphinx<8.0.0", | ||
"sphinx-rtd-theme", | ||
"sphinxcontrib-napoleon", | ||
"nbsphinx", | ||
"jupyter-sphinx", | ||
"sphinx_autobuild", | ||
"sphinx_math_dollar", | ||
"myst-parser", | ||
"toml", | ||
] | ||
test = [ | ||
"pytest", | ||
"pytest-cov", | ||
] | ||
dev = [ | ||
"pre-commit", | ||
"ipython", | ||
"jupyter", | ||
"jupyterlab", | ||
] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pre-commit = ">=2.20,<4.0" | ||
ipython = "*" | ||
jupyterlab = "*" | ||
jupyter = "*" | ||
poetry-dynamic-versioning = {extras = ["plugin"], version = ">=0.21.1,<1.7.0"} | ||
[tool.hatch.envs.all] | ||
features = [ | ||
"dev", | ||
"docs", | ||
"test", | ||
] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] | ||
build-backend = "poetry_dynamic_versioning.backend" | ||
[tool.hatch] | ||
version.source = "vcs" | ||
|
||
[tool.poetry-dynamic-versioning] | ||
enable = true | ||
vcs = "git" | ||
style = "pep440" | ||
dirty = true | ||
# modified dunami default pattern without v | ||
pattern = '(?x)(?# ignore whitespace)^((?P<epoch>\d+)!)?(?P<base>\d+(\.\d+)*)(?# v1.2.3 or v1!2000.1.2)([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\d+)?))?(?# b0)(\+(?P<tagged_metadata>.+))?$(?# +linux)' | ||
strict = true | ||
format-jinja = "{% if distance == 0 %}{{ base }}{% else %}{{ base }}.{{ distance }}{% endif %}" | ||
[tool.hatch.scripts] | ||
mkfeyndiag = "pyfeyn2.mkfeyndiag:main" | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
testpaths = ["tests"] | ||
addopts = [ "-Werror","-v","--cov=pyfeyn2","--cov-config=.coveragerc","--cov-append","--cov-report=term","--cov-report=xml","--doctest-modules","--ignore=docs/source/conf.py" ] | ||
filterwarnings = [ | ||
'error', | ||
'ignore: pkg_resources is deprecated as an API:DeprecationWarning' | ||
'ignore: pkg_resources is deprecated as an API:DeprecationWarning', | ||
"ignore:The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command:DeprecationWarning", | ||
] |