Skip to content

Commit

Permalink
Merge pull request #157 from ddxv/main
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
ddxv authored Oct 15, 2024
2 parents 1207510 + a0141e7 commit 4e21ce3
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 48 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ repos:
### PYTHON
# Ruff
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.7
rev: v0.6.9
hooks:
- id: ruff
args: [--fix]
Expand All @@ -14,7 +14,7 @@ repos:
additional_dependencies: ['types-requests']
### DOCKER
- repo: https://github.com/hadolint/hadolint
rev: v2.13.0-beta
rev: v2.13.1-beta
hooks:
- id: hadolint-docker
### SHELL
Expand All @@ -41,7 +41,7 @@ repos:
- prettier
- prettier-plugin-svelte
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.11.1
rev: v9.12.0
hooks:
- id: eslint
name: eslint
Expand Down
5 changes: 3 additions & 2 deletions apps/admin-db/pg-init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ CREATE TABLE networks (

INSERT INTO networks (name, postback_id) VALUES
('Google','google'),
('Facebook', 'meta'),
('Meta', 'meta'),
('AppLovin', 'applovin'),
('Unity Ads', 'unityads'),
('Digital Turbine','digitalturbine');
('Digital Turbine','digitalturbine'),
('ironSource', 'ironsource');



Expand Down
11 changes: 9 additions & 2 deletions apps/dash-backend/api_app/controllers/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,18 @@ async def get_overview(self: Self, start_date: str, end_date: str) -> OverviewDa
apps_df = query_apps().rename(columns={"name": "app_name"})
networks_df = query_networks().rename(columns={"name": "network_name"})

df = df.merge(apps_df, left_on="store_id", right_on="store_id", how="left")
df = df.merge(apps_df, left_on="store_id", right_on="store_id", how="outer")
df = df.merge(
networks_df, left_on="network", right_on="postback_id", how="left",
networks_df, left_on="network", right_on="postback_id", how="outer",
)

df.loc[df["app_name"].isna(), "app_name"] = df.loc[
df["app_name"].isna(), "store_id",
]
df.loc[df["network_name"].isna(), "network_name"] = df.loc[
df["network_name"].isna(), "network",
]

df["revenue"] = df["revenue"].astype(float)

dates_home_df = (
Expand Down
14 changes: 7 additions & 7 deletions apps/dash-frontend/src/lib/components/ui/select/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Select as SelectPrimitive } from "bits-ui";
import { Select as SelectPrimitive } from 'bits-ui';

import Label from "./select-label.svelte";
import Item from "./select-item.svelte";
import Content from "./select-content.svelte";
import Trigger from "./select-trigger.svelte";
import Separator from "./select-separator.svelte";
import Label from './select-label.svelte';
import Item from './select-item.svelte';
import Content from './select-content.svelte';
import Trigger from './select-trigger.svelte';
import Separator from './select-separator.svelte';

const Root = SelectPrimitive.Root;
const Group = SelectPrimitive.Group;
Expand All @@ -30,5 +30,5 @@ export {
Value as SelectValue,
Content as SelectContent,
Trigger as SelectTrigger,
Separator as SelectSeparator,
Separator as SelectSeparator
};
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<script lang="ts">
import { Select as SelectPrimitive } from "bits-ui";
import { scale } from "svelte/transition";
import { cn, flyAndScale } from "$lib/utils.js";
import { Select as SelectPrimitive } from 'bits-ui';
import { scale } from 'svelte/transition';
import { cn, flyAndScale } from '$lib/utils.js';
type $$Props = SelectPrimitive.ContentProps;
type $$Events = SelectPrimitive.ContentEvents;
export let sideOffset: $$Props["sideOffset"] = 4;
export let inTransition: $$Props["inTransition"] = flyAndScale;
export let inTransitionConfig: $$Props["inTransitionConfig"] = undefined;
export let outTransition: $$Props["outTransition"] = scale;
export let outTransitionConfig: $$Props["outTransitionConfig"] = {
export let sideOffset: $$Props['sideOffset'] = 4;
export let inTransition: $$Props['inTransition'] = flyAndScale;
export let inTransitionConfig: $$Props['inTransitionConfig'] = undefined;
export let outTransition: $$Props['outTransition'] = scale;
export let outTransitionConfig: $$Props['outTransitionConfig'] = {
start: 0.95,
opacity: 0,
duration: 50,
duration: 50
};
let className: $$Props["class"] = undefined;
let className: $$Props['class'] = undefined;
export { className as class };
</script>

Expand All @@ -27,7 +27,7 @@
{outTransitionConfig}
{sideOffset}
class={cn(
"bg-popover text-popover-foreground relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md outline-none",
'bg-popover text-popover-foreground relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md outline-none',
className
)}
{...$$restProps}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script lang="ts">
import Check from "lucide-svelte/icons/check";
import { Select as SelectPrimitive } from "bits-ui";
import { cn } from "$lib/utils.js";
import Check from 'lucide-svelte/icons/check';
import { Select as SelectPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
type $$Props = SelectPrimitive.ItemProps;
type $$Events = SelectPrimitive.ItemEvents;
let className: $$Props["class"] = undefined;
export let value: $$Props["value"];
export let label: $$Props["label"] = undefined;
export let disabled: $$Props["disabled"] = undefined;
let className: $$Props['class'] = undefined;
export let value: $$Props['value'];
export let label: $$Props['label'] = undefined;
export let disabled: $$Props['disabled'] = undefined;
export { className as class };
</script>

Expand All @@ -18,7 +18,7 @@
{disabled}
{label}
class={cn(
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
className
)}
{...$$restProps}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script lang="ts">
import { Select as SelectPrimitive } from "bits-ui";
import { cn } from "$lib/utils.js";
import { Select as SelectPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
type $$Props = SelectPrimitive.LabelProps;
let className: $$Props["class"] = undefined;
let className: $$Props['class'] = undefined;
export { className as class };
</script>

<SelectPrimitive.Label
class={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
class={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}
{...$$restProps}
>
<slot />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { Select as SelectPrimitive } from "bits-ui";
import { cn } from "$lib/utils.js";
import { Select as SelectPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
type $$Props = SelectPrimitive.SeparatorProps;
let className: $$Props["class"] = undefined;
let className: $$Props['class'] = undefined;
export { className as class };
</script>

<SelectPrimitive.Separator class={cn("bg-muted -mx-1 my-1 h-px", className)} {...$$restProps} />
<SelectPrimitive.Separator class={cn('bg-muted -mx-1 my-1 h-px', className)} {...$$restProps} />
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<script lang="ts">
import { Select as SelectPrimitive } from "bits-ui";
import ChevronDown from "lucide-svelte/icons/chevron-down";
import { cn } from "$lib/utils.js";
import { Select as SelectPrimitive } from 'bits-ui';
import ChevronDown from 'lucide-svelte/icons/chevron-down';
import { cn } from '$lib/utils.js';
type $$Props = SelectPrimitive.TriggerProps;
type $$Events = SelectPrimitive.TriggerEvents;
let className: $$Props["class"] = undefined;
let className: $$Props['class'] = undefined;
export { className as class };
</script>

<SelectPrimitive.Trigger
class={cn(
"border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
'border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
className
)}
{...$$restProps}
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/blog/posts/svelte-analytics-dash.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Meanwhile, I've also completely revamped the docker environment for development
- [ ] Pull data from first ad network
- [ ] Start iOS and/or Android SDK

Some features are live at [demo.openattribution.com](http://demo.openattribution.com).
Some features are live at [demo.openattribution.dev](http://demo.openattribution.dev).
2 changes: 1 addition & 1 deletion apps/postback-api/tests/generate_impressions_and_clicks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

logger = get_logger(__name__)

NETWORKS = ["google", "ironsource", "facebook"]
NETWORKS = ["google", "ironsource", "meta"]
APPS = ["com.example.one", "com.game.eg.gg", "id123456789", "123456789"]

CAMPAIGNS = ["CampaignA", "CampaignB"]
Expand Down

0 comments on commit 4e21ce3

Please sign in to comment.