Skip to content

Commit

Permalink
refactor: Update imports and class names in test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
endomorphosis committed Sep 4, 2024
1 parent db74d64 commit 2c1a172
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export * from './ipfs_model_manager_js/test_fio.js';
export { ipfsModelManagerJs } from './ipfs_model_manager_js/ipfs_model_manager.js';
export { ipfsModelManagerJs as default } from './ipfs_model_manager_js/ipfs_model_manager.js';
export * from './test/test.js'
export { testIpfsModelManagerJs } from './test/test.js'
const test = new testIpfsModelManager();
export { test_ipfs_model_manager_js } from './test/test.js'
const test = new test_ipfs_model_manager_js();
export { test }
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ipfs_model_manager_js",
"version": "1.0.27",
"version": "1.0.28",
"description": "This is a model manager and wrapper for huggingface, and it maintains an index of models from collections of models store retrieved through local/https/s3/ipfs/orbitdb, then maintains a state of which what models are currently accesible, and it will choose what files should be cached through local/s3/ipfs/ based on configuration settings.",
"type": "module",
"main": "index.js",
Expand Down
9 changes: 5 additions & 4 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import os from "os";
import { exec, execSync } from "child_process";
import { t } from "tar";

export class testIpfsModelManagerJs {
export class test_ipfs_model_manager_js {
constructor(resources = {}, metadata = {}) {
this.ipfsModelManager = new ipfsModelManagerJs(resources, metadata)
this.orbitDbKit = new orbitDbKitJs(resources, metadata)
Expand Down Expand Up @@ -367,7 +367,7 @@ export class testIpfsModelManagerJs {
return test_results;
}
}
export default testIpfsModelManagerJs;
export default test_ipfs_model_manager_js;

export class testS3Kit {
constructor(resources = {}, metadata = {}) {
Expand Down Expand Up @@ -601,7 +601,7 @@ if (import.meta.url === 'file://' + process.argv[1]) {
// console.log("testS3Kit error: ", error);
// // throw error;
// });
const testModelManager = new testIpfsModelManager();
const testModelManager = new test_ipfs_model_manager_js();
await testModelManager.init().then((init) => {
test_results.init = init;
console.log("testIpfsModelManager init: ", init);
Expand Down Expand Up @@ -648,4 +648,5 @@ if (import.meta.url === 'file://' + process.argv[1]) {
console.log(err);
// process.exit(1);
}
}
}

0 comments on commit 2c1a172

Please sign in to comment.