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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
"fable": {
"version": "4.0.0-snake-island-alpha-006",
"version": "4.0.0-snake-island-alpha-014",
"commands": [
"fable"
]
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,40 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100

- name: Setup dotnet tools
run: dotnet tool restore

- name: Install src dependencies
run: dotnet restore src

- name: Install test dependencies
run: dotnet restore test

- name: Install pytest runner
run: pip install pytest

- name: Install build dependencies
run: dotnet restore Build.fsproj

#- name: Check formatting
# run: dotnet fantomas . -r --check

- name: Build
run: dotnet run Build --configuration Release --no-restore

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

- name: Test
run: dotnet run Test
2 changes: 1 addition & 1 deletion Build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Target.create "Test" (fun _ ->
"python", dotnet $"fable --lang Python --outDir {buildPath}/tests" testsPath
]
|> runParallel
run pytest $"{buildPath}/tests" ""
run poetry $"run pytest {buildPath}/tests" ""
)

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


let pytest = createProcess "pytest"
let poetry = createProcess "poetry"

let npm =
let npmPath =
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ how to deal with Python version handling.
Prerequisite for compiling F# to Python using Fable:

```sh
> dotnet tool install --global fable --version 4.0.0-snake-island-alpha-006
> dotnet add package Fable.Core --version 4.0.0-snake-island-alpha-006
> dotnet tool install --global fable --version 4.0.0-snake-island-alpha-014
> dotnet add package Fable.Core --version 4.0.0-snake-island-alpha-007
```

To use the `Fable.Python` library in your Fable project:
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ instead.
- Timeflies, use Fable Python with Tkinter and AsyncRx

NOTE: If you make demos or examples with Fable Python then please
consider providing a PR so we can add it here.
consider providing a PR so we can add it here.
2 changes: 1 addition & 1 deletion examples/timeflies/TimeFlies.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Fable.Python" Version="0.17.0" />
<PackageReference Include="Fable.Core" Version="4.0.0-snake-island-alpha-006" />
<PackageReference Include="Fable.Core" Version="4.0.0-snake-island-alpha-007" />
<PackageReference Include="FSharp.Control.AsyncRx" Version="1.6.1" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ storage: none
framework: net6.0, netstandard2.0, netstandard2.1

nuget FSharp.Core ~> 4.7
nuget Fable.Core >= 4.0.0-snake-island-alpha-006
nuget Fable.Core >= 4.0.0-snake-island-alpha-007

group Test
source https://api.nuget.org/v3/index.json
storage: none
framework: net6.0

nuget FSharp.Core
nuget Fable.Core >= 4.0.0-snake-island-alpha-006
nuget Fable.Core >= 4.0.0-snake-island-alpha-007
nuget Microsoft.NET.Test.Sdk ~> 16
nuget XUnit ~> 2
nuget xunit.runner.visualstudio ~> 2
Expand Down
4 changes: 2 additions & 2 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ STORAGE: NONE
RESTRICTION: || (== net6.0) (== netstandard2.0) (== netstandard2.1)
NUGET
remote: https://api.nuget.org/v3/index.json
Fable.Core (4.0.0-snake-island-alpha-006)
Fable.Core (4.0.0-snake-island-alpha-007)
FSharp.Core (4.7.2)

GROUP Build
Expand Down Expand Up @@ -63,7 +63,7 @@ STORAGE: NONE
RESTRICTION: == net6.0
NUGET
remote: https://api.nuget.org/v3/index.json
Fable.Core (4.0.0-snake-island-alpha-006)
Fable.Core (4.0.0-snake-island-alpha-007)
FSharp.Core (6.0.5)
Microsoft.CodeCoverage (17.2)
Microsoft.NET.Test.Sdk (16.11)
Expand Down
163 changes: 163 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[tool.poetry]
name = "Fable Python"
version = "4.0.0"
description = "Fable"
authors = ["Dag Brattli <dag@brattli.net>"]
license = "MIT License"
readme = "README.md"
homepage = "https://fable.io"

[tool.poetry.dependencies]
python = ">= 3.9, < 4.0"
fable-library = ""

[tool.poetry.dev-dependencies]
fable-library = {path = "./build/fable_modules/fable-library", develop = true}
pytest = "^6.2.4"

[tool.pyright]
reportMissingTypeStubs = false
reportMissingImports = false
reportUnnecessaryTypeIgnoreComment = true
reportUnusedImport = true
reportUnusedVariable = true
reportUnnecessaryIsInstance = true
reportUnnecessaryComparison = true
reportUnnecessaryCast = true
reportPrivateUsage = true
reportImportCycles = true
reportDuplicateImport = true
reportConstantRedefinition = true
reportOverlappingOverload = true
reportInconsistentConstructor = true
reportImplicitStringConcatenation = true
pythonVersion = "3.10"
typeCheckingMode = "basic"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"