Dataset Viewer
Auto-converted to Parquet Duplicate
repo_name
stringlengths
1
62
dataset
stringclasses
1 value
lang
stringclasses
11 values
pr_id
int64
1
20.1k
owner
stringlengths
2
34
reviewer
stringlengths
2
39
diff_hunk
stringlengths
15
262k
code_review_comment
stringlengths
1
99.6k
fugit2.nvim
github_2023
others
42
SuperBo
SuperBo
@@ -0,0 +1,37 @@ +package = 'fugit2.nvim' + +version = 'scm-1' + +rockspec_format = '3.0' + +source = { + url = 'git://github.com/SuperBo/fugit2.nvim.git' +} + +description = { + summary = 'Git plugin for Neovim (based on libgit2)', + homepage = 'https://github.com/SuperBo/fugit2.nvim', + license = 'MIT', +} + +depende...
Can we add gpgme as an optional dependencies. I used that for gpg signing git commit features.
fugit2.nvim
github_2023
others
42
SuperBo
SuperBo
@@ -0,0 +1,37 @@ +package = 'fugit2.nvim' + +version = 'scm-1' + +rockspec_format = '3.0' + +source = { + url = 'git://github.com/SuperBo/fugit2.nvim.git' +} + +description = { + summary = 'Git plugin for Neovim (based on libgit2)', + homepage = 'https://github.com/SuperBo/fugit2.nvim', + license = 'MIT', +} + +depende...
Can we specify lua version to luajit because the implementation is based on luajit ffi, and doesn't work with normal lua.
fugit2.nvim
github_2023
others
42
SuperBo
SuperBo
@@ -0,0 +1,33 @@ +name: Push to Luarocks + +on: + push: + tags: + - '*' + release: + types: + - created + pull_request: # Runs test install without uploading + workflow_dispatch: # Allows to trigger manually + +jobs: + luarocks-upload: + runs-on: ubuntu-23.10
can we use ubuntu-22.04 here, a LTS is a better choice vs normal Ubuntu release
fugit2.nvim
github_2023
others
42
SuperBo
SuperBo
@@ -0,0 +1,35 @@ +local repo_url = '$repo_url' + +rockspec_format = '3.0' +package = '$package' +version = modrev ..'-'.. specrev + +description = { + summary = '$summary', + labels = $labels, + homepage = '$homepage', + $license +} + +dependencies = { + 'lua >= 5.1', + 'nui.nvim', + 'nvim-web-devicons', + 'plen...
Can we add GPGme as optional dependencies?
fugit2.nvim
github_2023
others
42
SuperBo
SuperBo
@@ -0,0 +1,35 @@ +local repo_url = '$repo_url' + +rockspec_format = '3.0' +package = '$package' +version = modrev ..'-'.. specrev + +description = { + summary = '$summary', + labels = $labels, + homepage = '$homepage', + $license +} + +dependencies = { + 'lua >= 5.1', + 'nui.nvim', + 'nvim-web-devicons', + 'plen...
Just let it be like this, I have plan to replace all of that dependencies later.
fugit2.nvim
github_2023
others
39
SuperBo
ryancobb
@@ -1687,8 +1687,11 @@ function GitStatus:_init_branch_menu() if vim.fn.exists ":Telescope" then self:unmount() vim.cmd { cmd = "Telescope", args = { "git_branches" } } + elseif vim.fn.exists ":FzfLua" then
I'm still getting `Command not found: Telescope` with these changes. Looks like `vim.fn.exists` returns `0` if the command doesn't exist, which lua considers truthy so we're still trying the `Telescope` cmd. I think we have to check `vim.fn.exists ... > 0` on this line and above
differential
github_2023
typescript
213
differentialhq
nadeesha
@@ -0,0 +1,64 @@ +import os from "os"; +import path from "path"; +import fs from "fs"; + +export type CliContext = { + apiUrl?: string; + consoleUrl?: string; + cluster?: string; + service?: string; + deployment?: string; +}; + +const BASE_CONTEXT_PATH = path.join(os.homedir(), ".differential");
Nice one! Another idea: Save context per Differential project and instead save the `.differential` file in the directory where the user is doing the operation? So, when a command is run, it gets the context from the directory from where it's being run from. It could even be a `differential.toml` and we can ...
differential
github_2023
others
215
differentialhq
nadeesha
@@ -0,0 +1,85 @@ +# On-demand Compute (BETA) + +> On-demand compute is currently in private beta. To gain early access, please sign up for the waitlist [here](https://forms.fillout.com/t/9M1VhL8Wxyus).
Yeah, let's just do helo@differential.dev?
differential
github_2023
typescript
211
differentialhq
github-advanced-security[bot]
@@ -0,0 +1,133 @@ +import { upsertAccessPointForCluster } from "./management"; +import { + validateAccessPointAccess, + validateAccessPointOrClusterTokenAccess, + validateClusterTokenAccess, +} from "./routing-helpers"; +import { createOwner } from "./test/util"; + +describe("routing-helpers", () => { + describe("v...
## Hard-coded credentials The hard-coded value "bad token" is used as [authorization header](1). [Show more details](https://github.com/differentialhq/differential/security/code-scanning/5)
differential
github_2023
typescript
211
differentialhq
github-advanced-security[bot]
@@ -0,0 +1,133 @@ +import { upsertAccessPointForCluster } from "./management"; +import { + validateAccessPointAccess, + validateAccessPointOrClusterTokenAccess, + validateClusterTokenAccess, +} from "./routing-helpers"; +import { createOwner } from "./test/util"; + +describe("routing-helpers", () => { + describe("v...
## Hard-coded credentials The hard-coded value "Bearer bad token" is used as [authorization header](1). [Show more details](https://github.com/differentialhq/differential/security/code-scanning/6)
differential
github_2023
typescript
211
differentialhq
github-advanced-security[bot]
@@ -3,13 +3,15 @@ export const createOwner = async (params?: { clusterId?: string }) => { const clusterId = params?.clusterId || `test-cluster-${Math.random()}`; + const apiSecret = `test-secret-${Math.random()}`;
## Insecure randomness This uses a cryptographically insecure random number generated at [Math.random()](1) in a security context. [Show more details](https://github.com/differentialhq/differential/security/code-scanning/7)
differential
github_2023
typescript
198
differentialhq
github-advanced-security[bot]
@@ -1,17 +1,13 @@ import * as data from "../data"; -export const createOwner = async (params?: { - clusterId?: string; - predictiveRetriesEnabled?: boolean; -}) => { +export const createOwner = async (params?: { clusterId?: string }) => { const clusterId = params?.clusterId || `test-cluster-${Math.random()}`; ...
## Insecure randomness This uses a cryptographically insecure random number generated at [Math.random()](1) in a security context. [Show more details](https://github.com/differentialhq/differential/security/code-scanning/4)
differential
github_2023
typescript
167
differentialhq
github-advanced-security[bot]
@@ -0,0 +1,40 @@ +import { ConfirmSubscriptionCommand, SNSClient } from "@aws-sdk/client-sns"; +import MessageValidator from "sns-validator"; + +export const DELOYMENT_SNS_TOPIC = process.env.DELOYMENT_SNS_TOPIC; + +const validator = new MessageValidator(); +const sns = new SNSClient(); + +// "'stackId'='XXXX'\n"; +exp...
## Incomplete string escaping or encoding This replaces only the first occurrence of '"'. [Show more details](https://github.com/differentialhq/differential/security/code-scanning/3)
differential
github_2023
others
166
differentialhq
johnjcsmith
@@ -18,4 +18,4 @@ It accepts an array of encryption keys. This is useful if you want to rotate you Since this essentially makes function arguments opaque to the control plane, it is important to note that Differential will not be able to provide any of its usual features for these encrypted function arguments, such ...
```suggestion Caching is still supported, as it is based on the function arguments and return values as supplied by the client. ```
differential
github_2023
others
166
differentialhq
johnjcsmith
@@ -0,0 +1,70 @@ +# Failure Modes and Error Handling + +Differential failure modes and error handling is not too dissimilar from the traditional failure modes and error handling in a service-oriented architecture. + +## A function call results in a rejection + +When a promise gets rejected from a remote function, Diffe...
🤯 that's neat. I didn't realise this.
differential
github_2023
others
166
differentialhq
johnjcsmith
@@ -0,0 +1,70 @@ +# Failure Modes and Error Handling + +Differential failure modes and error handling is not too dissimilar from the traditional failure modes and error handling in a service-oriented architecture. + +## A function call results in a rejection + +When a promise gets rejected from a remote function, Diffe...
It can be any property not just `name` and `message`?
differential
github_2023
others
166
differentialhq
johnjcsmith
@@ -0,0 +1,70 @@ +# Failure Modes and Error Handling + +Differential failure modes and error handling is not too dissimilar from the traditional failure modes and error handling in a service-oriented architecture. + +## A function call results in a rejection + +When a promise gets rejected from a remote function, Diffe...
I think these are fine, I don't know if there is better naming. In the context of portioning, It kind of feels like these are describing _where_ the error happens in relation to the control plane? `client -> MAX_ERROR_CYCLES -> control-plane ->REMOTE_EXECUTION_ERROR - service`
differential
github_2023
others
165
differentialhq
tomellis91
@@ -0,0 +1,98 @@ +AWSTemplateFormatVersion: "2010-09-09" +Description: Differential service configuration + +Parameters: + ClusterId: + Type: String + Description: Differential Cluster Id + + ServiceName: + Type: String + Description: Differential Service name + + DeploymentId: + Type: String + Des...
Is this a role that was already created in AWS? Would it be worth creating a role per lambda in this template and associating that with the function? As well as providing the ability to override the role that is used?
differential
github_2023
typescript
154
differentialhq
github-advanced-security[bot]
@@ -14,6 +19,15 @@ fs.mkdirSync(dir, { recursive: true }); } fs.writeFileSync(TOKEN_PATH, token); + setNpmConfig(`${CLIENT_PACKAGE_SCOPE}:registry`, NPM_REGISTRY_URL); + setNpmConfig( + `${NPM_REGISTRY_URL.replace(/^http(s?):/, "")}:_authToken`, + token, + ); +}; + +const setNpmConfig = async (key: ...
## Uncontrolled command line This command line depends on a [user-provided value](1). [Show more details](https://github.com/differentialhq/differential/security/code-scanning/2)
differential
github_2023
others
143
differentialhq
nadeesha
@@ -2,9 +2,9 @@ Status: **General Availability** -In a cloud environment, machines can fail at any time. Differential transparently handles machine failures, and retries the operation on a healthy worker. This means that you don't have to worry about your service being unavailable due to a machine failure. +In a c...
```suggestion If a machine fails to send any heartbeats within an interval (default 90 seconds): ```
differential
github_2023
others
141
differentialhq
ShawnSomething
@@ -0,0 +1,42 @@ +# Recovering from machine failures + +Status: **General Availability** + +In a cloud environment, machines can fail at any time. Differential transparently handles machine failures, and retries the operation on a healthy worker. This means that you don't have to worry about your service being unavaila...
can we merge these two lines? In a cloud environment, machines can fail at any time. Differential transparently handles machine failures by periodically sending heartbeats to the control-plane, quickly catching and retrying failed operations on a healthy worker. This means that you don't have to worry about your ser...
differential
github_2023
others
141
differentialhq
ShawnSomething
@@ -0,0 +1,42 @@ +# Recovering from machine failures + +Status: **General Availability** + +In a cloud environment, machines can fail at any time. Differential transparently handles machine failures, and retries the operation on a healthy worker. This means that you don't have to worry about your service being unavaila...
When the machine comes back online
differential
github_2023
others
141
differentialhq
ShawnSomething
@@ -0,0 +1,45 @@ +# Distributed Caching + +Status: **General Availability** + +When a function returns a value, Differential will store it in the control-plane state. It's then available to be used by other calls, without having to call the function again. This is useful for caching expensive operations, and speeding u...
Can we swap the two sentences? Differential is useful for caching expensive operations, and speeding up your application by storing returned function values in the control-plane. It is then available to be used by other calls without having to call that specific function again (Value + How) : also it flows bett...
differential
github_2023
others
141
differentialhq
ShawnSomething
@@ -0,0 +1,33 @@ +# Predictive Alerting + +Status: **In Development** + +Differential can predict if a function is failing due to an unrecoverable error that requires a code change, and alert you with reproduction steps. + +The control-plane has a lot of context on a particular failure when it happens. It knows the fun...
The control-plane has all the required context on a particular failure, when it happens.
differential
github_2023
others
141
differentialhq
ShawnSomething
@@ -0,0 +1,42 @@ +# Predictive Retries + +Status: **Technical Preview** + +Differential can predict transient errors and retry the operations without the developer having to write custom code. + +The control-plane has a lot of context on a particular failure when it happens. It knows the function, some metadata about t...
has all the required context
differential
github_2023
typescript
113
differentialhq
nadeesha
@@ -134,6 +134,7 @@ const functionRegistry: { [key: string]: ServiceRegistryFunction } = {}; class PollingAgent { private errorCount = 0; + private idleCycleCount = 0;
Hey, should we make this a `idleTimeout`? Since the polling interval can be configured, it might be confusing to think in terms of cycles. Was there a specific reason you thought of doing cycles instead of time?
differential
github_2023
typescript
110
differentialhq
nadeesha
@@ -116,8 +116,8 @@ export const releaseDeployment = async ( ): Promise<Deployment> => { // Check if the service has been previously "released" (active or inactive) deployment let meta = (await previouslyReleased(deployment))
```suggestion const meta = (await previouslyReleased(deployment)) ```
differential
github_2023
typescript
100
differentialhq
johnjcsmith
@@ -8,28 +8,59 @@ export class AuthenticationError extends Error { } } -if (!process.env.JWKS_URL) { - throw new Error("JWKS_URL must be set"); +if (!process.env.JWKS_URL && !process.env.MANAGEMENT_SECRET) { + throw new Error("No JWKS_URL or MANAGEMENT_SECRET in env. One is required."); } -const client = jwk...
We could probably throw here If `client` is `undefined`?
differential
github_2023
typescript
95
differentialhq
johnjcsmith
@@ -301,33 +301,24 @@ export const definition = { authorization: z.string(), }), responses: { - 200: z.object({ - start: z.date(), - stop: z.date(), - success: z.object({ - count: z.array(z.object({ timestamp: z.date(), value: z.number() })), - avgExecutionTi...
Ahh nice, I was thinking theses should be combined 👌
differential
github_2023
typescript
81
differentialhq
johnjcsmith
@@ -1,7 +1,13 @@ import { and, eq } from "drizzle-orm"; +import NodeCache from "node-cache"; +import { z } from "zod"; import * as data from "./data"; import { backgrounded } from "./util"; -import { z } from "zod"; + +const cache = new NodeCache({
I wonder if we could cache function results in `ts-core` also based on the cache key, so they don't even hit the control-plane?
differential
github_2023
typescript
81
differentialhq
isaacsu
@@ -2,44 +2,164 @@ import { and, eq, sql } from "drizzle-orm"; import { ulid } from "ulid"; import * as cron from "./cron"; import * as data from "./data"; -import { backgrounded } from "./util"; import { writeEvent, writeJobActivity } from "./events"; import { ServiceDefinition, + getServiceDefinitions, st...
speling ```suggestion idempotence: async ({ ```
differential
github_2023
typescript
43
differentialhq
nadeesha
@@ -247,4 +266,40 @@ export const router = s.router(contract, { body: cluster, }; }, + getFunctionMetrics: async (request) => { + const managementToken = request.headers.authorization.split(" ")[1]; + + // TODO: Validate serviceName and functionName + // We don't currently store and service/fun...
> We don't currently store and service/function names in the database to validate against. Sorry, what do you mean by this?
differential
github_2023
typescript
37
differentialhq
nadeesha
@@ -163,6 +175,28 @@ export function LiveTables({ noDataMessage="No services with function calls have been detected in the cluster lately." /> </div> + + <div className="mt-12"> + {data.services.map((service) => (
No, this is the correct way to do it. Nice 🎉
differential
github_2023
typescript
36
differentialhq
github-advanced-security[bot]
@@ -10,20 +20,27 @@ }); }); -// describe("it should be able to unfurl promisis", () => { -// it("when it succeeds", async () => { -// const value = await unpack(pack(Promise.resolve(1))); -// expect(value).toEqual(1); -// }); +describe("encryption", () => { + const cryptoSettings = { + keys: [Buff...
## Hard-coded credentials The hard-coded value "abcdefghijklmnopqrstuvwxzy123456" is used as [key](1). [Show more details](https://github.com/differentialhq/differential/security/code-scanning/1)
differential
github_2023
typescript
36
differentialhq
johnjcsmith
@@ -0,0 +1,12 @@ +export class DifferentialError extends Error { + static UNAUTHORISED = + "Invalid API Key or API Secret. Make sure you are using the correct API Secret."; + + static UNKNOWN_ENCRYPTION_KEY = + "Encounterd an encrypted message with an unknown encryption key. Make sure you are providing all encr...
```suggestion "Encountered an encrypted message with an unknown encryption key. Make sure you are providing all encryption keys to the client."; ```
differential
github_2023
others
28
differentialhq
nadeesha
@@ -0,0 +1,4 @@ +DROP TABLE "users";--> statement-breakpoint
Yes. Probably. Thanks!
differential
github_2023
others
28
differentialhq
nadeesha
@@ -0,0 +1,4 @@ +DROP TABLE "users";--> statement-breakpoint +ALTER TABLE "jobs" ADD COLUMN "resulted_at" timestamp with time zone;--> statement-breakpoint +ALTER TABLE "jobs" ADD COLUMN "function_execution_time_ms" integer;--> statement-breakpoint +ALTER TABLE "jobs" ADD COLUMN "service" varchar(1024);
```suggestion ALTER TABLE "jobs" ADD COLUMN IF NOT EXISTS "service" varchar(1024); ``` This was created, but not committed as a part of a previous deployment. This should fix your build.
differential
github_2023
typescript
27
differentialhq
nadeesha
@@ -22,6 +22,10 @@ export const DataTable = <T = any,>({ noDataMessage?: string; columnDef?: ColumnDef<T>[]; }) => { + if (data === undefined || data.length === 0) { + return <div className="text-center">{noDataMessage}</div>;
Thank you. Can we update so that it follows the style guide? ```suggestion return <p className="text-gray-400 mt-2">{noDataMessage}</p>; ```
differential
github_2023
others
8
differentialhq
johnjcsmith
@@ -51,116 +64,116 @@ Initializes a new Differential instance. | Name | Type | Description | | :------ | :------ | :------ | -| `apiSecret` | `string` | The API Secret for your Differential cluster. Obtain this from [your Differential dashboard](https://admin.differential.dev/dashboard). | +| `apiSecret` | `string`...
Might need to re-generate the docs? (`buildClient` -> `client`)
differential
github_2023
typescript
7
differentialhq
nadeesha
@@ -36,6 +36,8 @@ const createClient = (baseUrl: string, machineId: string) => }); class DifferentialError extends Error { + static UNAUTHORISED = "Invalid API Key or API Secret. Make sure you are using the correct API Key and API Secret.";
Nice!
differential
github_2023
others
7
differentialhq
nadeesha
@@ -1,4 +1,5 @@ -439e942, 2023-12-24, Enforce service name param +ca03e82, 2023-12-24, Raise exception on unauthorised polling errors
You don't have to generate these manually btw. The workflow on `main` does it.
differential
github_2023
typescript
2
differentialhq
nadeesha
@@ -510,6 +515,31 @@ export class Differential { }; } + /** + * Provides a type safe client for performing calls to a registered service. + * Waits for the function to complete before returning, and returns the result of the function call. + * @returns ServiceClient<T> + * @example + * ```ts + * ...
```suggestion * import type { helloService } from "./hello-service"; ``` 🙏🏽
sveltestrap
github_2023
javascript
92
sveltestrap
dysfunc
@@ -52,6 +53,21 @@ describe('Popover test', () => { expect(popover).toMatchSnapshot(); }); + it('should render text and auto placement', () => { + const containerPopover = renderPopover({ + children: 'Hello', + target: 'btn', + placement: 'auto', + isOpen: true + }); + console.lo...
```suggestion ```
sveltestrap
github_2023
others
45
sveltestrap
planetsLightningArrester
@@ -1,6 +1,18 @@ <script> import { classnames } from '../utils'; + /** + * Text to be read by screen readers. + * @type {string} + */ + export let ariaLabel = ''; + + /** + * Determines if the badge should have a border + * @type {string}
Shouldn't this be `@type {boolean}`?
sveltestrap
github_2023
others
45
sveltestrap
planetsLightningArrester
@@ -26,13 +38,40 @@ */ export let href = ''; + /** + * Create a circular indicator for absolute positioned badge. + * @type {string}
Shouldn't this be `@type {boolean}` too?
sveltestrap
github_2023
typescript
45
sveltestrap
bestguy
@@ -3,9 +3,14 @@ import { HTMLAnchorAttributes } from 'svelte/elements'; import { Color } from '../shared'; export interface BadgeProps extends HTMLAnchorAttributes { + ariaLabel?: string; + border?: boolean;
Minor, but this seems a slippery slope as some users may rather use shadow, etc. The styling may be better for people to customize in their custom theme (e.g. our company theme used all UPPERCASE in badges, defined in css build). Would this be best to define in user themes or pass via existing `class` prop?
sveltestrap
github_2023
others
35
sveltestrap
dysfunc
@@ -38,24 +35,21 @@ ], "repository": { "type": "git", - "url": "git@github.com:sveltestrap/sveltestrap.git" + "url": "https://github.com/sveltestrap/sveltestrap.git" }, "files": [ "dist", "src" ], "exports": { ".": { - "types": "./src/index.d.ts", - "svelte": "./src...
```suggestion "build": "pnpm lint:package && svelte-package --input ./src", ```
sveltestrap
github_2023
others
35
sveltestrap
dysfunc
@@ -38,24 +35,21 @@ ], "repository": { "type": "git", - "url": "git@github.com:sveltestrap/sveltestrap.git" + "url": "https://github.com/sveltestrap/sveltestrap.git" }, "files": [ "dist", "src" ], "exports": { ".": { - "types": "./src/index.d.ts", - "svelte": "./src...
add ```js "lint:package": "publint --strict" ```
sveltestrap
github_2023
others
35
sveltestrap
dysfunc
@@ -0,0 +1,3 @@ +module.exports = { + plugins: [require('autoprefixer')] +};
please rename this to postcss.config.js and update the contents: ```suggestion import autoprefixer from 'autoprefixer'; export default { plugins: [autoprefixer()] }; ```
sveltestrap
github_2023
typescript
36
sveltestrap
dysfunc
@@ -1,27 +1,25 @@ -declare module 'sveltestrap' { - import { SvelteComponent } from 'svelte'; - import { HTMLDivElement } from 'svelte/elements'; - import { Direction } from '../shared'; +import { SvelteComponent } from 'svelte'; +import { HTMLDivElement } from 'svelte/elements'; +import { Direction } from '../share...
```suggestion export interface DropdownProps extends HTMLAttributes<HTMLDivElement> { ```
sveltestrap
github_2023
typescript
36
sveltestrap
dysfunc
@@ -1,27 +1,25 @@ -declare module 'sveltestrap' { - import { SvelteComponent } from 'svelte'; - import { HTMLDivElement } from 'svelte/elements'; - import { Direction } from '../shared'; +import { SvelteComponent } from 'svelte'; +import { HTMLDivElement } from 'svelte/elements'; +import { Direction } from '../share...
```suggestion export interface DropdownEvents {} ```
sveltestrap
github_2023
typescript
36
sveltestrap
dysfunc
@@ -1,27 +1,25 @@ -declare module 'sveltestrap' { - import { SvelteComponent } from 'svelte'; - import { HTMLDivElement } from 'svelte/elements'; - import { Direction } from '../shared'; +import { SvelteComponent } from 'svelte'; +import { HTMLDivElement } from 'svelte/elements'; +import { Direction } from '../share...
```suggestion export interface DropdownSlots { ```
sveltestrap
github_2023
typescript
36
sveltestrap
dysfunc
@@ -1,27 +1,25 @@ -declare module 'sveltestrap' { - import { SvelteComponent } from 'svelte'; - import { HTMLDivElement } from 'svelte/elements'; - import { Direction } from '../shared'; +import { SvelteComponent } from 'svelte'; +import { HTMLDivElement } from 'svelte/elements'; +import { Direction } from '../share...
```suggestion export default class Dropdown extends SvelteComponent<DropdownProps, DropdownEvents, DropdownSlots> {} ```
sveltestrap
github_2023
typescript
36
sveltestrap
dysfunc
@@ -0,0 +1 @@ +export { default as Dropdown, DropdownItemProps as DropdownProps } from './Dropdown';
```suggestion export { default as Dropdown } from './Dropdown'; ```
sveltestrap
github_2023
others
25
sveltestrap
dysfunc
@@ -58,11 +63,12 @@ The `<Alert>` component provide contextual feedback messages for typical user ac <script lang="ts"> import { Alert } from '@sveltestrap/sveltestrap'; - let isOpen = true; +let isOpen = true; + +const toggle = () => { +visible = !visible;
The formatting is messed up. This shouldn't have changed.
sveltestrap
github_2023
others
25
sveltestrap
dysfunc
@@ -22,19 +23,21 @@ The `<Alert>` component provide contextual feedback messages for typical user ac <script lang="ts"> import { Alert } from '@sveltestrap/sveltestrap'; - const colors = [ - 'primary', - 'secondary', - 'success', - 'danger', - 'warning', - 'info', - 'light', - 'dark' - ]...
The formatting is messed up. This shouldn't have changed.
sveltestrap
github_2023
others
25
sveltestrap
dysfunc
@@ -99,21 +107,25 @@ The `<Alert>` component provide contextual feedback messages for typical user ac <script lang="ts"> import { Alert, Button } from '@sveltestrap/sveltestrap'; - let isOpen = true; +let isOpen = true; + +const toggle = () => {
The formatting is messed up. This shouldn't have changed.
sveltestrap
github_2023
others
13
sveltestrap
dysfunc
@@ -1,14 +1,56 @@ <script> import { classnames } from '../utils'; + /** + * Additional CSS class name for the component + * @type {string} + */ export let className = ''; + /** + * Additional CSS class name for the component + * @type {string} + */ export { className as class }; + /** + * I...
```suggestion * @type {string} ```
sveltestrap
github_2023
others
13
sveltestrap
dysfunc
@@ -0,0 +1,315 @@ +<script context="module"> + import Input from './Input.svelte'; + + export const meta = { + title: 'Stories/Inputs', + component: Input, + parameters: {}, + argTypes: { + class: { + className: 'string', + table: { + disable: true + } + }, + b...
I would restrict the width of all the examples to something like 300px or 400px. it looks ugly spanning the entire length
sveltestrap
github_2023
typescript
11
sveltestrap
dysfunc
@@ -1,14 +1,18 @@ -import { SvelteComponent } from 'svelte'; +declare module 'sveltestrap' { + import { SvelteComponent } from 'svelte'; + import { HTMLAttributes } from 'svelte/elements'; -export interface PaginationProps - extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['nav']> { - listClassName?: strin...
```suggestion export interface PaginationProps extends HTMLAttributes<HTMLElement> { ```
sveltestrap
github_2023
others
11
sveltestrap
dysfunc
@@ -0,0 +1,55 @@ +import { Meta, Canvas, Controls, Story, Source } from '@storybook/blocks'; +import * as PaginationStories from './Pagination.stories'; + +<Meta title="Components/Pagination" /> + +# Pagination <small class="bootstrap-docs">[Bootstrap Pagination](https://getbootstrap.com/docs/5.3/components/pagination/...
```suggestion The `<Pagination>` component is used to enhance navigation within a set of content, breaking it into manageable segments. It enables users to easily traverse through multiple pages of information, promoting a streamlined and accessible browsing experience. ```
sveltestrap
github_2023
others
11
sveltestrap
dysfunc
@@ -0,0 +1,55 @@ +import { Meta, Canvas, Controls, Story, Source } from '@storybook/blocks'; +import * as PaginationStories from './Pagination.stories'; + +<Meta title="Components/Pagination" /> + +# Pagination <small class="bootstrap-docs">[Bootstrap Pagination](https://getbootstrap.com/docs/5.3/components/pagination/...
```suggestion import { Pagination, PaginationItem, PaginationLink } from '@sveltestrap/sveltestrap'; ```
sveltestrap
github_2023
typescript
8
sveltestrap
dysfunc
@@ -1,18 +1,22 @@ -import { SvelteComponent } from 'svelte'; +declare module 'sveltestrap' { + import { SvelteComponent } from 'svelte'; + import { HTMLDivAttributes } from 'svelte/elements';
I don't think `svelte/elements` exports directly, does it? I've been using: ```ts import { HTMLAttributes } from 'svelte/elements'; export interface ContainerProps extends HTMLAttributes<HTMLDivElement> { ```
sveltestrap
github_2023
others
5
sveltestrap
dysfunc
@@ -0,0 +1,58 @@ +import { Meta, Canvas, Controls, Story, Source } from '@storybook/blocks'; +import * as ImageStories from './Image.stories'; + +<Meta title="Components/Image" />
```suggestion <Meta title="Content/Image" /> ```
Power-Ampache-2
github_2023
others
181
icefields
icefields
@@ -184,7 +184,7 @@ Before starting any contribution, read the above document and if necessary conta - [x] Multi-account - [ ] UI for Tablets - [x] bulk-delete downloaded songs -- [x] playlist edit dran and drop +- [x] playlist edit drag and drop
thank you for your submission! I will merge your fix in the new version coming out soon. But that checklist is outdated, I should probably update the full README at some point soon.
tlrc
github_2023
others
48
tldr-pages
acuteenvy
@@ -26,9 +26,17 @@ A [tldr](https://tldr.sh) client written in Rust. Install [tlrc](https://aur.archlinux.org/packages/tlrc) (from source) or [tlrc-bin](https://aur.archlinux.org/packages/tlrc-bin) (prebuilt) from the AUR. +### Homebrew + +Install [tlrc](https://formulae.brew.sh/formula/tlrc) with [Homebrew](https...
Every header has the OS in it and none of the descriptions link to the package manager itself. ```suggestion ### macOS/Linux using Homebrew Install [tlrc](https://formulae.brew.sh/formula/tlrc) with Homebrew: ```
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -699,10 +723,25 @@ bool VecSearchExecutor::BruteForceSearch( if (brute_force_queue_.size() < end - start) { brute_force_queue_.resize(end - start); } + float dist; + if (std::holds_alternative<DenseVectorPtr>(vector_column_)) { #pragma omp parallel for - for (int64_t v_id = start; v_id < end; ++v_id) ...
Add "#pragma omp parallel for" here?
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -0,0 +1,107 @@ +#include "db/vector.hpp" + +#include <iostream> +namespace vectordb { +namespace engine { + +float GetInnerProductDist(const SparseVector &v1, const SparseVector &v2) { + return 1.0f - GetInnerProduct(v1, v2); +} + +float GetInnerProduct(const SparseVector &v1, const SparseVector &v2) {
Have we checked that index is increasing for sparse vector during data inseration?
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -0,0 +1,107 @@ +#include "db/vector.hpp" + +#include <iostream> +namespace vectordb { +namespace engine { + +float GetInnerProductDist(const SparseVector &v1, const SparseVector &v2) { + return 1.0f - GetInnerProduct(v1, v2); +} + +float GetInnerProduct(const SparseVector &v1, const SparseVector &v2) { + float dot...
Here we need loop until i1 == v1.size() and i2 == v2.size(). Otherwise it is missing some component for L2 distance
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -28,32 +30,34 @@ TableMVP::TableMVP(meta::TableSchema &table_schema, // Replay operations in write ahead log. wal_ = std::make_shared<WriteAheadLog>(db_catalog_path_, table_schema.id_, is_leader_); - wal_->Replay(table_schema, field_name_type_map_, table_segment_); + wal_->Replay(table_schema, field_name_f...
Why here has & but line 44 doesn't?
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -106,6 +115,19 @@ Status TableMVP::Rebuild(const std::string &db_catalog_path) { ++index; continue; } + + VectorColumnData columnData; + if (fType == meta::FieldType::VECTOR_FLOAT || fType == meta::FieldType::VECTOR_DOUBLE) { + columnData = table_segment_ + ...
Same here
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -898,14 +1035,11 @@ TableSegmentMVP::~TableSegmentMVP() { delete[] attribute_table_; } if (vector_tables_ != nullptr) { - for (auto i = 0; i < vector_num_; ++i) { + for (auto i = 0; i < dense_vector_num_; ++i) { delete[] vector_tables_[i]; } delete[] vector_tables_; } - if (stri...
Let's do some stress test (for example, run benchmark with --skip load multiple times and observe memory usage; unload DB and see if memory shrink to the bottom then reload db and compare with the peak memory usage) and make sure no memory leak?
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -193,26 +207,47 @@ TableSegmentMVP::TableSegmentMVP(meta::TableSchema& table_schema, const std::str } } + var_len_attr_table_.resize(var_len_attr_num_); + for (auto attrIdx = 0; attrIdx < var_len_attr_num_; ++attrIdx) { + var_len_attr_table_[attrIdx].resize(record_number_); + } + // ...
Will std::move introduce overhead compared to old implementation?
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -433,17 +465,24 @@ Status TableSegmentMVP::Insert(meta::TableSchema& table_schema, Json& records, i if (!record.HasMember(field.name_)) { return Status(INVALID_RECORD, "Record " + std::to_string(i) + " missing field: " + field.name_); } - if (field.field_type_ == meta::FieldType::VECTOR_F...
Here need check indices are all non-negative, and increasing consecutively
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -457,6 +496,22 @@ Status TableSegmentMVP::Insert(meta::TableSchema& table_schema, Json& records, i // Process the insert. size_t cursor = record_number_; + + // reserve vector memory size + for (auto& field : table_schema.fields_) { + switch (field.field_type_) { + case meta::FieldType::STRING: + ...
Resize won't introduce memory copy?
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -466,16 +521,48 @@ Status TableSegmentMVP::Insert(meta::TableSchema& table_schema, Json& records, i if (field.is_primary_key_) { auto exist = !primary_key_.addKeyIfNotExist(value, cursor); if (exist) { - std::cerr << "primary key [" << value << "] already exists, skipping." ...
typo: convert
vectordb
github_2023
cpp
88
epsilla-cloud
richard-epsilla
@@ -0,0 +1,1609 @@ + +#include "db/db_server.hpp" + +#include <gtest/gtest.h> + +#include <algorithm> +#include <chrono> // std::chrono::seconds +#include <cstdio> +#include <cstdlib> +#include <filesystem> +#include <future> +#include <iterator> +#include <memory> +#include <random> +#include <string> +#include <thre...
Add some UT case where the sparse vector records only contain subset of indices within the dimension, and each record present different indices
vectordb
github_2023
cpp
33
epsilla-cloud
lganzzzo
@@ -531,6 +531,76 @@ class WebController : public oatpp::web::server::api::ApiController { return createDtoResponse(Status::CODE_200, res_dto); } + ADD_CORS(CalcDistance) + + ENDPOINT("POST", "/api/{db_name}/data/distance", CalcDistance, + PATH(String, db_name, "db_name"), + BODY_STR...
Not need to create new ObjectMapper - you already have one injected in the Controller - see constructor. You can access it via `getDefaultObjectMapper()`.
vectordb
github_2023
cpp
33
epsilla-cloud
lganzzzo
@@ -531,6 +531,76 @@ class WebController : public oatpp::web::server::api::ApiController { return createDtoResponse(Status::CODE_200, res_dto); } + ADD_CORS(CalcDistance) + + ENDPOINT("POST", "/api/{db_name}/data/distance", CalcDistance, + PATH(String, db_name, "db_name"), + BODY_STR...
Now I see what is the deal... In this particular case it's more convenient to just construct resultant JSON using nlohman JSON. Something like this: ```cpp json data = { {"statusCode", 200}, {"message", result} }; return createResponse(Status::CODE_200, data.dump()); ```
vectordb
github_2023
cpp
53
epsilla-cloud
richard-epsilla
@@ -181,7 +181,6 @@ class WebController : public oatpp::web::server::api::ApiController { if ( field.field_type_ == vectordb::engine::meta::FieldType::VECTOR_DOUBLE || field.field_type_ == vectordb::engine::meta::FieldType::VECTOR_FLOAT) { - // TODO: after figuring out metric type ot...
Where did we report error if metric type is unknown?
vectordb
github_2023
cpp
53
epsilla-cloud
richard-epsilla
@@ -312,7 +312,7 @@ static PyObject *query(PyObject *self, PyObject *args, PyObject *kwargs) { if (!PyArg_ParseTupleAndKeywords( args, kwargs, - "ssOOip", + "ssOOisp",
What is this?
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -484,21 +484,49 @@ class WebController : public oatpp::web::server::api::ApiController { int64_t limit = parsedBody.GetInt("limit"); + std::string filter;
Do we need initialize the string as empty string? I remember primitive types (int, float, etc) need to initialize inside a function as it could have non empty initial value, not sure about string
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,100 @@ +#pragma once + +#include <memory> +#include <string> +#include <unordered_map> + +namespace vectordb { +namespace query { +namespace expr { + +enum class ArithmeticOperator { + Add,
Use indentation 2 instead of 4
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,100 @@ +#pragma once + +#include <memory> +#include <string> +#include <unordered_map> + +namespace vectordb { +namespace query { +namespace expr { + +enum class ArithmeticOperator { + Add, + Subtract, + Multiply, + Divide, + Module +}; + +enum class CompareOperator { + LT, + LTE, + E...
Use int64_t instead to handle long int
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,29 @@ +#include <any> +#include <unordered_map> +#include <vector> + +#include "expr_types.hpp" + +namespace vectordb { +namespace query { +namespace expr { + +class ExprEvaluator { + public:
Use indentation 2 instead of 4
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -199,8 +202,16 @@ Status DBServer::Search(const std::string& db_name, if (table == nullptr) { return Status(DB_UNEXPECTED_ERROR, "Table not found: " + table_name); } + + // Filter validation + std::vector<query::expr::ExprNodePtr> expr_nodes; + Status expr = query::expr::Expr::ParseNodeFromStr(filter, ...
rename expr to expr_parse_status
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,29 @@ +#include <any> +#include <unordered_map> +#include <vector> + +#include "expr_types.hpp" + +namespace vectordb { +namespace query { +namespace expr { + +class ExprEvaluator { + public: + explicit ExprEvaluator(std::vector<ExprNodePtr>& nodes); + + ~ExprEvaluator(); + + bool LogicalEvaluate(c...
Improvement: can we directly use the reference to the table_segment to evaluate instead of converting the value into the field_value_map? This value copy could be slow
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -174,8 +177,23 @@ class VecSearchExecutor { boost::dynamic_bitset<>& is_visited, const int64_t index_threshold); - bool BruteForceSearch(const float* query_data, const int64_t start, const int64_t end, const ConcurrentBitset& deleted); - Status Search(const float* query_data, const ConcurrentBitset...
Why BruteForceSearch need the root_node_index but Search doesn't?
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -174,8 +177,23 @@ class VecSearchExecutor { boost::dynamic_bitset<>& is_visited, const int64_t index_threshold); - bool BruteForceSearch(const float* query_data, const int64_t start, const int64_t end, const ConcurrentBitset& deleted); - Status Search(const float* query_data, const ConcurrentBitset...
Why passing in as a shared_ptr?
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,23 @@ +#include <string> +#include <unordered_map> + +#include "expr_types.hpp" +#include "utils/json.hpp" + +namespace vectordb { +namespace query { +namespace expr { + +class Expr { + public:
Use indentation 2 instead of 4
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -704,7 +789,8 @@ bool VecSearchExecutor::BruteForceSearch(const float *query_data, const int64_t num_result = 0; // remove the invalid entries for (; iter < end - start; ++iter) { - if (!deleted.test(iter)) { + auto field_value_map = GenFieldValueMap(table_segment, field_name_type_map, root_no...
GenFieldValueMap is expensive, should call it only if the filter expression is not empty. Or, better to not convert into this map but directly use the value of an attribute during expression evaluation
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -718,15 +804,26 @@ bool VecSearchExecutor::BruteForceSearch(const float *query_data, const int64_t return true; } -Status VecSearchExecutor::Search(const float *query_data, const ConcurrentBitset &deleted, const size_t limit, const int64_t total_vector, int64_t &result_size) { +Status VecSearchExecutor::Search...
Why making a shared pointer?
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -765,7 +862,9 @@ Status VecSearchExecutor::Search(const float *query_data, const ConcurrentBitset result_size = 0; auto candidateNum = std::min({size_t(L_master_), size_t(total_vector)}); for (int64_t k_i = 0; k_i < candidateNum && result_size < searchLimit; ++k_i) { - if (deleted.test(se...
Same here, try to avoid generate the map if no filter
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -777,7 +876,9 @@ Status VecSearchExecutor::Search(const float *query_data, const ConcurrentBitset auto candidateNum = std::min({size_t(L_master_), size_t(total_indexed_vector_)}); const int64_t master_queue_start = local_queues_starts_[num_threads_ - 1]; for (int64_t k_i = 0; k_i < candidateNum ...
Same here, try to avoid generate the map if no filter
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,142 @@ +#include <cmath> + +#include "expr_evaluator.hpp" + +namespace vectordb { +namespace query { +namespace expr { + +ExprEvaluator::ExprEvaluator(std::vector<ExprNodePtr>& nodes) + : nodes_(nodes) { +} + +std::string ExprEvaluator::StrEvaluate( + const int& node_index, + std::unordered_map<std::str...
Did we check that the field always exist?
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,142 @@ +#include <cmath> + +#include "expr_evaluator.hpp" + +namespace vectordb { +namespace query { +namespace expr { + +ExprEvaluator::ExprEvaluator(std::vector<ExprNodePtr>& nodes) + : nodes_(nodes) { +} + +std::string ExprEvaluator::StrEvaluate( + const int& node_index, + std::unordered_map<std::str...
Need check right value is not 0. If it's 0, should throw invalid value error, and the top level should evaluate as false
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,142 @@ +#include <cmath> + +#include "expr_evaluator.hpp" + +namespace vectordb { +namespace query { +namespace expr { + +ExprEvaluator::ExprEvaluator(std::vector<ExprNodePtr>& nodes) + : nodes_(nodes) { +} + +std::string ExprEvaluator::StrEvaluate( + const int& node_index, + std::unordered_map<std::str...
Same here. right cannot be 0
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,142 @@ +#include <cmath> + +#include "expr_evaluator.hpp" + +namespace vectordb { +namespace query { +namespace expr { + +ExprEvaluator::ExprEvaluator(std::vector<ExprNodePtr>& nodes) + : nodes_(nodes) { +} + +std::string ExprEvaluator::StrEvaluate( + const int& node_index, + std::unordered_map<std::str...
To make it easier to read: return node_type == NodeType::AND ? (left && right) : (left || right);
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,537 @@ +#include <iostream> +#include <sstream> +#include <algorithm> +#include <regex> +#include <stack> +#include <queue> +#include <unordered_map> +#include <vector> +#include <boost/algorithm/string/join.hpp> + +#include "db/catalog/meta_types.hpp" +#include "logger/logger.hpp" +#include "utils/status.hp...
Why string const cannot be empty?
vectordb
github_2023
cpp
52
epsilla-cloud
richard-epsilla
@@ -0,0 +1,537 @@ +#include <iostream> +#include <sstream> +#include <algorithm> +#include <regex> +#include <stack> +#include <queue> +#include <unordered_map> +#include <vector> +#include <boost/algorithm/string/join.hpp> + +#include "db/catalog/meta_types.hpp" +#include "logger/logger.hpp" +#include "utils/status.hp...
Wrong indentation
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
8