Skip to content

Commit

Permalink
Merge branch 'master' of github.com:scalableminds/webknossos into pro…
Browse files Browse the repository at this point in the history
…jects-created

* 'master' of github.com:scalableminds/webknossos: (337 commits)
  Fix docs for the annotation download file format (#6546)
  Added total runtime information to VX reports (#6543)
  fix VX report for completed + skipped tasks (#6540)
  Avoid allocating spire uint objects during apply agglomerate (#6532)
  Explore remote N5 datasets (#6520)
  Fix MeshChunk byteOffset (Long, not Int) (#6536)
  update browserslist (#6505)
  Support new Mesh File (v3) (#6491)
  makes workflow_yamlContent optional (#6518)
  Always return 404 for Failures in Zarr Streaming (#6515)
  Poll wk version to notify during upgrade (#6451)
  add script which extracts newest changelog and creates GH release for it (#6504)
  release 22.10.0 (#6500)
  voxel³ -> voxel (#6501)
  Allow task type summary to identify task type when creating tasks in bulk (#6486)
  Fix sql evolution 090 (defer not null constraint) (#6498)
  SQL schema cleanup (#6492)
  Fix validation of layer selection when trying to start globalization of floodfills (#6497)
  Add "shift + w" shortcut to cycle backwards through tools (#6493)
  Fix filtering for public datasets in dataset table (#6496)
  ...
  • Loading branch information
hotzenklotz committed Oct 13, 2022
2 parents 8db49af + faa9f1f commit 8810958
Show file tree
Hide file tree
Showing 1,558 changed files with 141,722 additions and 113,784 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
}
}
],
["@babel/preset-typescript", {
"isTSX": true,
"allExtensions": true
}]
],
"plugins": [
"istanbul"
Expand Down Expand Up @@ -45,7 +49,10 @@
}
],
"@babel/preset-react",
"@babel/preset-flow"
["@babel/preset-typescript", {
"isTSX": true,
"allExtensions": true
}]
],
"plugins": [
"@babel/plugin-proposal-class-properties",
Expand Down
36 changes: 19 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ version: 2
jobs:
build_test_deploy:
machine:
image: ubuntu-1604:201903-01
image: ubuntu-2004:202111-02
docker_layer_caching: true
resource_class: large
environment:
USER_NAME: circleci
USER_UID: 1001
USER_GID: 1001
USER_UID: 1000
USER_GID: 1000
TZ: Europe/Berlin
steps:
- checkout
Expand Down Expand Up @@ -75,19 +77,15 @@ jobs:
if [ "${CIRCLE_BRANCH}" == "master" ]; then
docker-compose run compile sbt -no-colors clean compile stage
else
docker-compose run compile sbt -no-colors compile stage
docker-compose run compile sbt -no-colors -DfailOnWarning compile stage
fi
- run:
name: Build webknossos-datastore (sbt)
command: docker-compose run base sbt -no-colors "project webknossosDatastore" copyMessages compile stage
command: docker-compose run base sbt -no-colors -DfailOnWarning "project webknossosDatastore" copyMessages compile stage

- run:
name: Build webknossos-tracingstore (sbt)
command: docker-compose run base sbt -no-colors "project webknossosTracingstore" copyMessages compile stage

- run:
name: Assemble webknossos-datastore fat-jar (sbt)
command: docker-compose run base sbt -no-colors "project webknossosDatastore" assembly
command: docker-compose run base sbt -no-colors -DfailOnWarning "project webknossosTracingstore" copyMessages compile stage

- save_cache:
name: Save target cache
Expand Down Expand Up @@ -128,15 +126,15 @@ jobs:
command: docker-compose build --pull webknossos-tracingstore

- run:
name: Lint frontend code
name: Lint frontend code and check formatting
command: |
.circleci/not-on-master.sh docker-compose run base bash -c "yarn run lint && yarn run am-i-pretty"
- run:
name: Run frontend tests
command: |
.circleci/not-on-master.sh docker-compose run base yarn test-verbose
- run:
name: Lint backend code
name: Lint backend code and check formatting
command: |
.circleci/not-on-master.sh docker-compose run backend-lint-format
- run:
Expand All @@ -151,9 +149,9 @@ jobs:
done
(exit $s)
- run:
name: Validate frontend types with flow
name: Validate frontend types
command: |
.circleci/not-on-master.sh docker-compose run base yarn flow
.circleci/not-on-master.sh docker-compose run base yarn typecheck
- run:
name: Start webknossos
background: true
Expand Down Expand Up @@ -245,6 +243,7 @@ jobs:
nightly:
docker:
- image: scalableminds/puppeteer:master
resource_class: large
steps:
- checkout
- run:
Expand All @@ -253,7 +252,7 @@ jobs:
curl
-X POST
-H "X-Auth-Token: $RELEASE_API_TOKEN"
https://kube.scm.io/hooks/remove/webknossos/dev/master?user=CI+%28nightly%29
https://kubernetix.scm.io/hooks/remove/webknossos/dev/master?user=CI+%28nightly%29
- run:
name: Wait 3min
command: sleep 180
Expand All @@ -263,7 +262,7 @@ jobs:
curl
-X POST
-H "X-Auth-Token: $RELEASE_API_TOKEN"
https://kube.scm.io/hooks/install/webknossos/dev/master?user=CI+%28nightly%29
https://kubernetix.scm.io/hooks/install/webknossos/dev/master?user=CI+%28nightly%29
- run:
name: Install dependencies and sleep at least 3min
command: |
Expand All @@ -272,7 +271,7 @@ jobs:
wait
- run:
name: Refresh datasets
command: curl https://master.webknossos.xyz/data/triggers/checkInboxBlocking?token=secretSampleUserToken
command: curl -X POST --fail https://master.webknossos.xyz/data/triggers/checkInboxBlocking?token=$WK_AUTH_TOKEN
- run:
name: Run screenshot-tests
command: |
Expand All @@ -282,6 +281,9 @@ jobs:
- store_artifacts:
path: frontend/javascripts/test/screenshots

- store_artifacts:
path: frontend/javascripts/test/snapshots/type-check

workflows:
version: 2
circleci_build:
Expand Down
4 changes: 3 additions & 1 deletion .circleci/slack-notification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ if [ "${CIRCLE_BRANCH}" == "master" ] ; then
author=${author/tmbo/<@tmbo>}
author=${author/valentin-pinkau/<@valentin>}
author=${author/youri-k/<@youri>}
author=${author/Dagobert42/<@Arthur Hilbert>}
author=${author/Dagobert42/<@Arthur>}
author=${author/leowe/<@leo>}
author=${author/frcroth/<@felix.roth>}
channel="webknossos-bots"
commitmsg="$(git log --format=%s -n 1)"
pullregex="(.*)#([0-9]+)(.*)"
Expand Down
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
frontend/javascripts/test/snapshots/flow-check/*
*.d.ts
tools/proxy/node_modules/*
frontend/javascripts/test/snapshots/type-check/*
52 changes: 41 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"extends": [
"airbnb",
"airbnb-typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:eslint-comments/recommended",
"plugin:flowtype/recommended",
"plugin:react/recommended",
"prettier",
"prettier/flowtype",
"prettier/react"
"prettier"
],
"plugins": ["react", "react-hooks", "import", "flowtype", "flow-header"],
"plugins": ["@typescript-eslint", "react", "react-hooks", "import", "ava"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 8
"ecmaVersion": 8,
"project": "./tsconfig.json"
},
"env": {
"browser": true
},
"parser": "babel-eslint",
"settings": {
"import/resolver": "webpack",
"import/ignore": ["$three.*"],
Expand All @@ -40,6 +40,7 @@
"eslint-comments/no-unused-disable": "error",
"flowtype/no-types-missing-file-annotation": "off",
"import/extensions": ["warn", { "js": "never", "jsx": "always" }],
"import/prefer-default-export": ["warn"],
"import/no-cycle": "off",
"import/no-extraneous-dependencies": [
"error",
Expand Down Expand Up @@ -68,8 +69,12 @@
"no-restricted-syntax": ["error", "ForInStatement"],
"no-restricted-globals": "warn",
"no-underscore-dangle": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_", "ignoreRestSiblings": true }],
"no-use-before-define": ["error", { "functions": false, "classes": false }],
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
],
"@typescript-eslint/no-use-before-define": ["error", { "functions": false, "classes": false }],
"no-console": "off",
"one-var": ["error", "never"],
"operator-assignment": "warn",
"prefer-destructuring": "off",
Expand All @@ -84,7 +89,6 @@
"react/require-default-props": "off",
"react-hooks/rules-of-hooks": "error",
"import/newline-after-import": "off",
"flow-header/flow-header": "error",
"spaced-comment": "off",
"react/sort-comp": [
"error",
Expand All @@ -98,6 +102,32 @@
"render"
]
}
]
],
"ava/no-only-test": "error",

// reconsider rules after finishing Typescript conversion
"react/static-property-placement": "off",
"react/jsx-props-no-spreading": "warn", // no opinion
"react/state-in-constructor": "off", // probably want "never",
"react/default-props-match-prop-types": "warn", // probably should be enabled
"react/jsx-fragments": "off", // debateable. could be autofixed with eslint --fix ...
"max-classes-per-file": "off", // seems useful, but requires some refactoring, set to off because it's visually distracting
"prefer-object-spread": "off", // debateable. could be autofixed with eslint --fix ...
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/naming-convention": [
"off",
{
"leadingUnderscore": "allow",
"format": ["camelCase", "UPPER_CASE"],
"selector": ["variable", "function"]
}
], // interesting but hard to finetune for all cases
"react/no-unstable-nested-components": "warn", // probably should do something about it
"react/no-array-index-key": "error", // maybe sensible, maybe not
"prefer-exponentiation-operator": "off", // I find Math.pow() more readble than **
"eqeqeq": "error", // == vs ===
"react/jsx-no-bind": "off", // no opinion
"react/function-component-definition": "warn", // probably should do this. can be autofixed with eslint --fix
"@typescript-eslint/no-throw-literal": "warn" // probably should do this.
}
}
42 changes: 0 additions & 42 deletions .flowconfig

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/assign_issue_project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Auto Assign Issues to Project
# From: https://www.cloudwithchris.com/blog/automate-adding-gh-issues-projects-beta/
on:
issues:
types: [opened]
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_GITHUB_TOKEN }}

jobs:
assign_issue_to_project:
runs-on: ubuntu-latest
steps:
- name: Get project data
env:
ORGANIZATION: scalableminds
PROJECT_NUMBER: 6
run: |
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectNext(number: $number) {
id
fields(first:20) {
nodes {
id
name
settings
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
- name: Add issue to project
env:
ISSUE_ID: ${{ github.event.issue.node_id }}
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectNextItem(input: {projectId: $project, contentId: $issue}) {
projectNextItem {
id
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ src/main/scala/rebel.xml
*.zip
*.skp
*.mtl
public/bower_components
public/bundle
public/test-bundle
public-test/test-bundle
public/docs
public/commit.txt
/knowledge
Expand All @@ -62,8 +62,8 @@ dev-db/
docker-compose.override.yml
frontend/javascripts/test/snapshots/debug-htmls/*
!frontend/javascripts/test/snapshots/debug-htmls/.gitkeep
frontend/javascripts/test/snapshots/flow-check/*
!frontend/javascripts/test/snapshots/flow-check/.gitkeep
frontend/javascripts/test/snapshots/type-check/*
!frontend/javascripts/test/snapshots/type-check/.gitkeep
.eslintcache
*.sublime-project
*.sublime-workspace
Expand Down
2 changes: 1 addition & 1 deletion .importjs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
excludes: ["./target/**", "./public/**"],
excludes: ["./target/**", "./public/**", "./public-test/**"],
useRelativePaths: false,
environments: ["browser"],
aliases: {
Expand Down
9 changes: 1 addition & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"trailingComma": "all",
"printWidth": 100,
"overrides": [
{
"files": "effect-generators.js.flow",
"options": {
"printWidth": 240
}
}
]
"overrides": []
}
Loading

0 comments on commit 8810958

Please sign in to comment.