Skip to content

Commit

Permalink
refactor: update smui imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparkier committed Nov 2, 2024
1 parent 2e8b0a1 commit 6b7cc93
Show file tree
Hide file tree
Showing 51 changed files with 61 additions and 33 deletions.
4 changes: 2 additions & 2 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ backend = "zeno_backend.server:serve"
[tool.pyright]
include = ["zeno_backend"]

[tool.ruff]
[tool.ruff.lint]
select = ["E", "F", "I", "PD", "N", "D", "T20"]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/amplitude.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Amplitude handler for tracking after env has been set up with a singleton object."""

import os

from amplitude import Amplitude, BaseEvent
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base types used in Zeno's backend."""

from enum import Enum

from pydantic import BaseModel, ConfigDict
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/chart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type representations for chart data."""

import json
from enum import Enum

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/filter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Classes required for specifying data filters."""

import json
from enum import Enum
from typing import LiteralString
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/folder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type representation for folder data."""

from zeno_backend.classes.base import CamelModel


Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type representations for metric data."""

from zeno_backend.classes.base import CamelModel, ZenoColumn
from zeno_backend.classes.filter import Operation
from zeno_backend.classes.metric import Metric
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/metric.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type representations for metric data."""

from zeno_backend.classes.base import CamelModel
from zeno_backend.classes.slice import Slice

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Types for Zeno reports."""

from enum import Enum

from zeno_backend.classes.base import CamelModel
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/classes/slice_finder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type representations for slice finder data."""

from typing import Any

from zeno_backend.classes.base import CamelModel, ZenoColumn
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/database/copy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functionality for copying instances in the database."""

import json
import uuid

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/database/database.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functionality to interact with the database."""

import asyncio
import os
from configparser import ConfigParser
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/database/delete.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions to delete data from the database."""

from psycopg import sql

from zeno_backend.classes.user import Author, Organization, User
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/database/insert.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions to insert new data into Zeno's database."""

import json
import secrets
import uuid
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/database/select.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions to select data from the database."""

import asyncio
import json

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/database/update.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions to update data in the database."""

import json

from psycopg import sql
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/database/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for database operations."""

import hashlib
import json
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/processing/chart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for extracting chart data from SQL."""

import json
from typing import Any

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/processing/filtering.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for parsing filter predicates and filtering data."""

from fastapi import HTTPException, status
from psycopg import sql

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/processing/metrics/mean.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Mean metric calculation."""

from psycopg import sql

from zeno_backend.classes.base import GroupMetric, MetadataType
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/processing/slice_finder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Methods to run slice-finder in order to slice the user's data."""

import secrets

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/account.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for user and organization related queries."""

from amplitude import BaseEvent
from fastapi import (
APIRouter,
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/chart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for data-table-related queries."""

