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

chore: use uv to manage installation #77

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- uses: astral-sh/setup-uv@v2
- name: Setup venv
run: |
uv venv .venv
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
mkdir -p $(pip cache dir)
- name: Install dependencies
run: |
pip install lume
uv pip install lume
lume -install
- name: Lint
run: lume -lint
Expand All @@ -45,7 +52,14 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v2
- name: Setup venv
run: |
uv venv .venv
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
mkdir -p $(pip cache dir)
- name: Install latest version of meiga from code (without other dependencies as lume)
run: pip install -e .
run: uv pip install -e .
- name: Check imports
run: python -c "from meiga import Error, Success, Failure, Result, early_return, async_early_return"
9 changes: 8 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ jobs:
python-version: '3.11'
cache: pip
cache-dependency-path: pyproject.toml
- uses: astral-sh/setup-uv@v2
- name: Setup venv
run: |
uv venv .venv
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
mkdir -p $(pip cache dir)
- name: Install dependencies
run: |
pip install lume
uv pip install lume
lume -install
- name: Coverage
run: lume -coverage
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ jobs:
python-version: '3.11'
cache: pip
cache-dependency-path: pyproject.toml
- uses: astral-sh/setup-uv@v2
- name: Setup venv
run: |
uv venv .venv
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
mkdir -p $(pip cache dir)
- name: Create Documentation
run: |
pip install lume
uv pip install lume
lume -docs
- name: Publish
run: mkdocs gh-deploy --force
13 changes: 6 additions & 7 deletions lume.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: document-security-experiments
name: meiga

envs:
PACKAGE_NAME: meiga

install:
run:
#- pip install -U -r requirements/requirements.txt -r requirements/dev-requirements.txt
- pip install -e .[dev]
- uv pip install -e .[dev]
- pre-commit install

uninstall:
run:
- pip uninstall meiga -y
- pip freeze | xargs pip uninstall -y
- pip install lume
- uv uninstall meiga -y
- uv pip freeze | xargs uv pip uninstall
- uv install lume

steps:
reinstall:
Expand Down Expand Up @@ -41,7 +40,7 @@ steps:
run: pytest -v
docs:
run: |
pip install -e .[doc]
uv pip install -e .[doc]
mkdocs build
check-no-binary-installation:
run: |
Expand Down
Loading