Skip to content

Commit 2a23ccd

Browse files
chore(autorag): capitalization consistency (opendatahub-io#6357)
* chore(autorag): rename files * chore(autorag): rename variables, components
1 parent b654a5f commit 2a23ccd

11 files changed

Lines changed: 51 additions & 51 deletions

File tree

packages/autorag/frontend/src/app/AppRoutes.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { NotFound } from 'mod-arch-shared';
22
import * as React from 'react';
33
import { Navigate, Route, Routes } from 'react-router-dom';
4-
import AutoRagConfigurePage from './pages/AutoRagConfigurePage';
5-
import AutoRagCreatePage from './pages/AutoRagCreatePage';
6-
import AutoRagExperimentsPage from './pages/AutoRagExperimentsPage';
7-
import AutoRagResultsPage from './pages/AutoRagResultsPage';
4+
import AutoragConfigurePage from './pages/AutoragConfigurePage';
5+
import AutoragCreatePage from './pages/AutoragCreatePage';
6+
import AutoragExperimentsPage from './pages/AutoragExperimentsPage';
7+
import AutoragResultsPage from './pages/AutoragResultsPage';
88

99
function AppRoutes(): React.JSX.Element {
1010
return (
1111
<Routes>
1212
<Route path="/" element={<Navigate to="experiments" replace />} />
13-
<Route path="/experiments/:namespace?" element={<AutoRagExperimentsPage />} />
14-
<Route path="/create/:namespace" element={<AutoRagCreatePage />} />
15-
<Route path="/configure/:experimentId" element={<AutoRagConfigurePage />} />
16-
<Route path="/results/:runId" element={<AutoRagResultsPage />} />
13+
<Route path="/experiments/:namespace?" element={<AutoragExperimentsPage />} />
14+
<Route path="/create/:namespace" element={<AutoragCreatePage />} />
15+
<Route path="/configure/:experimentId" element={<AutoragConfigurePage />} />
16+
<Route path="/results/:runId" element={<AutoragResultsPage />} />
1717
<Route path="*" element={<NotFound />} />
1818
</Routes>
1919
);

packages/autorag/frontend/src/app/components/configure/AutoRagConfigure.tsx renamed to packages/autorag/frontend/src/app/components/configure/AutoragConfigure.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { Button } from '@patternfly/react-core';
22
import React from 'react';
33
import { useNavigate } from 'react-router';
4-
import { autoRagResultsPathname } from '~/app/utilities/routes';
4+
import { autoragResultsPathname } from '~/app/utilities/routes';
55

6-
function AutoRagConfigure(): React.JSX.Element {
6+
function AutoragConfigure(): React.JSX.Element {
77
const navigate = useNavigate();
88

99
return (
1010
<div>
1111
<Button
1212
variant="primary"
1313
onClick={() => {
14-
navigate(`${autoRagResultsPathname}/FAKE_RUN_ID`);
14+
navigate(`${autoragResultsPathname}/FAKE_RUN_ID`);
1515
}}
1616
>
1717
Run experiment
@@ -20,4 +20,4 @@ function AutoRagConfigure(): React.JSX.Element {
2020
);
2121
}
2222

23-
export default AutoRagConfigure;
23+
export default AutoragConfigure;

packages/autorag/frontend/src/app/components/create/AutoRagCreate.tsx renamed to packages/autorag/frontend/src/app/components/create/AutoragCreate.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import React from 'react';
44
import { Controller, useForm } from 'react-hook-form';
55
import { useNavigate } from 'react-router';
66
import createExperimentSchema from '~/app/schemas/experiment.schema';
7-
import { autoRagConfigurePathname } from '~/app/utilities/routes';
7+
import { autoragConfigurePathname } from '~/app/utilities/routes';
88
import { getRequiredFields } from '~/app/utilities/schema';
99

10-
function AutoRagCreate(): React.JSX.Element {
10+
function AutoragCreate(): React.JSX.Element {
1111
const navigate = useNavigate();
1212

1313
const experimentSchema = createExperimentSchema();
@@ -63,7 +63,7 @@ function AutoRagCreate(): React.JSX.Element {
6363
isDisabled={!form.formState.isValid}
6464
onClick={async () => {
6565
form.handleSubmit(() => {
66-
navigate(`${autoRagConfigurePathname}/FAKE_EXPERIMENT_ID`);
66+
navigate(`${autoragConfigurePathname}/FAKE_EXPERIMENT_ID`);
6767
})();
6868
}}
6969
>
@@ -75,4 +75,4 @@ function AutoRagCreate(): React.JSX.Element {
7575
);
7676
}
7777

78-
export default AutoRagCreate;
78+
export default AutoragCreate;

packages/autorag/frontend/src/app/components/experiments/AutoRagExperiments.tsx renamed to packages/autorag/frontend/src/app/components/experiments/AutoragExperiments.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Button } from '@patternfly/react-core';
22
import React from 'react';
33
import { useNavigate, useParams } from 'react-router';
4-
import { autoRagCreatePathname } from '~/app/utilities/routes';
4+
import { autoragCreatePathname } from '~/app/utilities/routes';
55
import { useExperimentsQuery } from '../../hooks/queries';
66

7-
function AutoRagExperiments(): React.JSX.Element {
7+
function AutoragExperiments(): React.JSX.Element {
88
const navigate = useNavigate();
99
const { namespace } = useParams();
1010

@@ -18,7 +18,7 @@ function AutoRagExperiments(): React.JSX.Element {
1818
<Button
1919
variant="primary"
2020
onClick={() => {
21-
navigate(`${autoRagCreatePathname}/${namespace}`);
21+
navigate(`${autoragCreatePathname}/${namespace}`);
2222
}}
2323
>
2424
Create AutoRAG experiment
@@ -27,4 +27,4 @@ function AutoRagExperiments(): React.JSX.Element {
2727
);
2828
}
2929

30-
export default AutoRagExperiments;
30+
export default AutoragExperiments;

packages/autorag/frontend/src/app/components/results/AutoRagResults.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
3+
function AutoragResults(): React.JSX.Element {
4+
return <div>results</div>;
5+
}
6+
7+
export default AutoragResults;

packages/autorag/frontend/src/app/pages/AutoRagConfigurePage.tsx renamed to packages/autorag/frontend/src/app/pages/AutoragConfigurePage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { ApplicationsPage } from 'mod-arch-shared';
22
import React from 'react';
33
import { useParams } from 'react-router';
4-
import AutoRagConfigure from '../components/configure/AutoRagConfigure';
4+
import AutoragConfigure from '../components/configure/AutoragConfigure';
55
import { useExperimentQuery } from '../hooks/queries';
66
import InvalidExperiment from '../components/empty-states/InvalidExperiment';
77

8-
function AutoRagConfigurePage(): React.JSX.Element {
8+
function AutoragConfigurePage(): React.JSX.Element {
99
const { experimentId } = useParams();
1010

1111
const { data: experiment, ...experimentQuery } = useExperimentQuery(experimentId);
@@ -22,9 +22,9 @@ function AutoRagConfigurePage(): React.JSX.Element {
2222
provideChildrenPadding
2323
removeChildrenTopPadding
2424
>
25-
<AutoRagConfigure />
25+
<AutoragConfigure />
2626
</ApplicationsPage>
2727
);
2828
}
2929

30-
export default AutoRagConfigurePage;
30+
export default AutoragConfigurePage;

packages/autorag/frontend/src/app/pages/AutoRagCreatePage.tsx renamed to packages/autorag/frontend/src/app/pages/AutoragCreatePage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ import { useNamespaceSelector } from 'mod-arch-core';
22
import { ApplicationsPage, ProjectObjectType, TitleWithIcon } from 'mod-arch-shared';
33
import React from 'react';
44
import { useParams } from 'react-router';
5-
import AutoRagCreate from '../components/create/AutoRagCreate';
5+
import AutoragCreate from '../components/create/AutoragCreate';
66
import InvalidProject from '../components/empty-states/InvalidProject';
7-
import { autoRagExperimentsPathname } from '../utilities/routes';
7+
import { autoragExperimentsPathname } from '../utilities/routes';
88

9-
function AutoRagCreatePage(): React.JSX.Element {
9+
function AutoragCreatePage(): React.JSX.Element {
1010
const { namespace } = useParams();
1111
const { namespaces, namespacesLoaded, namespacesLoadError } = useNamespaceSelector();
1212

1313
const noNamespaces = namespacesLoaded && namespaces.length === 0;
1414
const invalidNamespace =
1515
namespacesLoaded && !!namespace && !namespaces.map((ns) => ns.name).includes(namespace);
1616

17-
const getRedirectPath = (ns: string) => `${autoRagExperimentsPathname}/${ns}`;
17+
const getRedirectPath = (ns: string) => `${autoragExperimentsPathname}/${ns}`;
1818

1919
return (
2020
<ApplicationsPage
@@ -29,9 +29,9 @@ function AutoRagCreatePage(): React.JSX.Element {
2929
provideChildrenPadding
3030
removeChildrenTopPadding
3131
>
32-
<AutoRagCreate />
32+
<AutoragCreate />
3333
</ApplicationsPage>
3434
);
3535
}
3636

37-
export default AutoRagCreatePage;
37+
export default AutoragCreatePage;

packages/autorag/frontend/src/app/pages/AutoRagExperimentsPage.tsx renamed to packages/autorag/frontend/src/app/pages/AutoragExperimentsPage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { useNamespaceSelector } from 'mod-arch-core';
22
import { ApplicationsPage, ProjectObjectType, TitleWithIcon } from 'mod-arch-shared';
33
import React from 'react';
44
import { useParams } from 'react-router';
5-
import AutoRagExperiments from '~/app/components/experiments/AutoRagExperiments';
5+
import AutoragExperiments from '~/app/components/experiments/AutoragExperiments';
66
import { usePreferredNamespaceRedirect } from '~/app/hooks/usePreferredNamespaceRedirect';
77
import ProjectSelectorNavigator from '../components/common/ProjectSelectorNavigator';
88
import InvalidProject from '../components/empty-states/InvalidProject';
99
import NoProjects from '../components/empty-states/NoProjects';
10-
import { autoRagExperimentsPathname } from '../utilities/routes';
10+
import { autoragExperimentsPathname } from '../utilities/routes';
1111

12-
function AutoRagExperimentsPage(): React.JSX.Element {
12+
function AutoragExperimentsPage(): React.JSX.Element {
1313
usePreferredNamespaceRedirect();
1414

1515
const { namespace } = useParams();
@@ -19,7 +19,7 @@ function AutoRagExperimentsPage(): React.JSX.Element {
1919
const invalidNamespace =
2020
namespacesLoaded && !!namespace && !namespaces.map((ns) => ns.name).includes(namespace);
2121

22-
const getRedirectPath = (ns: string) => `${autoRagExperimentsPathname}/${ns}`;
22+
const getRedirectPath = (ns: string) => `${autoragExperimentsPathname}/${ns}`;
2323

2424
return (
2525
<ApplicationsPage
@@ -47,9 +47,9 @@ function AutoRagExperimentsPage(): React.JSX.Element {
4747
provideChildrenPadding
4848
removeChildrenTopPadding
4949
>
50-
<AutoRagExperiments />
50+
<AutoragExperiments />
5151
</ApplicationsPage>
5252
);
5353
}
5454

55-
export default AutoRagExperimentsPage;
55+
export default AutoragExperimentsPage;

packages/autorag/frontend/src/app/pages/AutoRagResultsPage.tsx renamed to packages/autorag/frontend/src/app/pages/AutoragResultsPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { ApplicationsPage } from 'mod-arch-shared';
22
import React from 'react';
33
import { useParams } from 'react-router';
4-
import AutoRagResults from '../components/results/AutoRagResults';
4+
import AutoragResults from '../components/results/AutoragResults';
55
import { useExperimentQuery, usePipelineRunQuery } from '../hooks/queries';
66
import InvalidPipelineRun from '../components/empty-states/InvalidPipelineRun';
77

8-
function AutoRagResultsPage(): React.JSX.Element {
8+
function AutoragResultsPage(): React.JSX.Element {
99
const { runId } = useParams();
1010

1111
const { data: pipelineRun, ...pipelineRunQuery } = usePipelineRunQuery(runId);
@@ -23,9 +23,9 @@ function AutoRagResultsPage(): React.JSX.Element {
2323
provideChildrenPadding
2424
removeChildrenTopPadding
2525
>
26-
<AutoRagResults />
26+
<AutoragResults />
2727
</ApplicationsPage>
2828
);
2929
}
3030

31-
export default AutoRagResultsPage;
31+
export default AutoragResultsPage;

0 commit comments

Comments
 (0)