Skip to content

Commit

Permalink
several small changes to test stack
Browse files Browse the repository at this point in the history
  • Loading branch information
HLWeil committed Feb 29, 2024
1 parent b5eaaed commit 66b83a2
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build/TestTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module RunTests =
]

let runTestsPy = BuildTask.create "runTestsPy" [clean; build] {
for path in testProjectsPy do
for path in ProjectInfo.testProjects do
//transpile py files from fsharp code
run dotnet $"fable {path} -o {path}/py --lang python" ""
// run pyxpecto in target path to execute tests in python
Expand Down
4 changes: 4 additions & 0 deletions src/ARCtrl/Templates/Template.Json.fs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ module Template =
get.Required.Field "authors" (Decode.array personDecoder),
get.Required.Field "endpoint_repositories" (Decode.array oaDecoder),
get.Required.Field "tags" (Decode.array oaDecoder),
#if FABLE_COMPILER_PYTHON
get.Required.Field "last_updated" Decode.datetimeLocal // Currently not supported in Thoth.Json.Core for python
#else
get.Required.Field "last_updated" Decode.datetimeUtc
#endif
)
)

Expand Down
2 changes: 1 addition & 1 deletion src/ARCtrl/WebRequest/WebRequest.Node.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

open Fable.Core
open Fable.SimpleHttp
let x = 1

#if FABLE_COMPILER_JAVASCRIPT
open Fable.Core.JsInterop

Expand Down
5 changes: 0 additions & 5 deletions src/ISA/ISA.Json/ARCtrl.ISA.Json.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@
<ItemGroup>
<ProjectReference Include="..\ISA\ARCtrl.ISA.fsproj" />
</ItemGroup>
<PropertyGroup>
<NpmDependencies>
<NpmPackage Name="jsonschema" Version="gte 1.1.0 lt 2.0.0" ResolutionStrategy="Max" />
</NpmDependencies>
</PropertyGroup>
<ItemGroup>
<Content Include="*.fsproj; **\*.fs; **\*.fsi" PackagePath="fable\" />
</ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/ISA/ISA/Helper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ module HashCodes =

open Fable.Core

#if FABLE_COMPILER_PYTHON
[<Emit("hasattr($0,\"__hash__\")")>]
let pyHasCustomHash (obj) : bool = nativeOnly

[<Emit("$0.__hash__()")>]
let pyCustomHash (obj) : int = nativeOnly
#endif

let hash obj =
#if FABLE_COMPILER_PYTHON
Expand Down
4 changes: 2 additions & 2 deletions tests/ISA/ISA.Json.Tests/ArcTypes.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ let tests_ArcAssay = testList "ArcAssay" [
let expectedMs = 5000
#endif
#if FABLE_COMPILER_PYTHON
let expectedMs = 40000
let expectedMs = 100000
#endif
#if !FABLE_COMPILER
let expectedMs = 2000
let expectedMs = 2500
#endif
// 1200ms in Dotnet on i7-13800H
// 3412ms in Javascript on i7-13800H
Expand Down
6 changes: 5 additions & 1 deletion tests/ISA/ISA.Json.Tests/ISA.Json.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
<Compile Include="Json.Tests.fs" />
<Compile Include="Main.fs" />
</ItemGroup>
<ItemGroup />
<PropertyGroup>
<NpmDependencies>
<NpmPackage Name="jsonschema" Version="gte 1.1.0 lt 2.0.0" ResolutionStrategy="Max" />
</NpmDependencies>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\ISA\ISA.Json\ARCtrl.ISA.Json.fsproj" />
<ProjectReference Include="..\..\TestingUtils\TestingUtils.fsproj" />
Expand Down
2 changes: 1 addition & 1 deletion tests/ISA/ISA.Tests/ArcTable.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,7 @@ let private tests_fillMissing = testList "fillMissing" [
ArcTableAux.Unchecked.setCellAt(6,i,(CompositeCell.FreeText $"Sample_{i}")) values
let testF = fun () -> ArcTableAux.Unchecked.fillMissingCells headers values
#if FABLE_COMPILER_PYTHON
let expectedMs = 8000
let expectedMs = 10000
#else
let expectedMs = 220
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/JavaScript/ISA.CompositeCell.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { equal, deepEqual, notEqual } from 'assert';
import { CompositeCell } from "./ARCtrl/ISA/ISA/ArcTypes/CompositeCell.js"
import { OntologyAnnotation } from './ARCtrl/ISA/ISA/JsonTypes/OntologyAnnotation.js';
import { assertEqual } from './ARCtrl/fable_modules/fable-library.4.5.0/Util.js';
import { assertEqual } from './ARCtrl/fable_modules/fable-library-js.4.13.0/Util.js';



Expand Down
2 changes: 1 addition & 1 deletion tests/JavaScript/ISA.CompositeHeader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { equal, deepEqual, notEqual } from 'assert';
import { CompositeHeader, IOType } from "./ARCtrl/ISA/ISA/ArcTypes/CompositeHeader.js"
import { OntologyAnnotation } from './ARCtrl/ISA/ISA/JsonTypes/OntologyAnnotation.js';
import { assertEqual } from './ARCtrl/fable_modules/fable-library.4.5.0/Util.js';
import { assertEqual } from './ARCtrl/fable_modules/fable-library-js.4.13.0/Util.js';

function tests_IOType() {
describe('IOType', function () {
Expand Down

0 comments on commit 66b83a2

Please sign in to comment.