Skip to content

Commit 3acb862

Browse files
authored
ci: add pixi support 💫 (#65)
1 parent 43fb31a commit 3acb862

File tree

5 files changed

+47
-31
lines changed

5 files changed

+47
-31
lines changed

.github/workflows/tests.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ jobs:
1414
uses: actions/setup-python@v5
1515
with:
1616
python-version: ${{ matrix.python-version }}
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip setuptools
20-
pip install .[test]
17+
- uses: prefix-dev/[email protected]
18+
with:
19+
run-install: true
20+
- name: Post-install dependencies
21+
run: pixi run postinstall
2122
- name: Test with pytest
22-
run: pytest -v tests/ --cov=src --cov-report=xml
23+
run: pixi run test
2324
- name: Upload Coverage to Codecov
2425
uses: codecov/codecov-action@v3
2526
with:

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,10 @@ site/
6464

6565
# PyBuilder
6666
target/
67+
68+
# pixi
69+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
70+
# This is especially recommended for binary packages to ensure reproducibility, and is more
71+
# commonly ignored for libraries.
72+
.pixi
73+
pixi.lock

mkdocs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ markdown_extensions:
4040
format: !!python/name:pymdownx.superfences.fence_code_format ''
4141
- pymdownx.tabbed:
4242
alternate_style: true
43-
- mdx_include:
44-
base_path: docs
4543
- footnotes
4644

4745
plugins:

pixi.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# TODO: move to pyproject.toml when pixi supports it
2+
# https://github.com/prefix-dev/pixi/issues/79
3+
[project]
4+
name = "tclf"
5+
description = "Classify trades using trade classification algorithms 🐍"
6+
authors = ["Marks Bilz <[email protected]>"]
7+
channels = ["conda-forge"]
8+
platforms = ["win-64", "linux-64"]
9+
10+
[tasks]
11+
postinstall = "pip install --upgrade --no-build-isolation --no-deps --disable-pip-version-check -e ."
12+
doc = "mkdocs serve"
13+
test = "pytest -v tests/ --cov=src --cov-report=xml"
14+
lint = "pre-commit run --all"
15+
16+
[dependencies]
17+
python = ">=3.8"
18+
numpy = "*"
19+
pandas = "*"
20+
pip = "*"
21+
scikit-learn = "*"
22+
# doc
23+
# mdx-include = ">=1.4.1"
24+
mkdocs = "*"
25+
mkdocs-material = "*"
26+
mkdocstrings-python = "*"
27+
# build
28+
setuptools = "*"
29+
# test
30+
pytest = "*"
31+
pytest-cov = "*"
32+
# linting
33+
pre-commit = "*"

pyproject.toml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "tclf"
77
authors = [
88
{ name="Markus Bilz", email="[email protected]" },
99
]
10-
description = "Code to perform trade classification using trade classification algorithms."
10+
description = "Classify trades using trade classification algorithms 🐍"
1111
readme = "README.md"
1212
license = {file = "LICENSE.txt"}
1313
requires-python = ">=3.8"
@@ -47,28 +47,6 @@ disallow_untyped_defs = true
4747
disallow_untyped_calls = true
4848
disallow_incomplete_defs = true
4949

50-
[project.optional-dependencies]
51-
dev=[
52-
"build",
53-
"mypy",
54-
"pre-commit",
55-
"ruff",
56-
]
57-
58-
doc = [
59-
"cairosvg >=2.5.2,<3.0.0",
60-
"mdx-include >=1.4.1,<2.0.0",
61-
"mkdocs >=1.1.2,<2.0.0",
62-
"mkdocs-material >=8.1.4,<10.0.0",
63-
"mkdocstrings-python",
64-
"pillow >=9.3.0,<11.0.0",
65-
]
66-
67-
test = ["pytest",
68-
"pytest-cov",
69-
]
70-
71-
7250
[tool.pytest.ini_options]
7351
minversion = 7.0
7452
addopts = "-ra -p no:warnings -v --cov --cov-report term-missing --doctest-modules"
@@ -95,7 +73,6 @@ exclude_also = [
9573
]
9674
show_missing = true
9775

98-
9976
[tool.ruff]
10077
# See rules: https://beta.ruff.rs/docs/rules/
10178
select = [

0 commit comments

Comments
 (0)