Skip to content

Commit

Permalink
add pixi
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfast committed May 25, 2024
1 parent 7512a21 commit 0eb9683
Showing 1 changed file with 105 additions and 0 deletions.
105 changes: 105 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# "$schema" = "https://pixi.sh/v0.21.1/schema/manifest/schema.json"

[project]
name = "test-nbconvert-a11y"
version = "0.1.0"
description = "Add a short description here"
authors = ["tonyfast <tony.fast@gmail.com>"]
channels = ["conda-forge", "microsoft", "nodefaults"]
platforms = ["linux-64", "osx-64"] # "win-64", "osx-arm64"]


[feature.test-python.tasks.test]
depends-on = ["pip", "install-axe", "pw-install-ff"]
inputs = ["pyproject.toml"]
cmd = """PLAYWRIGHT_BROWSERS_PATH=.pixi/.local-browsers
pip install -e. --no-deps --ignore-installed --disable-pip-version-check
&& pytest --browser firefox"""

[feature.test-axe.dependencies]
playwright = "*"
pytest-playwright = "*"

[feature.test-axe.tasks.install-axe]
outputs = ["node_modules/axe-core"]
cmd = "npm install axe-core"

[feature.test-axe.tasks.pw-install-ff]
outputs = [".pixi/.local-browsers/firefox-*"]
cmd = "PLAYWRIGHT_BROWSERS_PATH=.pixi/.local-browsers playwright install firefox"

[feature.test-nu-validator.dependencies]
openjdk = "*"
vnu-validator = "*"

[dependencies]
# run in CI with --with-deps
python = ">=3.10,<3.13"
pip = "*"
accessible-pygments = "*"
exceptiongroup = "*"
html5lib = "*"
nbconvert = "*"
python-slugify = "*"
mdit-py-plugins = "*"
linkify-it-py = ">=1,<3"
markdown-it-py = "*"
beautifulsoup4 = "*"

[feature.test-python.dependencies]
doit = "*"
ipywidgets = "*"
matplotlib-base = "*"
numpy = "*"
pytest = "*"
pytest-html = "*"
pytest-sugar = "*"
pytest-xdist = "*"
pytest-flask = "*"
requests-cache = "*"
scipy = "*"
pandas = "*"

[environments]
# lint = { features = ["lint"], solve-group = "default" }
build = { features = ["build"], solve-group = "default" }
test = { features = [
"test-python",
"test-axe",
"test-nu-validator",
], solve-group = "default" }
# docs = { features = [
# "demo",
# "build",
# "dev",
# "docs",
# "run",
# "webdriver",
# ], solve-group = "default" }


[tasks.pip]
inputs = ["pyproject.toml"]
outputs = ["build/pip-freeze/*.txt"]
cmd = """
python -m pip install -vv --no-deps --ignore-installed --disable-pip-version-check
-e .
&& mkdir -p build/pip-freeze
&& pip freeze > build/pip-freeze/$PIXI_ENVIRONMENT_NAME.txt"""


[feature.build.dependencies]
python-build = "*"

[feature.build.tasks.build]
inputs = [
"LICENSE",
"pyproject.toml",
"README.md",
"nbconvert_a11y/*.py",
"nbconvert_a11y/**/*.py",
"nbconvert_a11y/*.j2",
"nbconvert_a11y/**/*.j2",
]
outputs = ["dist/nbconvert_a11y-*.tar.gz", "dist/nbconvert_a11y-*.whl"]
cmd = "rm -rf dist && pyproject-build . -vv"

0 comments on commit 0eb9683

Please sign in to comment.