diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1eb75a..144af30 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,3 +29,9 @@ repos: language: system types: [rust] pass_filenames: false + - id: biome + name: biome + entry: bash -c 'cd docs && npx biome ci src/ docusaurus.config.ts sidebars.ts' + language: system + files: ^docs/src/|^docs/docusaurus\.config\.ts|^docs/sidebars\.ts + pass_filenames: false diff --git a/README.md b/README.md index 3a2413b..2ed6783 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,12 @@ **A fast, Rust-backed DAG engine for Python.** +[](https://github.com/ByteVeda/dagron/actions/workflows/ci.yml) [](https://python.org) [](https://www.rust-lang.org) [](LICENSE) [](https://pypi.org/project/dagron/) +[](https://byteveda.github.io/dagron/) Build, execute, and analyze directed acyclic graphs with a fluent Python API — powered by Rust and [petgraph](https://github.com/petgraph/petgraph) under the hood. diff --git a/docs/biome.json b/docs/biome.json new file mode 100644 index 0000000..0817143 --- /dev/null +++ b/docs/biome.json @@ -0,0 +1,55 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.4.9/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "files": { + "ignoreUnknown": true, + "includes": ["src/**", "docusaurus.config.ts", "sidebars.ts"] + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "correctness": { + "noUnusedImports": "warn" + }, + "suspicious": { + "noExplicitAny": "off", + "noArrayIndexKey": "off" + }, + "a11y": { + "useButtonType": "warn", + "noStaticElementInteractions": "off", + "noLabelWithoutControl": "off" + }, + "complexity": { + "noImportantStyles": "off" + }, + "style": { + "noNonNullAssertion": "off" + } + } + }, + "javascript": { + "formatter": { + "quoteStyle": "single", + "trailingCommas": "all" + } + }, + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": "on" + } + } + } +} diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 2c9922f..b84298b 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -1,17 +1,16 @@ -import {themes as prismThemes} from 'prism-react-renderer'; -import type {Config} from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; -import type {Plugin} from '@docusaurus/types'; +import type { Config, Plugin } from '@docusaurus/types'; +import { themes as prismThemes } from 'prism-react-renderer'; const config: Config = { title: 'dagron', tagline: 'High-performance DAG execution engine for Python, powered by Rust', favicon: 'img/favicon.ico', - url: 'https://dagron.dev', - baseUrl: '/', + url: 'https://byteveda.github.io', + baseUrl: '/dagron/', - organizationName: 'dagron', + organizationName: 'ByteVeda', projectName: 'dagron', onBrokenLinks: 'throw', @@ -36,9 +35,7 @@ const config: Config = { name: 'ignore-vscode-languageserver-warning', configureWebpack() { return { - ignoreWarnings: [ - {module: /vscode-languageserver-types/}, - ], + ignoreWarnings: [{ module: /vscode-languageserver-types/ }], }; }, }; @@ -80,17 +77,17 @@ const config: Config = { label: 'API Reference', }, { - href: 'https://github.com/pratyush618/dagron/blob/master/CHANGELOG.md', + href: 'https://github.com/ByteVeda/dagron/blob/master/CHANGELOG.md', label: 'Changelog', position: 'right', }, { - href: 'https://github.com/pratyush618/dagron/blob/master/CONTRIBUTING.md', + href: 'https://github.com/ByteVeda/dagron/blob/master/CONTRIBUTING.md', label: 'Contributing', position: 'right', }, { - href: 'https://github.com/dagron/dagron', + href: 'https://github.com/ByteVeda/dagron', label: 'GitHub', position: 'right', }, @@ -102,17 +99,23 @@ const config: Config = { { title: 'Documentation', items: [ - {label: 'Guide', to: '/guide/getting-started'}, - {label: 'API Reference', to: '/api/core/core'}, + { label: 'Guide', to: '/guide/getting-started' }, + { label: 'API Reference', to: '/api/core/core' }, ], }, { title: 'More', items: [ - {label: 'GitHub', href: 'https://github.com/dagron/dagron'}, - {label: 'PyPI', href: 'https://pypi.org/project/dagron/'}, - {label: 'Changelog', href: 'https://github.com/pratyush618/dagron/blob/master/CHANGELOG.md'}, - {label: 'Contributing', href: 'https://github.com/pratyush618/dagron/blob/master/CONTRIBUTING.md'}, + { label: 'GitHub', href: 'https://github.com/ByteVeda/dagron' }, + { label: 'PyPI', href: 'https://pypi.org/project/dagron/' }, + { + label: 'Changelog', + href: 'https://github.com/ByteVeda/dagron/blob/master/CHANGELOG.md', + }, + { + label: 'Contributing', + href: 'https://github.com/ByteVeda/dagron/blob/master/CONTRIBUTING.md', + }, ], }, ], @@ -121,10 +124,17 @@ const config: Config = { prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula, - additionalLanguages: ['python', 'rust', 'typescript', 'bash', 'json', 'toml'], + additionalLanguages: [ + 'python', + 'rust', + 'typescript', + 'bash', + 'json', + 'toml', + ], }, mermaid: { - theme: {light: 'default', dark: 'dark'}, + theme: { light: 'default', dark: 'dark' }, options: {}, }, colorMode: { diff --git a/docs/package-lock.json b/docs/package-lock.json index 54336b1..70f6f58 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -18,6 +18,7 @@ "react-dom": "^19.0.0" }, "devDependencies": { + "@biomejs/biome": "2.4.10", "@docusaurus/module-type-aliases": "^3.9.2", "@docusaurus/tsconfig": "^3.9.2", "@docusaurus/types": "^3.9.2", @@ -1986,6 +1987,169 @@ "node": ">=6.9.0" } }, + "node_modules/@biomejs/biome": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.10.tgz", + "integrity": "sha512-xxA3AphFQ1geij4JTHXv4EeSTda1IFn22ye9LdyVPoJU19fNVl0uzfEuhsfQ4Yue/0FaLs2/ccVi4UDiE7R30w==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.4.10", + "@biomejs/cli-darwin-x64": "2.4.10", + "@biomejs/cli-linux-arm64": "2.4.10", + "@biomejs/cli-linux-arm64-musl": "2.4.10", + "@biomejs/cli-linux-x64": "2.4.10", + "@biomejs/cli-linux-x64-musl": "2.4.10", + "@biomejs/cli-win32-arm64": "2.4.10", + "@biomejs/cli-win32-x64": "2.4.10" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.10.tgz", + "integrity": "sha512-vuzzI1cWqDVzOMIkYyHbKqp+AkQq4K7k+UCXWpkYcY/HDn1UxdsbsfgtVpa40shem8Kax4TLDLlx8kMAecgqiw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.10.tgz", + "integrity": "sha512-14fzASRo+BPotwp7nWULy2W5xeUyFnTaq1V13Etrrxkrih+ez/2QfgFm5Ehtf5vSjtgx/IJycMMpn5kPd5ZNaA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.10.tgz", + "integrity": "sha512-7MH1CMW5uuxQ/s7FLST63qF8B3Hgu2HRdZ7tA1X1+mk+St4JOuIrqdhIBnnyqeyWJNI+Bww7Es5QZ0wIc1Cmkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.10.tgz", + "integrity": "sha512-WrJY6UuiSD/Dh+nwK2qOTu8kdMDlLV3dLMmychIghHPAysWFq1/DGC1pVZx8POE3ZkzKR3PUUnVrtZfMfaJjyQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.10.tgz", + "integrity": "sha512-tZLvEEi2u9Xu1zAqRjTcpIDGVtldigVvzug2fTuPG0ME/g8/mXpRPcNgLB22bGn6FvLJpHHnqLnwliOu8xjYrg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.10.tgz", + "integrity": "sha512-kDTi3pI6PBN6CiczsWYOyP2zk0IJI08EWEQyDMQWW221rPaaEz6FvjLhnU07KMzLv8q3qSuoB93ua6inSQ55Tw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.10.tgz", + "integrity": "sha512-umwQU6qPzH+ISTf/eHyJ/QoQnJs3V9Vpjz2OjZXe9MVBZ7prgGafMy7yYeRGnlmDAn87AKTF3Q6weLoMGpeqdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.10.tgz", + "integrity": "sha512-aW/JU5GuyH4uxMrNYpoC2kjaHlyJGLgIa3XkhPEZI0uKhZhJZU8BuEyJmvgzSPQNGozBwWjC972RaNdcJ9KyJg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, "node_modules/@braintree/sanitize-url": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.2.tgz", diff --git a/docs/package.json b/docs/package.json index 79a7fc3..3d74850 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,8 @@ "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "typecheck": "tsc" + "typecheck": "tsc", + "check": "biome ci src/ docusaurus.config.ts sidebars.ts" }, "dependencies": { "@docusaurus/core": "^3.9.2", @@ -25,6 +26,7 @@ "react-dom": "^19.0.0" }, "devDependencies": { + "@biomejs/biome": "2.4.10", "@docusaurus/module-type-aliases": "^3.9.2", "@docusaurus/tsconfig": "^3.9.2", "@docusaurus/types": "^3.9.2", diff --git a/docs/sidebars.ts b/docs/sidebars.ts index fd979fd..06e6da2 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -1,4 +1,4 @@ -import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; +import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; const sidebars: SidebarsConfig = { guideSidebar: [ @@ -8,7 +8,7 @@ const sidebars: SidebarsConfig = { type: 'category', label: 'Guide', collapsed: false, - link: {type: 'generated-index', title: 'User Guide', slug: '/guide'}, + link: { type: 'generated-index', title: 'User Guide', slug: '/guide' }, items: [ 'guide/getting-started', 'guide/benchmarks', @@ -71,17 +71,13 @@ const sidebars: SidebarsConfig = { type: 'category', label: 'API Reference', collapsed: false, - link: {type: 'generated-index', title: 'API Reference', slug: '/api'}, + link: { type: 'generated-index', title: 'API Reference', slug: '/api' }, items: [ { type: 'category', label: 'Core', collapsed: false, - items: [ - 'api/core/core', - 'api/core/builder', - 'api/core/errors', - ], + items: ['api/core/core', 'api/core/builder', 'api/core/errors'], }, { type: 'category', @@ -105,10 +101,7 @@ const sidebars: SidebarsConfig = { type: 'category', label: 'Observability', collapsed: true, - items: [ - 'api/observability/tracing', - 'api/observability/profiling', - ], + items: ['api/observability/tracing', 'api/observability/profiling'], }, { type: 'category', diff --git a/docs/src/components/ApiSignature.tsx b/docs/src/components/ApiSignature.tsx index 220c620..0704c95 100644 --- a/docs/src/components/ApiSignature.tsx +++ b/docs/src/components/ApiSignature.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import CodeBlock from '@theme/CodeBlock'; interface ApiSignatureProps { @@ -7,7 +6,11 @@ interface ApiSignatureProps { language?: string; } -export default function ApiSignature({name, signature, language = 'python'}: ApiSignatureProps) { +export default function ApiSignature({ + name, + signature, + language = 'python', +}: ApiSignatureProps) { const id = name.toLowerCase().replace(/[^a-z0-9]+/g, '-'); return (
{caption}
} + {caption && ( ++ {caption} +
+ )}{p.name} |
- {p.type} |
+
+ {p.name}
+ |
+
+ {p.type}
+ |
{p.default ? {p.default} : required} |
{p.description} |