Skip to content

Commit

Permalink
refactor: rename tools with demo_ prefix (#89)
Browse files Browse the repository at this point in the history
* refactor: rename tools with demo_ prefix

Co-Authored-By: Nicolas Arqueros <nico@dcspark.io>

* refactor: rename tools with demo_ prefix

Co-Authored-By: Nicolas Arqueros <nico@dcspark.io>

* - fix: wrong demo_

* - fix: updated deno lock

* - fix: copy tools files

* - fix: playwright test

* - fix: defillama test

* - fix: non working tests

* - remove doc test

* - ci: bump 0.9.6

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Nicolas Arqueros <nico@dcspark.io>
Co-authored-by: Alfredo Gallardo <agallardol@outlook.com>
  • Loading branch information
3 people authored Dec 18, 2024
1 parent b48ff4c commit 1a15041
Show file tree
Hide file tree
Showing 45 changed files with 185 additions and 154 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ jobs:
- name: Run NX lint
env:
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
EMBEDDING_API_URL : ${{ vars.EMBEDDING_API_URL }}
EMBEDDING_API_URL : debug
run: |
npx nx run-many -t lint --verbose
- name: Run NX test
env:
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
EMBEDDING_API_URL : ${{ vars.EMBEDDING_API_URL }}
EMBEDDING_API_URL : debug
run: |
npx nx run-many -t test --parallel=false --skip-nx-cache
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@shinkai_protocol/shinkai-tool-echo",
"name": "@shinkai_protocol/demo-shinkai-tool-echo",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-echo/src",
"sourceRoot": "apps/demo-shinkai-tool-echo/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-echo/src/index.ts --outputFolder ./dist/apps/shinkai-tool-echo"
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-echo/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-echo"
},
"configurations": {
"development": {},
Expand All @@ -19,13 +19,13 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-echo/src/index.ts"
"command": "deno lint apps/demo-shinkai-tool-echo/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-echo/src/**/*.test.ts"
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-echo/src/**/*.test.ts"
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@shinkai_protocol/shinkai-tool-foobar",
"name": "@shinkai_protocol/demo-shinkai-tool-ethplorer-tokens",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-foobar/src",
"sourceRoot": "apps/demo-shinkai-tool-ethplorer-tokens/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-foobar/src/index.ts --outputFolder ./dist/apps/shinkai-tool-foobar"
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-ethplorer-tokens/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-ethplorer-tokens"
},
"configurations": {
"development": {},
Expand All @@ -19,13 +19,13 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-foobar/src/index.ts"
"command": "deno lint apps/demo-shinkai-tool-ethplorer-tokens/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-foobar/src/**/*.test.ts"
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-ethplorer-tokens/src/**/*.test.ts"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@shinkai_protocol/shinkai-tool-token-price",
"name": "@shinkai_protocol/demo-shinkai-tool-foobar",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-token-price/src",
"sourceRoot": "apps/demo-shinkai-tool-foobar/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-token-price/src/index.ts --outputFolder ./dist/apps/shinkai-tool-token-price"
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-foobar/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-foobar"
},
"configurations": {
"development": {},
Expand All @@ -19,13 +19,13 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-token-price/src/index.ts"
"command": "deno lint apps/demo-shinkai-tool-foobar/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-token-price/src/**/*.test.ts"
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-foobar/src/**/*.test.ts"
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@shinkai_protocol/shinkai-tool-weather-by-city",
"name": "@shinkai_protocol/demo-shinkai-tool-json-to-md",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-weather-by-city/src",
"sourceRoot": "apps/demo-shinkai-tool-json-to-md/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-weather-by-city/src/index.ts --outputFolder ./dist/apps/shinkai-tool-weather-by-city"
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-json-to-md/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-json-to-md"
},
"configurations": {
"development": {},
Expand All @@ -19,13 +19,13 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-weather-by-city/src/index.ts"
"command": "deno lint apps/demo-shinkai-tool-json-to-md/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-weather-by-city/src/**/*.test.ts"
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-json-to-md/src/**/*.test.ts"
}
}
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@shinkai_protocol/shinkai-tool-leiden",
"name": "@shinkai_protocol/demo-shinkai-tool-leiden",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-leiden/src",
"sourceRoot": "apps/demo-shinkai-tool-leiden/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-leiden/src/index.ts --outputFolder ./dist/apps/shinkai-tool-leiden"
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-leiden/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-leiden"
},
"configurations": {
"development": {},
Expand All @@ -19,13 +19,13 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-leiden/src/index.ts"
"command": "deno lint apps/demo-shinkai-tool-leiden/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-leiden/src/**/*.test.ts"
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-leiden/src/**/*.test.ts"
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions apps/demo-shinkai-tool-playwright-example/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@shinkai_protocol/demo-shinkai-tool-playwright-example",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/demo-shinkai-tool-playwright-example/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-playwright-example/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-playwright-example"
},
"configurations": {
"development": {},
"production": {}
}
},
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/demo-shinkai-tool-playwright-example/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-playwright-example/src/**/*.test.ts"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@shinkai_protocol/shinkai-tool-web3-eth-balance",
"name": "@shinkai_protocol/demo-shinkai-tool-token-price",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-web3-eth-balance/src",
"sourceRoot": "apps/demo-shinkai-tool-token-price/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-web3-eth-balance/src/index.ts --outputFolder ./dist/apps/shinkai-tool-web3-eth-balance"
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-token-price/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-token-price"
},
"configurations": {
"development": {},
Expand All @@ -19,13 +19,13 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-web3-eth-balance/src/index.ts"
"command": "deno lint apps/demo-shinkai-tool-token-price/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-web3-eth-balance/src/**/*.test.ts"
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-token-price/src/**/*.test.ts"
}
}
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@shinkai_protocol/shinkai-tool-ethplorer-tokens",
"name": "@shinkai_protocol/demo-shinkai-tool-weather-by-city",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-ethplorer-tokens/src",
"sourceRoot": "apps/demo-shinkai-tool-weather-by-city/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-ethplorer-tokens/src/index.ts --outputFolder ./dist/apps/shinkai-tool-ethplorer-tokens"
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-weather-by-city/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-weather-by-city"
},
"configurations": {
"development": {},
Expand All @@ -19,13 +19,13 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-ethplorer-tokens/src/index.ts"
"command": "deno lint apps/demo-shinkai-tool-weather-by-city/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-ethplorer-tokens/src/**/*.test.ts"
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-weather-by-city/src/**/*.test.ts"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@shinkai_protocol/shinkai-tool-json-to-md",
"name": "@shinkai_protocol/demo-shinkai-tool-web3-eth-balance",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-json-to-md/src",
"sourceRoot": "apps/demo-shinkai-tool-web3-eth-balance/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-json-to-md/src/index.ts --outputFolder ./dist/apps/shinkai-tool-json-to-md"
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-web3-eth-balance/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-web3-eth-balance"
},
"configurations": {
"development": {},
Expand All @@ -19,13 +19,13 @@
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-json-to-md/src/index.ts"
"command": "deno lint apps/demo-shinkai-tool-web3-eth-balance/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-json-to-md/src/**/*.test.ts"
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-web3-eth-balance/src/**/*.test.ts"
}
}
}
Expand Down
32 changes: 32 additions & 0 deletions apps/demo-shinkai-tool-web3-eth-uniswap/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@shinkai_protocol/demo-shinkai-tool-web3-eth-uniswap",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/demo-shinkai-tool-web3-eth-uniswap/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/demo-shinkai-tool-web3-eth-uniswap/src/index.ts --outputFolder ./dist/apps/demo-shinkai-tool-web3-eth-uniswap"
},
"configurations": {
"development": {},
"production": {}
}
},
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/demo-shinkai-tool-web3-eth-uniswap/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/demo-shinkai-tool-web3-eth-uniswap/src/**/*.test.ts"
}
}
}
}
2 changes: 2 additions & 0 deletions apps/shinkai-tool-defillama-tvl-rankings/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Deno.test('exists definition', () => {
Deno.test({
name: 'run using top10=false, categoryName=Liquid Staking, networkName=Ethereum',
ignore: Deno.env.get('CI') === 'true' || Deno.build.os === 'windows',
sanitizeResources: false,
sanitizeOps: false,
fn: async () => {
const run_result = await run(
{
Expand Down
4 changes: 2 additions & 2 deletions apps/shinkai-tool-defillama-tvl-rankings/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const withPage = async <T>(
): Promise<T> => {
const browser = await playwright['chromium'].launch({
executablePath: chromePath,
headless: true,
headless: false,
});

const context = await browser.newContext({
Expand Down Expand Up @@ -135,7 +135,7 @@ const getHeaders = async (
page: playwright.Page,
): Promise<(string | null)[]> => {
const locator = page.locator(
'#table-header > div > div:nth-child(3) > span > span',
'#table-header > div > div:nth-child(3) > span',
{ hasText: 'Name' },
);
await locator.waitFor({ state: 'visible' });
Expand Down
2 changes: 2 additions & 0 deletions apps/shinkai-tool-perplexity/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Deno.test('exists definition', () => {

Deno.test({
name: 'run',
sanitizeResources: false,
sanitizeOps: false,
ignore: Deno.env.get('CI') === 'true',
fn: async () => {
const run_result = await run(
Expand Down
Loading

0 comments on commit 1a15041

Please sign in to comment.