Skip to content

Commit

Permalink
Update test samples data url
Browse files Browse the repository at this point in the history
  • Loading branch information
risenW committed Jan 12, 2022
1 parent df75783 commit c130bc0
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 920 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ yarn add danfojs
```

For use directly in HTML files, you can add the latest script tag from [JsDelivr](https://www.jsdelivr.com/package/npm/danfojs) to your HTML file:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>

```html
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.js"></script>
```
See all available versions [here](https://www.jsdelivr.com/package/npm/danfojs)

Expand All @@ -86,7 +85,7 @@ See all available versions [here](https://www.jsdelivr.com/package/npm/danfojs)
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.js"></script>

<title>Document</title>
</head>
Expand Down
5 changes: 2 additions & 3 deletions src/danfojs-browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ yarn add danfojs
```

For use directly in HTML files, you can add the latest script tag from [JsDelivr](https://www.jsdelivr.com/package/npm/danfojs) to your HTML file:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>

```html
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.js"></script>
```
See all available versions [here](https://www.jsdelivr.com/package/npm/danfojs)

Expand All @@ -87,7 +86,7 @@ See all available versions [here](https://www.jsdelivr.com/package/npm/danfojs)
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.js"></script>

<title>Document</title>
</head>
Expand Down
6 changes: 3 additions & 3 deletions src/danfojs-browser/tests/io/csv.reader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe("readCSV", function () {
this.timeout(10000);
it("Read remote csv file works", async function () {
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/titanic.csv";
const remoteFile = "https://raw.githubusercontent.com/javascriptdata/danfojs/dev/src/danfojs-node/test/samples/titanic.csv";
let df = await dfd.readCSV(remoteFile, { header: true, preview: 5 });
assert.deepEqual(df.shape, [ 5, 8 ]);
assert.deepEqual(df.columns, [
Expand All @@ -25,7 +25,7 @@ describe("readCSV", function () {
});

it("Read remote csv file with config works", async function () {
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/titanic.csv";
const remoteFile = "https://raw.githubusercontent.com/javascriptdata/danfojs/dev/src/danfojs-node/test/samples/titanic.csv";
const frameConfig = {
columns: [
'A',
Expand Down Expand Up @@ -64,7 +64,7 @@ describe("readCSV", function () {
// this.timeout(100000);

// it("Streaming remote csv file with callback works", async function () {
// const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/titanic.csv";
// const remoteFile = "https://raw.githubusercontent.com/javascriptdata/danfojs/dev/src/danfojs-node/test/samples/titanic.csv";
// await dfd.streamCSV(remoteFile, (df) => {
// if (df) {
// assert.deepEqual(df.shape, [ 1, 8 ]);
Expand Down
4 changes: 2 additions & 2 deletions src/danfojs-browser/tests/io/excel.reader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe("readExcel", function () {
this.timeout(100000);
it("Read remote excel file works", async function () {
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/SampleData.xlsx";
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev//src/danfojs-node/test/samples/sample.xlsx";
let df = await dfd.readExcel(remoteFile);
assert.deepEqual(df.columns, [
'Year',
Expand All @@ -19,7 +19,7 @@ describe("readExcel", function () {
});

it("Read remote excel file with config works", async function () {
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/SampleData.xlsx";
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev//src/danfojs-node/test/samples/sample.xlsx";
const frameConfig = {
columns: [
'A',
Expand Down
4 changes: 2 additions & 2 deletions src/danfojs-browser/tests/io/json.reader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe("readJSON", function () {
this.timeout(100000);

it("Read remote csv file works", async function () {
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/book.json";
const remoteFile = "https://raw.githubusercontent.com/javascriptdata/danfojs/dev/src/danfojs-node/test/samples/book.json";
const df = await dfd.readJSON(remoteFile);
assert.deepEqual(df.columns, [
'book_id',
Expand All @@ -19,7 +19,7 @@ describe("readJSON", function () {
});

it("Read remote csv file with config works", async function () {
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/book.json";
const remoteFile = "https://raw.githubusercontent.com/javascriptdata/danfojs/dev/src/danfojs-node/test/samples/book.json";
const frameConfig = {
columns: [
'A',
Expand Down
5 changes: 2 additions & 3 deletions src/danfojs-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ yarn add danfojs
```

For use directly in HTML files, you can add the latest script tag from [JsDelivr](https://www.jsdelivr.com/package/npm/danfojs) to your HTML file:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>

```html
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.js"></script>
```
See all available versions [here](https://www.jsdelivr.com/package/npm/danfojs)

Expand All @@ -87,7 +86,7 @@ See all available versions [here](https://www.jsdelivr.com/package/npm/danfojs)
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.js"></script>

<title>Document</title>
</head>
Expand Down
30 changes: 15 additions & 15 deletions src/danfojs-node/test/io/excel.reader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ describe("readExcel", function () {
assert.deepEqual(df.shape, [0, 0])
});

it("Read remote excel file works", async function () {
const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/SampleData.xlsx"
let df: any = await readExcel(remoteFile, {});
assert.deepEqual(df.columns, [
'Year',
'Stocks',
'T.Bills',
'T.Bonds',
]);
assert.deepEqual(df.dtypes, [
'int32', 'float32',
'float32', 'float32',
]);
assert.deepEqual(df.shape, [82, 4])
});
// it("Read remote excel file works", async function () {
// const remoteFile = "https://github.com/javascriptdata/danfojs/raw/dev/src/danfojs-node/test/samples/sample.xlsx"
// let df: any = await readExcel(remoteFile, {});
// assert.deepEqual(df.columns, [
// 'Year',
// 'Stocks',
// 'T.Bills',
// 'T.Bonds',
// ]);
// assert.deepEqual(df.dtypes, [
// 'int32', 'float32',
// 'float32', 'float32',
// ]);
// assert.deepEqual(df.shape, [82, 4])
// });
});


Expand Down
4 changes: 2 additions & 2 deletions src/danfojs-node/test/io/json.reader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("readJSON", function () {
]);
});
// it("Read remote json file works", async function () {
// const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/book.json"
// const remoteFile = "https://raw.githubusercontent.com/javascriptdata/danfojs/dev/src/danfojs-node/test/samples/book.json"
// const df: any = await readJSON(remoteFile, {});
// assert.deepEqual(df.columns, [
// 'book_id',
Expand Down Expand Up @@ -75,7 +75,7 @@ describe("streamJSON", function () {
});

// it("Streaming remote json file with callback works", async function () {
// const remoteFile = "https://raw.githubusercontent.com/opensource9ja/danfojs/dev/danfojs-node/tests/samples/book.json"
// const remoteFile = "https://raw.githubusercontent.com/javascriptdata/danfojs/dev/src/danfojs-node/test/samples/book.json"
// await streamJSON(remoteFile, { header: true }, (df: any) => {
// if (df) {
// df.print();
Expand Down
Binary file modified src/danfojs-node/test/samples/sampleOut.xlsx
Binary file not shown.
Binary file modified src/danfojs-node/test/samples/test.xlsx
Binary file not shown.
Binary file modified src/danfojs-node/test/samples/testSeries.xlsx
Binary file not shown.
Loading

0 comments on commit c130bc0

Please sign in to comment.