Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to uv for ci actions #135

Open
wants to merge 14 commits into
base: development
Choose a base branch
from
38 changes: 22 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,37 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: python-3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python
run: uv python install 3.11

- name: linting checks
run: |
python -m pip install --upgrade pip
pip install flake8 flake8-docstrings isort
sh hooks/pre-commit
- name: install project dependencies
run: |
pip install -e .
uv venv
source .venv/bin/activate
uv pip install flake8 flake8-docstrings isort pip
uv run sh hooks/pre-commit

- name: Install the project
run: uv sync --all-extras --dev

- name: unit tests
run: |
pytest --cov=amlrt-project
uv run pytest --cov=amlrt-project
- name: pytorch-end2end-single
run: |
./tests/end2end_pytorch/run_single.sh
source .venv/bin/activate
uv run sh tests/end2end_pytorch/run_single.sh
- name: pytorch-end2end-orion
run: |
./tests/end2end_pytorch/run_orion.sh
uv run sh tests/end2end_pytorch/run_orion.sh
- name: type checking
run: |
pytype amlrt_project/
uv run sh pytype amlrt_project/
- name: doc-creation-test
run: |
./tests/test_docs/run.sh
uv run sh tests/test_docs/run.sh
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "amlrt_project"
version = "3.2.0"
requires-python = ">=3.11"
dependencies = [
'aim==3.18.1; os_name!="nt"',
"comet-ml==3.39.3",
"flake8==4.0.1",
"flake8-docstrings==1.6.0",
"gitpython==3.1.27",
"jupyter==1.0.0",
"jinja2==3.1.2",
"myst-parser==2.0.0",
"omegaconf==2.3.0",
"orion>=0.2.4.post1",
"pyyaml==6.0",
"pytest==7.1.2",
"pytest-cov==3.0.0",
"pytorch_lightning==2.2.1",
"pytype==2024.2.27",
"sphinx==7.2.6",
"sphinx-autoapi==3.0.0",
"sphinx-rtd-theme==1.3.0",
"sphinxcontrib-napoleon==0.7",
"sphinxcontrib-katex==0.9.9",
"tensorboard==2.16.2",
"tqdm==4.64.0",
"torch==2.2.1",
"torchvision==0.17.1",
]

[tool.setuptools.packages.find]
include = ["amlrt_project", "amlrt_project.*"]

[tool.uv]
constraint-dependencies = ["kaleido!=0.2.1.post1"]

[project.scripts]
amlrt_project_train = "amlrt_project.train:main"
amlrt_project_eval = "amlrt_project.evaluate:main"
amlrt_project_merge_configs = "amlrt_project.utils.config_utils:main"
41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

Loading