Skip to content

Commit

Permalink
ci: add pixi support 💫
Browse files Browse the repository at this point in the history
  • Loading branch information
KarelZe committed Jan 11, 2024
1 parent a397b31 commit 28052ec
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 31 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install .[test]
- uses: prefix-dev/[email protected]
with:
run-install: true
- name: Post-install dependencies
run: pixi run postinstall
- name: Test with pytest
run: pytest -v tests/ --cov=src --cov-report=xml
run: pixi run test
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ site/

# PyBuilder
target/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
.pixi
pixi.lock
2 changes: 0 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ markdown_extensions:
format: !!python/name:pymdownx.superfences.fence_code_format ''
- pymdownx.tabbed:
alternate_style: true
- mdx_include:
base_path: docs
- footnotes

plugins:
Expand Down
33 changes: 33 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# TODO: move to pyproject.toml when pixi supports it
# https://github.com/prefix-dev/pixi/issues/79
[project]
name = "tclf"
description = "Classify trades using trade classification algorithms 🐍"
authors = ["Marks Bilz <[email protected]>"]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64"]

[tasks]
postinstall = "pip install --upgrade --no-build-isolation --no-deps --disable-pip-version-check -e ."
doc = "mkdocs serve"
test = "pytest -v tests/ --cov=src --cov-report=xml"
lint = "pre-commit run --all"

[dependencies]
python = ">=3.8"
numpy = "*"
pandas = "*"
pip = "*"
scikit-learn = "*"
# doc
# mdx-include = ">=1.4.1"
mkdocs = "*"
mkdocs-material = "*"
mkdocstrings-python = "*"
# build
setuptools = "*"
# test
pytest = "*"
pytest-cov = "*"
# linting
pre-commit = "*"
25 changes: 1 addition & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "tclf"
authors = [
{ name="Markus Bilz", email="[email protected]" },
]
description = "Code to perform trade classification using trade classification algorithms."
description = "Classify trades using trade classification algorithms 🐍"
readme = "README.md"
license = {file = "LICENSE.txt"}
requires-python = ">=3.8"
Expand Down Expand Up @@ -47,28 +47,6 @@ disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_incomplete_defs = true

[project.optional-dependencies]
dev=[
"build",
"mypy",
"pre-commit",
"ruff",
]

doc = [
"cairosvg >=2.5.2,<3.0.0",
"mdx-include >=1.4.1,<2.0.0",
"mkdocs >=1.1.2,<2.0.0",
"mkdocs-material >=8.1.4,<10.0.0",
"mkdocstrings-python",
"pillow >=9.3.0,<11.0.0",
]

test = ["pytest",
"pytest-cov",
]


[tool.pytest.ini_options]
minversion = 7.0
addopts = "-ra -p no:warnings -v --cov --cov-report term-missing --doctest-modules"
Expand All @@ -95,7 +73,6 @@ exclude_also = [
]
show_missing = true


[tool.ruff]
# See rules: https://beta.ruff.rs/docs/rules/
select = [
Expand Down

0 comments on commit 28052ec

Please sign in to comment.