Skip to content
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
13 changes: 8 additions & 5 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@
"isRoot": true,
"tools": {
"paket": {
"version": "8.0.3",
"version": "9.0.2",
"commands": [
"paket"
]
],
"rollForward": false
},
"fable": {
"version": "4.9.0",
"version": "4.24.0",
"commands": [
"fable"
]
],
"rollForward": false
},
"fantomas": {
"version": "6.2.3",
"commands": [
"fantomas"
]
],
"rollForward": false
}
}
}
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "poetry" # See documentation for possible values
- package-ecosystem: "uv" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
dotnet-version: |
6.x
8.x
9.x

- name: Setup dotnet tools
run: dotnet tool restore
Expand All @@ -33,7 +34,7 @@ jobs:
run: dotnet restore test

- name: Install pytest runner
run: pip install pytest
run: pipx install pytest

- name: Install build dependencies
run: dotnet restore Build.fsproj
Expand All @@ -46,8 +47,8 @@ jobs:

- name: Install dependencies
run: |
pip install poetry
poetry install
pipx install uv
uv sync

- name: Test
run: dotnet run Test
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
dotnet-version: |
6.x
8.x
9.x

- name: Setup tools
run: dotnet tool restore
Expand Down
1,002 changes: 505 additions & 497 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Target.create "Build" (fun _ ->
)

Target.create "Docs" (fun _ ->
run poetry $"run jb build docs-src --path-output {buildPath}/docs" "."
run uv $"run jb build docs-src --path-output {buildPath}/docs" "."
Fake.IO.Shell.copyDir "docs" $"{buildPath}/docs/_build/html" (fun _ -> true)
)

Expand All @@ -37,7 +37,7 @@ Target.create "Test" (fun _ ->
"python", dotnet $"fable --lang Python --outDir {buildPath}/tests" testsPath
]
|> runParallel
run poetry $"run pytest {buildPath}/tests" ""
run uv $"run pytest {buildPath}/tests" ""
)

Target.create "Pack" (fun _ ->
Expand Down
2 changes: 1 addition & 1 deletion Helpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ let dotnet = createProcess "dotnet"


let pytest = createProcess "pytest"
let poetry = createProcess "poetry"
let uv = createProcess "uv"
let jupyterBook = createProcess "jb"

let npm =
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ It contains example code for using Fable Python with:
- [Typed-BNF](https://github.com/thautwarm/Typed-BNF#readme)
- [Zanaptak.TypedCssClasses](https://github.com/zanaptak/TypedCssClasses)

## Poetry
## Uv

Fable.Python uses [Poetry](https://python-poetry.org/) for package and
Fable.Python uses [Uv](https://docs.astral.sh/uv/) for package and
dependency management. To handle dependencies when adding Fable Python
compatible NuGet packages, you should use
[Femto](https://github.com/Zaid-Ajaj/Femto).
Expand All @@ -110,8 +110,8 @@ libraries as long as:
There's not much Python specific documentation yet, but the process of
adding type bindings for Python is similar to JS:

- https://fable.io/docs/communicate/js-from-fable.html
- https://medium.com/@zaid.naom/f-interop-with-javascript-in-fable-the-complete-guide-ccc5b896a59f
- <https://fable.io/docs/communicate/js-from-fable.html>
- <https://medium.com/@zaid.naom/f-interop-with-javascript-in-fable-the-complete-guide-ccc5b896a59f>

## Differences from JS

Expand Down Expand Up @@ -145,6 +145,6 @@ Current plan:

- Compile Fable.Library as a published library (done)

- Use poetry for Python references to Fable modules (done)
- Use uv for Python references to Fable modules (done)

- Update docs
134 changes: 0 additions & 134 deletions examples/timeflies/poetry.lock

This file was deleted.

32 changes: 14 additions & 18 deletions examples/timeflies/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@

[tool.poetry]
[project]
name = "timeflies"
version = "0.1.0"
description = "Fable Timeflies Demo"
authors = ["Dag Brattli <[email protected]>"]
authors = [{ name = "Dag Brattli", email = "[email protected]" }]
license = "MIT"
requires-python = ">=3.11"
dependencies = [
"fable-library>=0.8.0",
#"fable-python",
#"fsharp-control-async-rx",
]

[tool.poetry.dependencies]
python = "^3.11"
fable-library = ">=0.8.0"
#fable-python = "*"
#fsharp-control-async-rx = "*"

[tool.poetry.dev-dependencies]
#fable-python = {path = "./fable_modules/fable-python", develop = true}
#fsharp-control-async-rx = {path = "./fable_modules/fsharp-control-async-rx", develop = true}

[tool.poetry.group.dev.dependencies]
black = "^24.3.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[dependency-groups]
dev = [
"black>=24.3.0",
#"fable-python",
#"fsharp-control-async-rx",
]
Loading