Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = *.svg,*.sublime-workspace,*.lock,.codespellrc,./util/target/,./binaryData,./node_modules,./pg,./project/target,./target,./webknossos-datastore/target,./webknossos-jni/target,./webknossos-tracingstore/target,./util/target,./coverage,./public-test,./tools/proxy/node_modules,./docs/publications.md,./public/bundle,./public/assets,./tools/migration-unified-annotation-versioning/venv,./tools/migration-unified-annotation-versioning/*.json
skip = *.svg,*.sublime-workspace,*.lock,.codespellrc,./util/target/,./binaryData,./node_modules,./pg,./project/target,./target,./webknossos-datastore/target,./webknossos-jni/target,./webknossos-tracingstore/target,./util/target,./coverage,./public-test,./tools/proxy/node_modules,./docs/publications.md,./public/bundle,./public/assets,./tools/migration-unified-annotation-versioning/venv,./tools/migration-unified-annotation-versioning/*.json,./fossildb/data,*.log,./webknossos-slick-codegen/target,./fossildb/backup,*_pb2.py
# some names and camelCased variables etc
ignore-regex = \b([a-z]+[A-Z][a-zA-Z]*|H Mattern|Manuel|Nat Commun)\b
ignore-words-list = lod,nd,ue,DoubleClick,InOut
ignore-words-list = lod,nd,ue,DoubleClick,InOut,Applyable
6 changes: 3 additions & 3 deletions CHANGELOG.released.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Clicking `Focus Tree in Skeleton Tab` or `Focus in Segment List` will not only focus the clicked tree/segment, but also open the right tab if it was not open already. [#8917](https://github.com/scalableminds/webknossos/pull/8917)
- Renamed Basic plan to Personal plan. [#8951](https://github.com/scalableminds/webknossos/pull/8951)
- Improved the error message when loading an unusable dataset or an annotation for an unusable dataset [#8956](https://github.com/scalableminds/webknossos/pull/8956)
- Changed the pre-selected default format for volume annotation downloads from WKW to Zarr. [#8970](https://github.com/scalableminds/webknossos/pull/8970)
- Changed the preselected default format for volume annotation downloads from WKW to Zarr. [#8970](https://github.com/scalableminds/webknossos/pull/8970)
- The tracingstore route `/mapping/:tracingId/agglomerateGraph/:agglomerateId` used by the python client now returns the static fallback agglomerate graph from the datastore in case of volume annotation layers with no editable mapping. [#9013](https://github.com/scalableminds/webknossos/pull/9013)

### Fixed
Expand Down Expand Up @@ -404,7 +404,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Changed that the d/f switching setting no longer affects movements other than moving via the d/f keyboard shortcuts. [#8786](https://github.com/scalableminds/webknossos/pull/8786)
- Explicitly scanning datasets on disk is now faster for multi-organization setups. [#8791](https://github.com/scalableminds/webknossos/pull/8791)
- Integrated "Change Email" functionality into Account Settings [#8840](https://github.com/scalableminds/webknossos/pull/8840)
- When adding a new dataset from UI modal, the organization's default team is now automatically pre-selected for dataset access permissions. [#8847](https://github.com/scalableminds/webknossos/pull/8847)
- When adding a new dataset from UI modal, the organization's default team is now automatically preselected for dataset access permissions. [#8847](https://github.com/scalableminds/webknossos/pull/8847)
- Zarr streaming a volume annotation will now respond with errors (500) if the underlying data encountered errors. [#8853](https://github.com/scalableminds/webknossos/pull/8853)
- datasource-properties.jsons with wkwResolutions now do not need the cubeLength parameter anymore. [#8854](https://github.com/scalableminds/webknossos/pull/8854)
- Added protection against server outages by limiting the number of update actions in an annotation update transaction to 1000000. [#8866](https://github.com/scalableminds/webknossos/pull/8866)
Expand Down Expand Up @@ -1157,7 +1157,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Added the option to convert agglomerate skeletons to freely modifiable skeletons in the context menu of the Skeleton tab. [#7537](https://github.com/scalableminds/webknossos/pull/7537)
- The annotation list in the dashboard now also shows segment counts of volume annotations (after they have been edited). [#7548](https://github.com/scalableminds/webknossos/pull/7548)
- The buildinfo route now reports the supported HTTP API versions. [#7581](https://github.com/scalableminds/webknossos/pull/7581)
- After deleting specific teams, projects and task types, their names can now be re-used when creating new ones. [#7573](https://github.com/scalableminds/webknossos/pull/7573)
- After deleting specific teams, projects and task types, their names can now be reused when creating new ones. [#7573](https://github.com/scalableminds/webknossos/pull/7573)

### Changed
- Improved loading speed of the annotation list. [#7410](https://github.com/scalableminds/webknossos/pull/7410)
Expand Down
4 changes: 2 additions & 2 deletions app/models/task/TaskCreationResult.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package models.task

import com.scalableminds.util.mvc.JsonResultAttribues
import com.scalableminds.util.mvc.JsonResultAttributes
import com.scalableminds.util.tools.Fox
import com.scalableminds.util.tools.{Box, Empty, Failure, Full, ParamFailure}
import play.api.http.Status
Expand All @@ -10,7 +10,7 @@ import scala.concurrent.{ExecutionContext, Future}

case class TaskCreationResult(tasks: List[JsObject], warnings: List[String])

object TaskCreationResult extends JsonResultAttribues with Status {
object TaskCreationResult extends JsonResultAttributes with Status {
implicit val jsonFormat: Format[TaskCreationResult] = Json.format[TaskCreationResult]

def fromTaskJsFoxes(taskJsons: List[Fox[JsObject]], warnings: List[String])(
Expand Down
2 changes: 1 addition & 1 deletion app/security/CertificateValidationService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class CertificateValidationService @Inject()(implicit ec: ExecutionContext) exte
(for {
certificate <- Properties.envOrNone("CERTIFICATE")
// JwtJson already throws an error which is transformed to an empty option when the certificate is expired.
// In case the token is expired, tge default map will be used.
// In case the token is expired, the default map will be used.
token <- JwtJson.decodeJson(certificate, publicKey, JwtOptions(expiration = false)).toOption
featureOverrides <- Some(
(token \ "webknossos").asOpt[Map[String, Boolean]].getOrElse(defaultConfigOverridesMap))
Expand Down
2 changes: 1 addition & 1 deletion conf/webknossos.versioned.routes
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# changed in v12: Dataset upload now expects layersToLink in new format with datasetId instead of orgaId+directoryName
# changed in v11: Datasets reserveManualUpload flow via WK side. Note: older versions of the route are *not* supported for security reasons.
# changed in v9: Datasets are now identified by their id, not their name. The routes now need to pass a dataset id instead of a name and organization id tuple.
# Requests to the TracingStore and DatasStore need to address a dataset based on its directoryName and organization id.
# Requests to the TracingStore and DataStore need to address a dataset based on its directoryName and organization id.
# changed in v8: Datasets' name was renamed to id and the displayName is now named name.
# changed in v7: datasources now contain scale as object with keys factor and unit, e.g. {"factor": [11,11,5.5], "unit": "nm"}
# changed in v6: isValidName always returns Ok, with a JSON object containing possible errors and key "isValid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function SelectDatasets({ wizardContext, setWizardContext }: Wiza
return (
<div>
<p>
Select the datasets that you want to combine or doublecheck the pre-selected datasets. Note
Select the datasets that you want to combine or doublecheck the preselected datasets. Note
that the order of the datasets is important and needs to be equal to the order of the files
from the upload.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function PermissionsAndTeamsModalView(props: TeamRoleModalProps) {
const onlyEditingSingleUser = selectedUserIds.length === 1;

useEffect(() => {
// If a single user is selected, pre-select their teams
// If a single user is selected, preselect their teams
const singleUserMaybe = getSingleUserMaybe(selectedUserIds, users);

if (singleUserMaybe) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe("Save Mutex Saga collaboration mode switching", () => {

/*
* Tests for:
* Exclusive -> {Concurrent, OnwerOnly}
* Exclusive -> {Concurrent, OwnerOnly}
*/
it<WebknossosTestContext>("Switching from Exclusive to Concurrent should cancel the continuous mutex saga and start the ad-hoc saga.", async (context: WebknossosTestContext) => {
await setupWebknossosForTestingWithRestrictions(context, "Exclusive", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function mayAddToSaveQueue(state: WebknossosState): boolean {
* with update actions.
*/
return (
// allowSave is initialized with allowUpdate and may be overriden when
// allowSave is initialized with allowUpdate and may be overridden when
// saving is disabled (via DISABLE_SAVING action).
Boolean(state.annotation.restrictions.allowSave) &&
!state.uiInformation.showVersionRestore &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ export type BucketRetrievalSource =
export const getBucketRetrievalSourceFn =
// The function that is passed to memoize will only be executed once
// per layerName. This is important since the function uses reuseInstanceOnEquality
// to create a function that ensures that identical BucketRetrievalSource tuples will be re-used between
// to create a function that ensures that identical BucketRetrievalSource tuples will be reused between
// consecutive calls.
memoize((layerName: string) =>
reuseInstanceOnEquality((state: WebknossosState): BucketRetrievalSource => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function needsPollAnnotationUpdates(state: WebknossosState): "yes" | "no" | "lat

// If the version restore view is open, newer versions should not be fetched
// as this could mess up the current state.
// Similarily, we should not poll for updates when a rebase is in progress.
// Similarly, we should not poll for updates when a rebase is in progress.
const { isRestoringVersion, showVersionRestore } = state.uiInformation;
const isVersionRestoreActive = showVersionRestore && !isRestoringVersion;
const { isRebasingOrForwarding } = state.save.rebaseRelevantServerAnnotationState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Tree } from "viewer/model/types/tree_types";

const NODE_RADIUS = 2;
const MAX_NODE_DISTANCE = 100;
const CLICK_TRESHOLD = 6;
const CLICK_THRESHOLD = 6;
const MODE_NORMAL = 0; // draw every node and the complete tree

const MODE_NOCHAIN = 1; // draw only decision points
Expand Down Expand Up @@ -70,7 +70,7 @@ class AbstractTreeRenderer {
let id = null;

for (const entry of nodeList) {
if (Math.abs(x - entry.x) <= CLICK_TRESHOLD && Math.abs(y - entry.y) <= CLICK_TRESHOLD) {
if (Math.abs(x - entry.x) <= CLICK_THRESHOLD && Math.abs(y - entry.y) <= CLICK_THRESHOLD) {
id = entry.id;
break;
}
Expand Down Expand Up @@ -356,7 +356,7 @@ class AbstractTreeRenderer {
/**
* Draws the dashed chain indicator and the start and end nodes.
* @param {Number} top y coordinate in pixels
* @param {Number} middle middel x coordinate in pixels
* @param {Number} middle middle x coordinate in pixels
* @param {AbstractNodeType} node
* @param {Decision} decision
*/
Expand Down
26 changes: 13 additions & 13 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import play.sbt.PlayImport.{filters, _}
import sbt._
import play.sbt.PlayImport.{filters, *}
Comment thread
fm3 marked this conversation as resolved.
import sbt.*

object Dependencies {

Expand All @@ -12,16 +12,16 @@ object Dependencies {
)

private val silhouetteVersion = "10.0.4"
private val brotliVersion = "1.22.0"
private val slickVersion = "3.5.2"
private val postgresVersion = "42.7.10"
private val awsVersion = "2.42.41"
private val brotliVersion = "1.23.0"
private val slickVersion = "3.6.1"
private val awsVersion = "2.46.10"
private val postgresVersion = "42.7.11"
private val scalapbVersion = scalapb.compiler.Version.scalapbVersion
private val grpcVersion = scalapb.compiler.Version.grpcJavaVersion

val utilDependencies: Seq[ModuleID] = Seq(
// Play Web Framework. import play
"org.playframework" %% "play" % "3.0.10",
"org.playframework" %% "play" % "3.0.11",
// Play’s JSON serialization. import play.api.libs.json
"org.playframework" %% "play-json" % "3.0.6",
// Sending emails. import org.apache.commons.mail
Expand All @@ -33,7 +33,7 @@ object Dependencies {
// Protocol buffers. import scalapb
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapbVersion,
// LazyLogging. import com.typesafe.scalalogging
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.6",
// Asynchronous caching. import com.github.benmanes.caffeine
caffeine,
// password hashing with bcrypt. import at.favre.lib.crypto.bcrypt
Expand Down Expand Up @@ -79,13 +79,13 @@ object Dependencies {
// AWS Transfer Manager for multipart uploads. import software.amazon.awssdk.transfer.s3
"software.amazon.awssdk" % "s3-transfer-manager" % awsVersion,
// Google cloud storage client. import com.google.cloud.storage, import com.google.auth.oauth2
"com.google.cloud" % "google-cloud-storage" % "2.67.0",
"com.google.cloud" % "google-cloud-storage" % "2.69.0",
// Blosc compression. import dev.zarr.bloscjava
"com.scalableminds" % "blosc-java" % "0.1-1.21.4",
"com.scalableminds" % "blosc-java" % "0.3-1.21.6",
// Zstd compression. import org.apache.commons.compress
"org.apache.commons" % "commons-compress" % "1.28.0",
// Zstd compression native bindings. not imported
"com.github.luben" % "zstd-jni" % "1.5.7-7",
"com.github.luben" % "zstd-jni" % "1.5.7-11",
// Brotli compression. import com.aayushatharva.brotli4j
"com.aayushatharva.brotli4j" % "brotli4j" % brotliVersion,
// Brotli compression native bindings. not imported
Expand Down Expand Up @@ -113,9 +113,9 @@ object Dependencies {
// End-to-end test specs
specs2 % Test,
// Writing XML. import com.sun.xml.txw2
"org.glassfish.jaxb" % "txw2" % "4.0.7",
"org.glassfish.jaxb" % "txw2" % "4.0.9",
// Makes txw2 write self-closing tags in xml (which we want). Not imported.
"com.fasterxml.woodstox" % "woodstox-core" % "7.1.1",
"com.fasterxml.woodstox" % "woodstox-core" % "7.2.1",
// Json Web Tokens (used for OIDC Auth). import pdi.jwt
"com.github.jwt-scala" %% "jwt-play-json" % "11.0.4",
// SQL Queries. import slick
Expand Down
2 changes: 1 addition & 1 deletion schema/evolutions/069-tasktype-project-unique-per-orga.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ALTER TABLE webknossos.projects ALTER COLUMN _organization SET NOT NULL;
ALTER TABLE webknossos.tasktypes ALTER COLUMN _organization SET NOT NULL;

ALTER TABLE webknossos.taskTypes ADD CONSTRAINT tasktypes_summary__organization_key UNIQUE(summary, _organization);
-- Project name uniqueness only enforced in scala, to allow re-using names of deleted ones.
-- Project name uniqueness only enforced in scala, to allow reusing names of deleted ones.
-- Compare https://github.com/scalableminds/webknossos/issues/5388

CREATE VIEW webknossos.projects_ AS SELECT * FROM webknossos.projects WHERE NOT isDeleted;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ do $$ begin if (select schemaVersion from webknossos.releaseInformation) <> 169

DROP VIEW webknossos.annotations_;

-- Readd old viewConfiguration column
-- Re-add old viewConfiguration column
ALTER TABLE webknossos.annotations ADD COLUMN viewConfiguration JSONB;

-- migrate owner view config to annotation table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ trait ResultImplicits extends BoxToResultHelpers {

class JsonResult(status: Int)
extends Result(header = ResponseHeader(status), body = HttpEntity.NoEntity)
with JsonResultAttribues {
with JsonResultAttributes {

private def createResult(content: JsValue)(implicit writeable: Writeable[JsValue]): Result =
Result(header = ResponseHeader(status),
Expand Down Expand Up @@ -182,13 +182,13 @@ trait MimeTypes {
val octetStreamMimeType: String = "application/octet-stream"
}

trait JsonResults extends JsonResultAttribues {
trait JsonResults extends JsonResultAttributes {
val JsonOk = new JsonResult(OK)
val JsonBadRequest = new JsonResult(BAD_REQUEST)
val JsonNotFound = new JsonResult(NOT_FOUND)
}

trait JsonResultAttribues {
trait JsonResultAttributes {
val jsonSuccess = "success"
val jsonError = "error"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.scalableminds.webknossos.datastore.dataformats

trait SafeCachable {
trait SafeCacheable {

private var accessCounter = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.util
import ch.systemsx.cisd.hdf5.{HDF5DataSet, IHDF5Reader}
import com.scalableminds.util.cache.LRUConcurrentCache
import com.scalableminds.util.tools.{Box, Full}
import com.scalableminds.webknossos.datastore.dataformats.SafeCachable
import com.scalableminds.webknossos.datastore.dataformats.SafeCacheable
import com.scalableminds.webknossos.datastore.models.datasource.{DataSourceId, LayerAttachment}
import com.scalableminds.webknossos.datastore.models.requests.{Cuboid, DataServiceDataRequest}
import com.typesafe.scalalogging.LazyLogging
Expand All @@ -17,7 +17,7 @@ case class CachedAgglomerateFile(reader: IHDF5Reader,
dataset: HDF5DataSet,
agglomerateIdCache: AgglomerateIdCache,
cache: Either[AgglomerateIdCache, BoundingBoxCache])
extends SafeCachable {
extends SafeCacheable {
override protected def onFinalize(): Unit = { dataset.close(); reader.close() }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ch.systemsx.cisd.hdf5.{
import com.scalableminds.util.Msg
import com.scalableminds.util.cache.LRUConcurrentCache
import com.scalableminds.util.tools.{Box, Failure, Full}
import com.scalableminds.webknossos.datastore.dataformats.SafeCachable
import com.scalableminds.webknossos.datastore.dataformats.SafeCacheable
import com.scalableminds.webknossos.datastore.models.datasource.LayerAttachment
import com.scalableminds.webknossos.datastore.services.ArrayArtifactHashing
import com.scalableminds.webknossos.datastore.services.mesh.MeshFileUtils
Expand All @@ -22,7 +22,7 @@ import java.nio.file.Path
import scala.util.Using

class CachedHdf5File(reader: IHDF5Reader)
extends SafeCachable
extends SafeCacheable
with AutoCloseable
with ArrayArtifactHashing
with MeshFileUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ case class UpsertSegmentGroupVolumeAction(groupId: Int,

private def renameInGroups(groups: Seq[SegmentGroup]): (Seq[SegmentGroup], Boolean) = {
// To avoid traversing into the subbranch of the group which should be renamed, we pass the second argument to fold left.
// It keeps track of whether the renaming was already done and then earlies out instead of traversing deeper.
// It keeps track of whether the renaming was already done and then stops early instead of traversing deeper.
val updated = groups.foldLeft((Vector.empty[SegmentGroup], false)) {
// Pass as already renamed.
case ((acc, true), g) =>
Expand Down
Loading