Skip to content

Commit

Permalink
change set-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora-Olivia-Ammann committed Jan 22, 2025
1 parent a1eac47 commit 9c1fab1
Show file tree
Hide file tree
Showing 6 changed files with 495 additions and 777 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,33 @@
---

name: PR Tests


on:
push:
branches-ignore:
- main


jobs:
pr-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.12

- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
python-version: "3.12"

- name: Install Python dependencies
run: poetry install
run: uv pip install -r requirements.txt

- name: Formatting with ruff
run: poetry run ruff format --check .
run: uv run ruff format --check .

- name: Linting with ruff
run: poetry run ruff check .
run: uv run ruff check .

- name: Linting with mypy
run: poetry run mypy .
run: uv run mypy .

- name: unittests
run: poetry run pytest -s tests


run: uv run pytest -s tests
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

.vscode

Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ A collection of scripts to handle permissions in DSP.

## Local setup to run the scripts in this repository

Set up the poetry virtual environment:

- Install poetry with `curl -sSL https://install.python-poetry.org | python3 -`
- for Windows, see [https://python-poetry.org/docs/](https://python-poetry.org/docs/)
- Execute `poetry install`, which will:
- create a virtual environment (if there isn't already one)
- install all dependencies from `poetry.lock`
- Set the virtual environment's Python interpreter as default interpreter in your IDE,
so that your IDE uses the correct Python version and the correct dependencies.
Set up the virtual environment with uv:

- `curl -LsSf https://astral.sh/uv/install.sh | sh`
- `uv sync --all-extras --dev`
- `source .venv/bin/activate`


## How to use this repo
Expand Down
Loading

0 comments on commit 9c1fab1

Please sign in to comment.