Skip to content

Commit

Permalink
Merge branch 'python-ruff-formatting' of https://github.com/fable-com…
Browse files Browse the repository at this point in the history
…piler/Fable into python-ruff-formatting
  • Loading branch information
dbrattli committed Nov 1, 2023
2 parents 48718e6 + 548dd1c commit ae57d5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install poetry
# poetry install

- name: Fable Library - Python (linux)
if: matrix.platform == 'ubuntu-latest'
run: ./build.sh fable-library --python
Expand All @@ -117,11 +122,6 @@ jobs:
if: matrix.platform == 'windows-latest'
run: .\build.bat fable-library --python

- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Fable Tests - Python (linux)
if: matrix.platform == 'ubuntu-latest'
run: ./build.sh test python --skip-fable-library
Expand Down
10 changes: 7 additions & 3 deletions src/Fable.Build/FableLibrary/Python.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,20 @@ type BuildFableLibraryPython() =

Shell.deleteDir (this.BuildDir </> "fable_library/fable-library")

// Install the python dependencies at the root of the project
Command.Run(
"poetry",
"install"
)

// Run Ruff linter checking import sorting and fix any issues
Command.Run(
"poetry",
"run ruff --select I --fix .",
this.OutDir
)

// Run Ruff formatter using poetry on all generated files
Command.Run(
"poetry",
"run ruff format .",
this.OutDir
$"run ruff format {this.BuildDir}"
)

0 comments on commit ae57d5e

Please sign in to comment.