from amplitude import BaseEvent
from fastapi import (
APIRouter,
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for metadata-related queries."""

import asyncio
import datetime

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/project.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for data-table-related queries."""

import shutil
from pathlib import Path
from urllib import parse
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for report-related queries."""

from urllib import parse

from amplitude import BaseEvent
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/sdk.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for the Zeno SDK."""

import uuid
from urllib import parse

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/slice.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for slice-related queries."""

from amplitude import BaseEvent
from fastapi import APIRouter, Depends, HTTPException, Request, status

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for data-table-related queries."""

import pandas as pd
from fastapi import APIRouter, HTTPException, Request, status

Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/routers/tag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""FastAPI server endpoints for tag-related queries."""

from amplitude import BaseEvent
from fastapi import (
APIRouter,
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The FastAPI server for the Zeno backend. Provides endpoints to load data."""

import logging
import os
import time
Expand Down
1 change: 1 addition & 0 deletions backend/zeno_backend/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for Zeno's backend."""

import os

import cognitojwt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
type BeeswarmParameters,
type Chart
} from '$lib/zenoapi';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import Checkbox from '@smui/checkbox';
import Svelecte from 'svelecte';
import { EncodingMap } from '../encodingUtil';
import EncodingSection from './EncodingSection.svelte';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { clickOutside } from '$lib/util/clickOutside';
import type { Folder, ZenoService } from '$lib/zenoapi';
import { mdiChevronDown, mdiChevronRight, mdiDotsHorizontal } from '@mdi/js';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import Checkbox from '@smui/checkbox';
import IconButton, { Icon } from '@smui/icon-button';
import Paper, { Content } from '@smui/paper';
import { getContext } from 'svelte';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/popups/Confirm.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
import Paper, { Content } from '@smui/paper';
import { createEventDispatcher } from 'svelte';
import { fade } from 'svelte/transition';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/components/popups/CopyProjectPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import { invalidate } from '$app/navigation';
import type { Project, User, ZenoService } from '$lib/zenoapi';
import Button from '@smui/button/src/Button.svelte';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import Button from '@smui/button';
import Checkbox from '@smui/checkbox';
import { Content } from '@smui/paper';
import Textfield from '@smui/textfield';
import { createEventDispatcher, getContext } from 'svelte';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/components/popups/FeatureFlagsPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import { featureFlags } from '$lib/stores';
import { zenoFeatureFlags } from '$lib/util/features';
import Button from '@smui/button/src/Button.svelte';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import Button from '@smui/button';
import Checkbox from '@smui/checkbox';
import { Content } from '@smui/paper';
import { createEventDispatcher } from 'svelte';
import Popup from './Popup.svelte';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/popups/NewReportPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { goto } from '$app/navigation';
import type { ApiError, ZenoService } from '$lib/zenoapi';
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
import { Content } from '@smui/paper';
import Textfield from '@smui/textfield';
import { createEventDispatcher, getContext } from 'svelte';
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/lib/components/popups/OrganizationPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<script lang="ts">
import type { Organization, User, ZenoService } from '$lib/zenoapi';
import { mdiClose } from '@mdi/js';
import { Icon } from '@smui/button';
import Button from '@smui/button/src/Button.svelte';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import IconButton from '@smui/icon-button/src/IconButton.svelte';
import Button, { Icon } from '@smui/button';
import Checkbox from '@smui/checkbox';
import IconButton from '@smui/icon-button';
import { Content } from '@smui/paper';
import Textfield from '@smui/textfield';
import Svelecte from 'svelecte';
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/lib/components/popups/ProjectPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
import { project } from '$lib/stores';
import type { Organization, Project, User, ZenoService } from '$lib/zenoapi';
import { mdiClose } from '@mdi/js';
import { Icon } from '@smui/button';
import Button from '@smui/button/src/Button.svelte';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import IconButton from '@smui/icon-button/src/IconButton.svelte';
import Button, { Icon } from '@smui/button';
import Checkbox from '@smui/checkbox';
import IconButton from '@smui/icon-button';
import { Content } from '@smui/paper';
import Textfield from '@smui/textfield';
import Svelecte from 'svelecte';
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/lib/components/popups/ReportPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import { page } from '$app/stores';
import type { Organization, Report, User, ZenoService } from '$lib/zenoapi';
import { mdiClose } from '@mdi/js';
import { Icon } from '@smui/button';
import Button from '@smui/button/src/Button.svelte';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import IconButton from '@smui/icon-button/src/IconButton.svelte';
import Button, { Icon } from '@smui/button';
import Checkbox from '@smui/checkbox';
import IconButton from '@smui/icon-button';
import { Content } from '@smui/paper';
import Textfield from '@smui/textfield';
import Svelecte from 'svelecte';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/settings/Account.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import type { User, ZenoService } from '$lib/zenoapi';
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
import Textfield from '@smui/textfield';
import { getContext } from 'svelte';
import { fade } from 'svelte/transition';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import type { Organization, User, ZenoService } from '$lib/zenoapi';
import { mdiClose, mdiCog, mdiLogout, mdiPlus } from '@mdi/js';
import { Icon } from '@smui/button';
import IconButton from '@smui/icon-button/src/IconButton.svelte';
import IconButton from '@smui/icon-button';
import { getContext } from 'svelte';
import Confirm from '../popups/Confirm.svelte';
import NewOrganizationPopup from '../popups/NewOrganizationPopup.svelte';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/instance-views/InstanceView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { elementMap, isComplexElement } from '$lib/instance-views/resolve.js';
import type { ViewSchema } from '$lib/instance-views/schema';
import schema from '$lib/instance-views/schema.json';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import Checkbox from '@smui/checkbox';
import Ajv from 'ajv';
import { createEventDispatcher } from 'svelte';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(user)/forgot/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { enhance } from '$app/forms';
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
import Textfield from '@smui/textfield';
let username = '';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(user)/forgot/[username]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { enhance } from '$app/forms';
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
import Textfield from '@smui/textfield';
export let form;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(user)/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { browser } from '$app/environment';
import { enhance } from '$app/forms';
import Spinner from '$lib/components/general/Spinner.svelte';
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
import Textfield from '@smui/textfield';
export let form;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/(user)/signup/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { enhance } from '$app/forms';
import Button from '@smui/button/src/Button.svelte';
import Checkbox from '@smui/checkbox/src/Checkbox.svelte';
import Button from '@smui/button';
import Checkbox from '@smui/checkbox';
import Textfield from '@smui/textfield';
export let form;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(user)/verify/[username]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { enhance } from '$app/forms';
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
import Textfield from '@smui/textfield';
export let form;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/auth/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { goto } from '$app/navigation';
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
</script>

<div class="m-auto h-full bg-primary pt-20 text-center">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/playground/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import Error from '$lib/instance-views/Error.svelte';
import InstanceView from '$lib/instance-views/InstanceView.svelte';
import { json } from '@codemirror/lang-json';
import Button from '@smui/button/src/Button.svelte';
import Button from '@smui/button';
import CodeMirror from 'svelte-codemirror-editor';
import { samples } from './samples.js';
import { setURLParameters, type URLParams } from './util.js';
Expand Down

0 comments on commit 6b7cc93

Please sign in to comment.