Skip to content

Commit

Permalink
feat(ci): migrate to uv in CI (nerfstudio-project#3038)
Browse files Browse the repository at this point in the history
* feat(ci): migrate to `uv` in CI

* feat(ci): drop upgrade strategy

* feat(ci): use `uv` in docs workflow

* fix(ci/doc): update sphinx build cmd

* fix(ci/doc): specify python path

* (experimental) simplify

* remove venv

* Revert line wrap change for doc.yml

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
  • Loading branch information
SauravMaheshkar and brentyi authored Apr 8, 2024
1 parent 2b91715 commit d1fc2ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/core_code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,20 @@ jobs:
key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
pip install --upgrade --upgrade-strategy eager -e .[dev]
pip install uv
uv pip install --system --upgrade -e .[dev]
- name: Run license checks
run: |
./nerfstudio/scripts/licensing/license_headers.sh --check
- name: Check notebook cell metadata
run: |
python ./nerfstudio/scripts/docs/add_nb_tags.py --check
- name: Run Ruff Linter
run: ruff check docs/ nerfstudio/ tests/ --output-format=github
run: |
ruff check docs/ nerfstudio/ tests/ --output-format=github
- name: Run Ruff Formatter
run: ruff format docs/ nerfstudio/ tests/ --diff
run: |
ruff format docs/ nerfstudio/ tests/ --diff
- name: Run Pyright
run: |
pyright
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
python-version: '3.9'
- name: Install dependencies
run: |
pip install .[docs]
pip install uv
uv pip install --system .[docs]
- name: Sphinx build
# fail on warnings
run: |
Expand Down
2 changes: 1 addition & 1 deletion nerfstudio/scripts/github/run_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def run_github_actions_file(filename: str, continue_on_fail: bool = False):
curr_command = step["run"].replace("\n", ";").replace("\\", "")
if curr_command.startswith("ruff"):
if "ruff check" in curr_command:
curr_command = f"{curr_command} --fix"
curr_command = curr_command.replace("ruff check", "ruff check --fix")

curr_command = curr_command.replace(" --check", "")
curr_command = curr_command.replace(" --diff", "")
Expand Down

0 comments on commit d1fc2ee

Please sign in to comment.