Skip to content

Commit

Permalink
Merge branch 'master' into ak-docker-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
normanrz authored Jun 19, 2024
2 parents 48cd515 + c36b647 commit 8bd7a91
Show file tree
Hide file tree
Showing 28 changed files with 211 additions and 765 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
[Commits](https://github.com/scalableminds/webknossos/compare/24.06.0...HEAD)

### Added
- Added that proofreading merge actions reuse custom names of segments. A merge action now combines the potenial existing custom names of both segments and a split-action copies the custom name to the split-off segment. [#7877](https://github.com/scalableminds/webknossos/pull/7877)
- Added the option for the owner to lock explorative annotations. Locked annotations cannot be modified by any user. An annotation can be locked in the annotations table and when viewing the annotation via the navbar dropdown menu. [#7801](https://github.com/scalableminds/webknossos/pull/7801)
- Added the option to set a default mapping for a dataset in the dataset view configuration. The default mapping is loaded when the dataset is opened and the user / url does not configure something else. [#7858](https://github.com/scalableminds/webknossos/pull/7858)
- Uploading an annotation into a dataset that it was not created for now also works if the dataset is in a different organization. [#7816](https://github.com/scalableminds/webknossos/pull/7816)
- When downloading + reuploading an annotation that is based on a segmentation layer with active mapping, that mapping is now still be selected after the reupload. [#7822](https://github.com/scalableminds/webknossos/pull/7822)
- In the Voxelytics workflow list, the name of the WEBKNOSSOS user who started the job is displayed. [#7794](https://github.com/scalableminds/webknossos/pull/7795)
- Start an alignment job (aligns the section in a dataset) via the "AI Analysis" button. [#7820](https://github.com/scalableminds/webknossos/pull/7820)
- Added additional validation for the animation job modal. Bounding boxes must be larger then zero. [#7883](https://github.com/scalableminds/webknossos/pull/7883)

### Changed
- The "WEBKNOSSOS Changelog" modal now lazily loads its content potentially speeding up the initial loading time of WEBKNOSSOS and thus improving the UX. [#7843](https://github.com/scalableminds/webknossos/pull/7843)
Expand All @@ -30,7 +32,9 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed a bug where brushing on a fallback segmentation with active mapping and with segment index file would lead to failed saves. [#7833](https://github.com/scalableminds/webknossos/pull/7833)
- Fixed a bug where sometimes old mismatching javascript code would be served after upgrades. [#7854](https://github.com/scalableminds/webknossos/pull/7854)
- Fixed a bug where dataset uploads of zipped tiff data via the UI would be rejected. [#7856](https://github.com/scalableminds/webknossos/pull/7856)
- Fixed a bug with incorrect valiation of layer names in the animation modal. [#7882](https://github.com/scalableminds/webknossos/pull/7882)

### Removed
- If the datasource-properties.json file for a dataset is missing or contains errors, WEBKNOSSOS no longer attempts to guess its contents from the raw data. Exploring remote datasets will still create the file. [#7697](https://github.com/scalableminds/webknossos/pull/7697)

### Breaking Changes
6 changes: 3 additions & 3 deletions MIGRATIONS.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ User-facing changes are documented in the [changelog](CHANGELOG.released.md).
## Unreleased
[Commits](https://github.com/scalableminds/webknossos/compare/24.06.0...HEAD)

- The datastore config field `datastore.cache.dataCube.maxEntries` is no longer used an can be removed.

- The datastore config field `datastore.cache.dataCube.maxEntries` is no longer used an can be removed. [#7818](https://github.com/scalableminds/webknossos/pull/7818)
- If your setup contains webknossos-workers, you may want to add the newly available job `align_sections` to the `supportedJobCommands` of your workers. Make sure you deploy the latest webknossos-worker release. [#7820](https://github.com/scalableminds/webknossos/pull/7820)
- If you place WKW datasets directly on disk, a datasource-properties.json is now required, as WEBKNOSSOS no longer guesses its contents from the raw data. Standard dataset creation methods, e.g. with the WEBKNOSSOS CLI or python libs will already automatically this metadata file. [#7697](https://github.com/scalableminds/webknossos/pull/7697)

### Postgres Evolutions:

- [114-ai-models.sql](conf/evolutions/114-ai-models.sql)
- [115-annotation-locked-by-user.sql](conf/evolutions/115-annotation-locked-by-user.sql)
- [116-drop-overtimemailinglist.sql](conf/evolutions/116-drop-overtimemailinglist.sql)
- [116-drop-overtimemailinglist.sql](conf/evolutions/116-drop-overtimemailinglist.sql)
3 changes: 1 addition & 2 deletions docs/data_formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ The term "magnifications" is used synonymously for resolutions throughout the UI
At the moment, WebKnossos guarantees correct rendering of data with non-uniform resolution factors only if the z-component between two resolutions changes by a factor of 1 or 2.

Most users do not create these metadata files manually.
WEBKNOSSOS can infer most of these properties automatically, except for `scale` and `largestSegmentId`.
During the data import process, WEBKNOSSOS will ask for the necessary properties.
When using the [WEBKNOSSOS CLI](http://docs.webknossos.org/cli), a metadata file is automatically generated. Alternatively, you can create and edit WEBKNOSSOS datasets using the [WEBKNOSSOS Python library](https://github.com/scalableminds/webknossos-libs/).
During the data import process, WEBKNOSSOS will ask for the necessary properties.

[See below for the full specification](#dataset-metadata-specification).

Expand Down
11 changes: 0 additions & 11 deletions frontend/javascripts/admin/admin_rest_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type {
APIBuildInfo,
APIConnectomeFile,
APIDataSource,
APIDataSourceWithMessages,
APIDataStore,
APIDataset,
APIDatasetId,
Expand Down Expand Up @@ -1116,16 +1115,6 @@ export async function getDatasets(
return datasets;
}

export function getDatasetDatasource(
dataset: APIMaybeUnimportedDataset,
): Promise<APIDataSourceWithMessages> {
return doWithToken((token) =>
Request.receiveJSON(
`${dataset.dataStore.url}/data/datasets/${dataset.owningOrganization}/${dataset.name}?token=${token}`,
),
);
}

export function readDatasetDatasource(dataset: APIDataset): Promise<APIDataSource> {
return doWithToken((token) =>
Request.receiveJSON(
Expand Down
2 changes: 1 addition & 1 deletion frontend/javascripts/admin/dataset/dataset_add_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function DatasetAddView({ history }: RouteComponentProps) {
View the Dataset
</Button>
<Button
onClick={() => history.push(`/datasets/${organization}/${datasetName}/import`)}
onClick={() => history.push(`/datasets/${organization}/${datasetName}/edit`)}
>
Go to Dataset Settings
</Button>
Expand Down
4 changes: 2 additions & 2 deletions frontend/javascripts/admin/dataset/dataset_upload_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -725,12 +725,12 @@ class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> {
rules={[
{
required: this.state.needsConversion,
message: "Please provide a scale for the dataset.",
message: "Please provide a voxel size for the dataset.",
},
{
validator: syncValidator(
(value: Vector3) => value?.every((el) => el > 0),
"Each component of the scale must be larger than 0.",
"Each component of the voxel size must be larger than 0.",
),
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
EllipsisOutlined,
EyeOutlined,
LoadingOutlined,
PlusCircleOutlined,
PlusOutlined,
ReloadOutlined,
SettingOutlined,
Expand All @@ -18,9 +17,9 @@ import Toast from "libs/toast";
import messages from "messages";
import CreateExplorativeModal from "dashboard/advanced_dataset/create_explorative_modal";
import { MenuProps, Modal, Typography } from "antd";
import { useState } from "react";
import { confirmAsync } from "dashboard/dataset/helper_components";
import { useQueryClient } from "@tanstack/react-query";
import { useState } from "react";

const disabledStyle: React.CSSProperties = {
pointerEvents: "none",
Expand Down Expand Up @@ -193,18 +192,31 @@ function DatasetActionView(props: Props) {
style={disabledWhenReloadingStyle}
type="link"
>
{isReloading ? <LoadingOutlined /> : <ReloadOutlined className="icon-margin-right" />}
{isReloading ? (
<LoadingOutlined className="icon-margin-right" />
) : (
<ReloadOutlined className="icon-margin-right" />
)}
Reload
</a>
);
const importLink = (
<div className="dataset-table-actions">
<Link
to={`/datasets/${dataset.owningOrganization}/${dataset.name}/import`}
className="import-dataset"
const datasetSettingsLink = (
<>
<LinkWithDisabled
to={`/datasets/${dataset.owningOrganization}/${dataset.name}/edit`}
title="Open Dataset Settings"
disabled={isReloading}
>
<PlusCircleOutlined className="icon-margin-right" />
Import
<SettingOutlined className="icon-margin-right" />
Settings
</LinkWithDisabled>
</>
);
const brokenDatasetActions = (
<div className="dataset-table-actions">
<Link to={`/datasets/${dataset.owningOrganization}/${dataset.name}/edit`}>
<SettingOutlined className="icon-margin-right" />
Settings
</Link>
{reloadLink}
<a
Expand Down Expand Up @@ -236,41 +248,35 @@ function DatasetActionView(props: Props) {
) : null}
</div>
);

const activeDatasetActions = (
<>
{" "}
<NewAnnotationLink
dataset={dataset}
isReloading={isReloading}
isCreateExplorativeModalVisible={isCreateExplorativeModalVisible}
onShowCreateExplorativeModal={() => setIsCreateExplorativeModalVisible(true)}
onCloseCreateExplorativeModal={() => setIsCreateExplorativeModalVisible(false)}
/>
<LinkWithDisabled
to={`/datasets/${dataset.owningOrganization}/${dataset.name}/view`}
title="View Dataset"
disabled={isReloading}
>
<EyeOutlined className="icon-margin-right" />
View
</LinkWithDisabled>
{dataset.isEditable ? datasetSettingsLink : null}
{reloadLink}
</>
);
return (
<div>
{dataset.isEditable && !dataset.isActive ? importLink : null}
{dataset.isActive ? (
<div className="dataset-table-actions nowrap">
<NewAnnotationLink
dataset={dataset}
isReloading={isReloading}
isCreateExplorativeModalVisible={isCreateExplorativeModalVisible}
onShowCreateExplorativeModal={() => setIsCreateExplorativeModalVisible(true)}
onCloseCreateExplorativeModal={() => setIsCreateExplorativeModalVisible(false)}
/>
<LinkWithDisabled
to={`/datasets/${dataset.owningOrganization}/${dataset.name}/view`}
title="View Dataset"
disabled={isReloading}
>
<EyeOutlined className="icon-margin-right" />
View
</LinkWithDisabled>
{dataset.isEditable ? (
<React.Fragment>
<LinkWithDisabled
to={`/datasets/${dataset.owningOrganization}/${dataset.name}/edit`}
title="Open Dataset Settings"
disabled={isReloading}
>
<SettingOutlined className="icon-margin-right" />
Settings
</LinkWithDisabled>
{reloadLink}
</React.Fragment>
) : null}
</div>
) : null}
{dataset.isEditable && !dataset.isActive ? brokenDatasetActions : null}
<div className="dataset-table-actions nowrap">
{dataset.isActive ? activeDatasetActions : null}
</div>
</div>
);
}
Expand Down Expand Up @@ -330,7 +336,7 @@ export function getDatasetActionContextMenu({
},
}
: null,
dataset.isEditable && dataset.isActive
dataset.isEditable
? {
key: "edit",
label: "Open Settings",
Expand All @@ -340,15 +346,6 @@ export function getDatasetActionContextMenu({
}
: null,

dataset.isEditable && !dataset.isActive
? {
key: "import",
label: "Import",
onClick: () => {
window.location.href = `/datasets/${dataset.owningOrganization}/${dataset.name}/import`;
},
}
: null,
{
key: "reload",
label: "Reload",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@ export default function DatasetSettingsDataTab({
form,
activeDataSourceEditMode,
onChange,
additionalAlert,
dataset,
}: {
allowRenamingDataset: boolean;
form: FormInstance;
activeDataSourceEditMode: "simple" | "advanced";
onChange: (arg0: "simple" | "advanced") => void;
additionalAlert?: React.ReactNode | null | undefined;
dataset?: APIDataset | null | undefined;
}) {
// Using the return value of useWatch for the `dataSource` var
Expand Down Expand Up @@ -113,8 +111,6 @@ export default function DatasetSettingsDataTab({
</Tooltip>
</div>

{additionalAlert}

<Hideable hidden={activeDataSourceEditMode !== "simple"}>
<RetryingErrorBoundary>
<SimpleDatasetForm
Expand Down Expand Up @@ -217,12 +213,12 @@ function SimpleDatasetForm({
rules={[
{
required: true,
message: "Please provide a scale for the dataset.",
message: "Please provide a voxel size for the dataset.",
},
{
validator: syncValidator(
(value: Vector3) => value?.every((el) => el > 0),
"Each component of the scale must be greater than 0",
"Each component of the voxel size must be greater than 0",
),
},
]}
Expand Down
Loading

0 comments on commit 8bd7a91

Please sign in to comment.