Skip to content

Commit

Permalink
Adding tests and updating the CI to utilize workflows (#51)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
brettwebst authored Aug 4, 2024
1 parent a969e5b commit 6cbf51a
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 88 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build_matrix:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest

runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
26 changes: 26 additions & 0 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: MacOS Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
#- name: Test
# run: dotnet test --no-build --verbosity normal
26 changes: 26 additions & 0 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Ubuntu Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
26 changes: 26 additions & 0 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Windows Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
28 changes: 0 additions & 28 deletions ci-build/mac-ci-pipeline.yml

This file was deleted.

28 changes: 0 additions & 28 deletions ci-build/ubuntu-ci-pipeline.yml

This file was deleted.

28 changes: 0 additions & 28 deletions ci-build/win-ci-pipeline.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/Pandas.NET/Pandas.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ItemGroup>
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.16.0" />
<PackageReference Include="SciSharp.TensorFlow.Redist-OSX" Version="2.15.0" />
<PackageReference Include="TensorFlow.Keras" Version="0.15.0" />
<PackageReference Include="TensorFlow.NET" Version="0.150.0" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion test/Pandas.NET.Test/Pandas.NET.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="TensorFlow.NET" Version="0.150.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
4 changes: 2 additions & 2 deletions test/PandasConsole/DataFrames/PandasConsole.indexers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public DataFrame GetSampleDataFrame()
return df;
}


// index on multiple columns
public (DataFrame, DataFrame) MultiColumnIndexer()
{
var df = GetSampleDataFrame();
return (df, df["col_1","col_2"]);
}
}
}
}

0 comments on commit 6cbf51a

Please sign in to comment.