Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test ci #50

Merged
merged 31 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ef8c48d
renamed a few test files.
brettwebst Apr 6, 2024
e4b1bfb
Merge pull request #2 from brettwebst/issue-32-add-dropna-test
brettwebst Apr 6, 2024
507e601
Merge branch 'SciSharp:master' into master
brettwebst Apr 6, 2024
c99194b
Merge branch 'SciSharp:master' into master
brettwebst Apr 6, 2024
8f7fd19
indexer tests
brettwebst Apr 14, 2024
f156da8
Merge pull request #3 from brettwebst/issue-32-add-index-test
brettwebst Apr 14, 2024
8f7890e
Merge branch 'SciSharp:master' into master
brettwebst Apr 27, 2024
4180a8c
subtraction
brettwebst Apr 27, 2024
671dc47
Subtract, divide, and equals
brettwebst Jul 14, 2024
47539a6
DataFrame operators - equality
brettwebst Jul 21, 2024
2b7a6cc
Merge pull request #4 from brettwebst/issue-32-operator-test-2
brettwebst Jul 21, 2024
a81e505
added pop test
brettwebst Jul 27, 2024
345a42c
Merge pull request #5 from brettwebst/issue-32-pop-test
brettwebst Jul 27, 2024
3550ff8
Sample test added.
brettwebst Jul 27, 2024
e5fd6fc
Merge pull request #6 from brettwebst/issue-32-sample
brettwebst Jul 27, 2024
2aca3ab
Create ubuntu-dotnet.yml
brettwebst Jul 27, 2024
fd2e0df
Merge pull request #7 from brettwebst/brettwebst-patch-1
brettwebst Jul 27, 2024
0b014a5
Update ubuntu-dotnet.yml
brettwebst Jul 27, 2024
5bc0a74
Remove reference to TensorFlow.NET
brettwebst Jul 27, 2024
5a4ab95
Update PandasConsole.indexers.cs
brettwebst Jul 27, 2024
239d97b
Merge pull request #9 from brettwebst/brettwebst-patch-1
brettwebst Jul 27, 2024
1068652
ubuntu, windows, and macos ci
brettwebst Jul 27, 2024
1bb1df4
fixing macos file 1
brettwebst Jul 27, 2024
d007f7b
mac os dependencies
brettwebst Jul 27, 2024
9550ed1
macox test
brettwebst Jul 27, 2024
b8e16a7
another test
brettwebst Jul 27, 2024
5a2531e
more tweaks
brettwebst Jul 27, 2024
1bf3d80
fixing up the macos build
brettwebst Jul 27, 2024
339682f
more ci work
brettwebst Jul 27, 2024
014a1e5
removed tensorflow from test package
brettwebst Jul 27, 2024
e09cc34
disable the macos test for now
brettwebst Aug 4, 2024
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
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
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/test/Pandas.NET.Test/bin/Debug/net8.0/Pandas.NET.Test.dll",
"args": [],
"cwd": "${workspaceFolder}/test/Pandas.NET.Test",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/Pandas.NET.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/Pandas.NET.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/Pandas.NET.sln"
],
"problemMatcher": "$msCompile"
}
]
}
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.

11 changes: 11 additions & 0 deletions src/Pandas.NET/Columns/Column.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ public class Column
public string Name { get; set; }
public Type DType { get; set; }


public Column()
{
}

public Column(string name, Type dtype)
{
Name = name;
DType = dtype;
}

public override string ToString()
=> $"{Name} {DType}";
}
Expand Down
6 changes: 6 additions & 0 deletions src/Pandas.NET/DataFrames/DataFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public DataFrame(List<Series> data, Series index = null, List<Column> columns =
index.size,
columns.Count
};

foreach (var s in _data)
{
s.SetIndex(_index);
}

}
}
}
27 changes: 27 additions & 0 deletions src/Pandas.NET/DataFrames/DataFrame.operator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public partial class DataFrame
{
data.Add(a.data[i] - b.data switch
{
double[] double64 => double64[i],
float[] float32 => float32[i],
int[] int32 => int32[i],
_ => throw new NotImplementedException("")
});
}
Expand All @@ -32,14 +34,26 @@ public partial class DataFrame
{
data.Add(a.data[i] / b.data switch
{
double[] double64 => double64[i],
float[] float32 => float32[i],
int[] int32 => int32[i],
_ => throw new NotImplementedException("")
});
}

return new DataFrame(data, index: a.index, columns: a.columns);
}

public static DataFrame operator *(DataFrame a, Series b)
{
var data = new List<Series>();
for(int i=0;i<a.data.Count; i++)
{
data.Add(a.data[i] * Convert.ToDouble(b.data.GetValue(i)));
}
return new DataFrame(data, index: a.index, columns: a.columns);
}

public static bool operator ==(DataFrame a, DataFrame b)
{
// do they have the same number of columns?
Expand Down Expand Up @@ -76,5 +90,18 @@ public partial class DataFrame
{
return !(a == b);
}

public override bool Equals(object obj)
{
return obj is DataFrame frame &&
data == frame.data &&
columns == frame.columns &&
index == frame.index;
}

public override int GetHashCode()
{
return HashCode.Combine(data, columns, index);
}
}
}
Loading
Loading