Skip to content

Commit

Permalink
fix: galv-team/galv => galv/galv
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaquiery committed May 21, 2024
1 parent ced6872 commit 530a715
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 27 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Galv frontend (React app)
> A metadata secretary for battery science
![GitHub package.json dynamic](https://img.shields.io/github/package-json/version/galv-team/galv-frontend)

[![Jest CI](https://github.com/galv-team/galv-frontend/actions/workflows/test.yml/badge.svg)](https://github.com/galv-team/galv-frontend/actions/workflows/test.yml)
[![Cypress CI](https://github.com/galv-team/galv-frontend/actions/workflows/test_e2e.yml/badge.svg)](https://github.com/galv-team/galv-frontend/actions/workflows/test_e2e.yml)

Expand Down Expand Up @@ -58,6 +60,8 @@ To run the unit tests, run the following command:
docker-compose up frontend_test
```

Remember to add the `--build` flag if you have made changes to the frontend code outside the `src` directory.

### End-to-end tests

End-to-end tests are used to ensure that the frontend works as expected from the user's perspective. They are run with Cypress.
Expand All @@ -68,6 +72,8 @@ To run the end-to-end tests, run the following command:
docker-compose up frontend_test_e2e
```

Remember to add the `--build` flag if you have made changes to the frontend code outside the `src` directory.

To develop end-to-end tests, you can use the Cypress GUI. To do this, run the following command:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
backend:
# For big development changes, best to target a specific SHA build rather than :latest in case backend changes.
# If you prefer, of course, you can target a real backend deployment by changing the frontend GALV_API_BASE_URL
image: ghcr.io/battery-intelligence-lab/galv-backend:latest
image: ghcr.io/galv-team/galv-backend:latest
restart: unless-stopped
environment:
VIRTUAL_HOST: "localhost"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/DevelopmentGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ It will also produce a new ``typescript-axios`` API client for the frontend
and release it to NPM.
You should ensure that the version of the frontend API client is up to date
with the backend you are targeting by editing the
``@battery-intelligence-lab/galv-backend`` dependency in the ``package.json`` file.
``@galv/galv`` dependency in the ``package.json`` file.

The version of the backend API client will be the same as the version of the backend.
So if the backend is at version 1.2.3, the API client will be at version 1.2.3.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/UserGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,4 @@ Python and TypeScript (Axios) clients are available for download from the
.. code-block:: bash
npm install @battery-intelligence-lab/galv
npm install @galv/galv
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"proxy": "http://app/",
"dependencies": {
"@battery-intelligence-lab/galv": "2.1.28",
"@galv/galv": "2.1.33",
"@canvasjs/charts": "^3.7.27",
"@canvasjs/react-charts": "^1.0.0",
"@emotion/react": "^11.10.5",
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Components/ApiWrapperContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
UseQueryResult
} from "@tanstack/react-query";
import {get_select_function} from "./ApiResourceContext";
import {CellChemistriesApi, CellsApi, Configuration, FilesApi} from "@battery-intelligence-lab/galv"
import {CellChemistriesApi, CellsApi, Configuration, FilesApi} from "@galv/galv"
import {BaseResource} from "./ResourceCard";
import {useSnackbarMessenger} from "./SnackbarMessengerContext";

Expand Down
2 changes: 1 addition & 1 deletion src/Components/AttachmentUploadContext.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createContext, PropsWithChildren, useContext, useState} from "react";
import {ArbitraryFile, ArbitraryFilesApi, Configuration} from "@battery-intelligence-lab/galv";
import {ArbitraryFile, ArbitraryFilesApi, Configuration} from "@galv/galv";
import {useMutation, UseMutationResult, useQueryClient} from "@tanstack/react-query";
import {AxiosResponse} from "axios";
import {useCurrentUser} from "./CurrentUserContext";
Expand Down
2 changes: 1 addition & 1 deletion src/Components/CurrentUserContext.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createContext, ReactNode, useContext, useState} from "react";
import {Configuration, KnoxUser, LoginApi, User}from "@battery-intelligence-lab/galv";
import {Configuration, KnoxUser, LoginApi, User}from "@galv/galv";
import {useMutation, useQueryClient} from "@tanstack/react-query";
import {AxiosError, AxiosResponse} from "axios";
import axios from "axios";
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import IconButton from "@mui/material/IconButton";
import ArrowLeftIcon from "@mui/icons-material/ArrowLeft";
import ArrowRightIcon from "@mui/icons-material/ArrowRight";
import {useQuery, useQueryClient} from "@tanstack/react-query";
import {FilesApi} from "@battery-intelligence-lab/galv";
import {FilesApi} from "@galv/galv";
import {useCurrentUser} from "./CurrentUserContext";
import {AxiosError, AxiosResponse} from "axios";

Expand Down
2 changes: 1 addition & 1 deletion src/Components/ResourceCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
type CreateKnoxTokenRequest,
type KnoxTokenFull,
ArbitraryFile
} from "@battery-intelligence-lab/galv";
} from "@galv/galv";
import {useCurrentUser} from "./CurrentUserContext";
import Select from "@mui/material/Select";
import MenuItem from "@mui/material/MenuItem";
Expand Down
2 changes: 1 addition & 1 deletion src/Components/ResourceStatuses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {Link} from "react-router-dom";
import List from "@mui/material/List";
import useStyles from "../styles/UseStyles";
import CardActions from "@mui/material/CardActions";
import {FilesApi, ObservedFile} from "@battery-intelligence-lab/galv";
import {FilesApi, ObservedFile} from "@galv/galv";
import clsx from "clsx";
import {useCurrentUser} from "./CurrentUserContext";
import {useQuery, useQueryClient} from "@tanstack/react-query";
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SelectedResourcesPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import CircularProgress from "@mui/material/CircularProgress";
import CardHeader from "@mui/material/CardHeader";
import Card from "@mui/material/Card";
import CardContent from "@mui/material/CardContent";
import {Configuration} from "@battery-intelligence-lab/galv";
import {Configuration} from "@galv/galv";
import {useCurrentUser} from "./CurrentUserContext";

export function DownloadButton({target_urls, ...props}: {target_urls: string|string[]} & ButtonProps) {
Expand Down
2 changes: 1 addition & 1 deletion src/Components/prettify/PrettyObject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
import {AxiosError, AxiosResponse} from "axios";
import {useQuery} from "@tanstack/react-query";
import {BaseResource} from "../ResourceCard";
import {AccessLevelsApi, Configuration, PermittedAccessLevels}from "@battery-intelligence-lab/galv";
import {AccessLevelsApi, Configuration, PermittedAccessLevels}from "@galv/galv";
import MenuItem from "@mui/material/MenuItem";
import Select from "@mui/material/Select";
import {useCurrentUser} from "../CurrentUserContext";
Expand Down
2 changes: 1 addition & 1 deletion src/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
PaginatedSchemaValidationList,
SchemaValidation,
SchemaValidationsApi
}from "@battery-intelligence-lab/galv";
}from "@galv/galv";
import {get_url_components, id_from_ref_props} from "./Components/misc";
import LookupKeyIcon from "./Components/LookupKeyIcon";
import ListItemIcon from "@mui/material/ListItemIcon";
Expand Down
2 changes: 1 addition & 1 deletion src/UserLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import ButtonGroup from "@mui/material/ButtonGroup";
import {useSnackbarMessenger} from "./Components/SnackbarMessengerContext";
import {useMutation, useQueryClient} from "@tanstack/react-query";
import Stack from "@mui/material/Stack";
import {Configuration, User, UserRequest, UsersApi, ActivateApi}from "@battery-intelligence-lab/galv";
import {Configuration, User, UserRequest, UsersApi, ActivateApi}from "@galv/galv";
import {AxiosError, AxiosResponse} from "axios";
import Alert, {AlertColor} from "@mui/material/Alert";

Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import {
ValidationSchemasApi,
ArbitraryFilesApi, ColumnsApi, ColumnTypesApi, UnitsApi,
ColumnMappingsApi
} from "@battery-intelligence-lab/galv";
} from "@galv/galv";
import {
TypeChangerAutocompleteKey,
TypeChangerLookupKey,
Expand Down
2 changes: 1 addition & 1 deletion src/test/ResourceCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {QueryClient, QueryClientProvider} from "@tanstack/react-query";
import {FilterContextProvider} from "../Components/filtering/FilterContext";
import {MemoryRouter} from "react-router-dom";
import FetchResourceContextProvider from "../Components/FetchResourceContext";
import {Cell, PermittedAccessLevels, CellFamily, Team} from "@battery-intelligence-lab/galv";
import {Cell, PermittedAccessLevels, CellFamily, Team} from "@galv/galv";
import SelectionManagementContextProvider from "../Components/SelectionManagementContext";
import access_levels_response from './fixtures/access_levels.json';
import {act} from "react-dom/test-utils";
Expand Down

0 comments on commit 530a715

Please sign in to comment.