Skip to content

Commit 6cbf51a

Browse files
authored
Adding tests and updating the CI to utilize workflows (#51)
* renamed a few test files. tested the dropna function * indexer tests * subtraction * Subtract, divide, and equals * DataFrame operators - equality * added pop test * Sample test added. Added support for sample with replace. * Create ubuntu-dotnet.yml * Update ubuntu-dotnet.yml * Remove reference to TensorFlow.NET * Update PandasConsole.indexers.cs * Update and rename ubuntu-dotnet.yml to build-and-test.yml * ubuntu, windows, and macos ci * fixing macos file 1 * mac os dependencies * macox test * another test * more tweaks * fixing up the macos build * more ci work * removed tensorflow from test package * disable the macos test for now
1 parent a969e5b commit 6cbf51a

File tree

10 files changed

+113
-88
lines changed

10 files changed

+113
-88
lines changed

.github/workflows/build-and-test.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: Build and Test
5+
on:
6+
push:
7+
branches: [ "master" ]
8+
pull_request:
9+
branches: [ "master" ]
10+
11+
jobs:
12+
build_matrix:
13+
strategy:
14+
matrix:
15+
os:
16+
- ubuntu-latest
17+
- windows-latest
18+
19+
runs-on: ${{matrix.os}}
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: 8.0.x
27+
- name: Restore dependencies
28+
run: dotnet restore
29+
- name: Build
30+
run: dotnet build --no-restore
31+
- name: Test
32+
run: dotnet test --no-build --verbosity normal

.github/workflows/macos-ci.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: MacOS Build and Test
5+
on:
6+
push:
7+
branches: [ "master" ]
8+
pull_request:
9+
branches: [ "master" ]
10+
11+
jobs:
12+
build:
13+
runs-on: macos-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.0.x
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
- name: Build
24+
run: dotnet build --no-restore
25+
#- name: Test
26+
# run: dotnet test --no-build --verbosity normal

.github/workflows/ubuntu-ci.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: Ubuntu Build and Test
5+
on:
6+
push:
7+
branches: [ "master" ]
8+
pull_request:
9+
branches: [ "master" ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.0.x
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
- name: Build
24+
run: dotnet build --no-restore
25+
- name: Test
26+
run: dotnet test --no-build --verbosity normal

.github/workflows/windows-ci.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: Windows Build and Test
5+
on:
6+
push:
7+
branches: [ "master" ]
8+
pull_request:
9+
branches: [ "master" ]
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.0.x
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
- name: Build
24+
run: dotnet build --no-restore
25+
- name: Test
26+
run: dotnet test --no-build --verbosity normal

ci-build/mac-ci-pipeline.yml

-28
This file was deleted.

ci-build/ubuntu-ci-pipeline.yml

-28
This file was deleted.

ci-build/win-ci-pipeline.yml

-28
This file was deleted.

src/Pandas.NET/Pandas.NET.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<ItemGroup>
2222
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
2323
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.16.0" />
24+
<PackageReference Include="SciSharp.TensorFlow.Redist-OSX" Version="2.15.0" />
2425
<PackageReference Include="TensorFlow.Keras" Version="0.15.0" />
25-
<PackageReference Include="TensorFlow.NET" Version="0.150.0" />
2626
</ItemGroup>
2727
</Project>

test/Pandas.NET.Test/Pandas.NET.Test.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<PrivateAssets>all</PrivateAssets>
1414
</PackageReference>
1515
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
16-
<PackageReference Include="TensorFlow.NET" Version="0.150.0" />
1716
<PackageReference Include="xunit" Version="2.7.0" />
1817
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
1918
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

test/PandasConsole/DataFrames/PandasConsole.indexers.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public DataFrame GetSampleDataFrame()
1818
return df;
1919
}
2020

21-
21+
// index on multiple columns
2222
public (DataFrame, DataFrame) MultiColumnIndexer()
2323
{
2424
var df = GetSampleDataFrame();
2525
return (df, df["col_1","col_2"]);
2626
}
2727
}
28-
}
28+
}

0 commit comments

Comments
 (0)