Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
651b185
Create python-package.yml
sorenwacker Nov 8, 2023
f9da5b4
Fix relative import
Era-Dorta Feb 14, 2024
4352dc7
Initital implementation of the action annotation task
Era-Dorta Feb 14, 2024
c353dea
Add video player
Era-Dorta Feb 14, 2024
fe19e2a
Add auto generated task
Era-Dorta Feb 14, 2024
6603035
Auto-formatting applied to action_annotation/index.tsx
Kenneth-Funes-TU-Delft Feb 15, 2024
3b8bab4
Added VS code debug options and minor code maintenance changes
Kenneth-Funes-TU-Delft Feb 1, 2024
9cf3f08
Implemented a functional dropdown. State in sync with buttons. (#3)
Kenneth-Funes-TU-Delft Feb 22, 2024
b343fbc
Added dropdowns and interactive gallery to see participants (#5)
Kenneth-Funes-TU-Delft Feb 29, 2024
7a77912
Merge branch 'master' into actions-annotations
Kenneth-Funes-TU-Delft Feb 29, 2024
1c043cc
Merge branch 'josedvq:master' into master
Kenneth-Funes-TU-Delft Feb 29, 2024
1994a8c
Integrated the example logic to retrieve the current annotations
Kenneth-Funes-TU-Delft Feb 29, 2024
952940e
Merged ActionAnnotation and ContinuousAnnotation into one
Kenneth-Funes-TU-Delft Feb 29, 2024
0ac5086
Bugfix: Make customApiBase optional to avoid breaking all tasks
Kenneth-Funes-TU-Delft Feb 29, 2024
733f040
3: Implemented functionality to post annotated data to the server
Kenneth-Funes-TU-Delft Feb 29, 2024
3448b2b
6: Added hooks to set the annotations and upload when finishing
Kenneth-Funes-TU-Delft Mar 7, 2024
daf223a
#8: Flashscreen done and refactored for readability and reliability
Kenneth-Funes-TU-Delft Mar 8, 2024
6cc0b85
> #10 Implemented a camera view selection component
Kenneth-Funes-TU-Delft Mar 14, 2024
a3e0332
> #13 Extended continuous annotation to allow multiple synced video urls
Kenneth-Funes-TU-Delft Mar 14, 2024
1aa7f4a
Fixes #11, add consent form (#16)
Mar 18, 2024
282c8a0
Merge branch 'master' of github.com:TUDelft-SPC-Lab/covfee
Era-Dorta Mar 19, 2024
dfc5fd4
Merge branch 'master' into actions-annotations
Era-Dorta Mar 19, 2024
63974eb
Merge branch 'actions-annotations' of github.com:TUDelft-SPC-Lab/covf…
Era-Dorta Mar 19, 2024
1198284
> #15: Instructions, task completion, and improved layout (#17)
Kenneth-Funes-TU-Delft Mar 19, 2024
fc7fcb4
Update automatically generated classes
Era-Dorta Mar 19, 2024
745678b
Add deployment config for continuous annotation task
Era-Dorta Mar 19, 2024
bbe88e1
Set real deployment url
Era-Dorta Mar 19, 2024
fd1ed55
Add missing imports
Era-Dorta Mar 19, 2024
7127fa7
Merge branch 'actions-annotations' of github.com:TUDelft-SPC-Lab/covf…
Era-Dorta Mar 19, 2024
89bf4f6
Added gevent dependency for vscode
Era-Dorta Mar 21, 2024
567cd26
> #18 Implemented video playback with dynamic switching
Era-Dorta Mar 19, 2024
bc493d8
Sever deployment (#20)
Era-Dorta Mar 25, 2024
82e9609
> #25 Implemented redirection from prolific URLs to journeys
Kenneth-Funes-TU-Delft Mar 28, 2024
5059191
: #25: Improved expiration logic for annotators and their journeys
Kenneth-Funes-TU-Delft Apr 4, 2024
88d3d85
> #25 Removed the expiration logic for journey associtation to annotator
Kenneth-Funes-TU-Delft Apr 4, 2024
73f3525
> #18 Implemented video playback with dynamic switching
Era-Dorta Mar 19, 2024
b0bb995
Merge branch 'actions-annotations' into 25-redirect-prolific-academic…
Kenneth-Funes-TU-Delft Apr 5, 2024
504220a
#25: Added a comment regarding the future iteration of the journey as…
Kenneth-Funes-TU-Delft Apr 5, 2024
743333d
Set volume to zero when playing the video (#27)
Era-Dorta Apr 5, 2024
6b96790
#25: Cleaned up the prolific academic redirection API code
Kenneth-Funes-TU-Delft Apr 5, 2024
9f9605f
Merge branch '25-redirect-prolific-academic-urls-to-covfee-urls' of g…
Kenneth-Funes-TU-Delft Apr 5, 2024
d5a80c6
Merge pull request #30 from TUDelft-SPC-Lab/25-redirect-prolific-acad…
Kenneth-Funes-TU-Delft Apr 5, 2024
4552a1c
Add prolific_pid and start date to the admin panel (#31)
Era-Dorta Apr 11, 2024
548f5a7
Added numeric progress to nodes visible on admin panel (#32)
Kenneth-Funes-TU-Delft Apr 11, 2024
4e306db
Show journey progress on the admin panel (#35)
Era-Dorta Apr 18, 2024
ab333f2
#33 Added id_within_study to hitspecs and journey specs
Kenneth-Funes-TU-Delft Apr 18, 2024
c410021
Remove the consent form (#36)
Era-Dorta Apr 18, 2024
de33583
. #22 #23 Cont task split into components, and improved UI
Kenneth-Funes-TU-Delft Mar 28, 2024
a7cdf74
Remove nodes sidebar (#38)
Era-Dorta Apr 19, 2024
69e323c
Fix submit button (#41)
Era-Dorta Apr 19, 2024
1defe3b
.#23 #33 Improvements to the continuous annotations task UX
Kenneth-Funes-TU-Delft Apr 19, 2024
efc00ec
.#23 Better guidance related to task completion and accessing a compl…
Kenneth-Funes-TU-Delft Apr 22, 2024
596f302
Pilot fixes (#43)
Era-Dorta Apr 25, 2024
d51b629
.#46 Option to specify an audio requirement during playback
Kenneth-Funes-TU-Delft Apr 25, 2024
b90802e
.#44 Deleted returned submissions from prolific and project cleanup
Kenneth-Funes-TU-Delft Apr 26, 2024
62cd396
#44 Created a custom exception for prolific academic api issues
Kenneth-Funes-TU-Delft Apr 26, 2024
93ed91b
Remove continuous_annotation.py
Era-Dorta Apr 29, 2024
fdb4abc
Add samples/continuous_annotation to the gitignore file
Era-Dorta Apr 29, 2024
a433d52
Replace #MINGLE with #CONFLAB
Era-Dorta Apr 29, 2024
92ef6a1
.#33 - Support for multiple HITs and using global_unique_id in their …
Kenneth-Funes-TU-Delft May 2, 2024
1d2f966
#33 Renamed id_within_study to global_unique_id for consistenty
Kenneth-Funes-TU-Delft May 3, 2024
b8936cd
Fix missing annotations in json download (#51)
Era-Dorta May 3, 2024
ca533a4
Fix bug with returned submissions (#53)
Era-Dorta May 6, 2024
765550d
Add modal with additional per task intructions (#55)
Era-Dorta May 6, 2024
599e9d4
.#33 - New support for adding new HITs/Journeys through the spec files
Kenneth-Funes-TU-Delft Apr 18, 2024
30fcd0e
.#33 - Backup of DB also on drop events and added typing hints
Kenneth-Funes-TU-Delft May 6, 2024
2d084a3
Take into account rejected and timed out annotators (#59)
Era-Dorta May 6, 2024
567e6dd
#57: Added capacity to specify video per participant id in video urls
Kenneth-Funes-TU-Delft May 6, 2024
95dac97
Better format for json data file (#60)
Era-Dorta May 7, 2024
7b90683
Fix video per per participant
Era-Dorta May 15, 2024
d6aa390
.#61 Assigning study ids to journeys, so journeys are filtered per study
Kenneth-Funes-TU-Delft May 16, 2024
84cd941
Merge pull request #62 from TUDelft-SPC-Lab/batch-01
Era-Dorta May 16, 2024
40d14ac
Solved and now preventing the non-null but empty data_json annotations.
Kenneth-Funes-TU-Delft May 23, 2024
5a5ee65
#65 Customized instructions for the Drinking annotations to save time
Kenneth-Funes-TU-Delft May 24, 2024
c5b055a
Merge branch 'master' into actions-annotations
Era-Dorta Jul 12, 2024
ea6bd8d
Remove create python-package.yml github workflow
Era-Dorta Jul 12, 2024
4e35118
Extend instructions on how to use conda to build the docs
Era-Dorta Aug 20, 2025
fff69af
Change links to upload docs to the TUDelft-SPC-Lab repo
Era-Dorta Aug 20, 2025
25e03f6
Update the readme instructions.
Era-Dorta Aug 20, 2025
cf1a01f
Install yarn from normal conda channel.
Era-Dorta Aug 20, 2025
9a162e9
Fix install instructions in the docs
Era-Dorta Aug 20, 2025
0c4fe5a
Ignore .pnp files
Era-Dorta Aug 20, 2025
90ac605
Fix typo in links in README.md
Era-Dorta Aug 20, 2025
3ff915a
Missing dots in the README.md file
Era-Dorta Aug 20, 2025
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: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ docs/node_modules
yarn.lock
yarn-error.log
lerna-debug.log
.yarn/
.pnp*

# generated files
covfee/shared/schemata.json
Expand Down Expand Up @@ -40,3 +42,5 @@ samples/conflab/media/*
samples/memory/media/*
samples/memory/media.zip

# FIXME: #CONFLAB ignore the deployment files that now live in the private gitlab repo
samples/continuous_annotation/*
31 changes: 5 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,11 @@

Covfee was created to provide an easily extensible tool for video perception and annotation experiments, especially those requiring continuous feedback from the user.

Full documentation: [covfee docs](https://josedvq.github.io/covfee/)
Full documentation: [covfee docs](https://tudelft-spc-lab.github.io)

## Quick start

This document contains instructions for installing covfee locally. We recommend that you work with covfee locally first even if you plan to put it online.

### Setup

1. Install version 12.x of [node.js](https://nodejs.org/en/download/). Make sure that the `npm` command is available in your terminal.

2. Clone this repository and install covfee using pip:

```
git clone git@github.com:josedvq/covfee.git
cd covfee
python3 -m pip install -e .
```

3. Install Javascript dependencies:
```
covfee-installjs
```

### Getting started

Please see the [covfee docs](https://master--5faeef49f6655f00210dbf35.chromatic.com) for an interactive getting started guide.

## Changing covfee
If you wish to change the source code of the backend or make changes to the frontend that are not supported by a custom task, see the [Development guide](docs/development.md).
1. Follow the [installation instructions](https://tudelft-spc-lab.github.io/covfee/docs/development).
2. Navigate in your terminal to the `samples/tutorial` folder.
3. Follow the import the task [steps](https://tudelft-spc-lab.github.io/covfee/docs/custom_task#importing-the-task).
3. Follow the running the task [steps](https://tudelft-spc-lab.github.io/covfee/docs/custom_task#running-the-task).
23 changes: 23 additions & 0 deletions covfee/cli/commands/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

These commands meant as development tools only
"""

import os
import click

Expand Down Expand Up @@ -41,3 +42,25 @@ def make_schemata():
schema.make()
schema.make_dataclasses()
spinner.succeed("Schemata made.")


if __name__ == "__main__":
import sys

# The following code is intended to run a specific covfee command, such as "build"
# from the command line, so it is configurable with a debugger (like in VSCode).
# For example, running `python dev.py --debug-covfee-command build <args>`
DEBUG_COMMAND: str = "--debug-covfee-command"
if DEBUG_COMMAND in sys.argv:
debug_command_index = sys.argv.index(DEBUG_COMMAND) + 1
if debug_command_index < len(sys.argv):
debug_command = sys.argv[debug_command_index]
# Note: covfee uses "click" to parse command line parameters. We remove
# DEBUG_COMMAND, which is not recognized by either of the available
# covfee functions.
sys.argv.pop(debug_command_index)
sys.argv.remove(DEBUG_COMMAND)
if debug_command == "schemata":
make_schemata()
elif debug_command == "build":
build_master()
43 changes: 38 additions & 5 deletions covfee/cli/commands/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from covfee.launcher import Launcher, ProjectExistsException, launch_webpack
from covfee.shared.validator.validation_errors import JavascriptError, ValidationError

from ...loader import Loader
from covfee.loader import Loader
import sys

colorama_init()

Expand Down Expand Up @@ -97,7 +98,15 @@ def get_start_message(url):
"--no-launch", is_flag=True, help="Do not launch covfee, only make the DB"
)
@click.argument("project_spec_file")
def make(force, dev, deploy, safe, rms, no_launch, project_spec_file):
def make(
force: bool,
dev: bool,
deploy: bool,
safe: bool,
rms: bool,
no_launch: bool,
project_spec_file: str,
):
mode = "local"
if dev:
mode = "dev"
Expand All @@ -109,13 +118,19 @@ def make(force, dev, deploy, safe, rms, no_launch, project_spec_file):
install_npm_packages()

try:
# 1. Parse the project spec file into a format that covfee can manage (CovfeeApp)
loader = Loader(project_spec_file)
projects = loader.process(with_spinner=True)
covfee_app = loader.load_project_spec_file_and_parse_as_covfee_app(
with_spinner=True
)

# 2. Create or update the database
launcher = Launcher(
mode, projects, Path(project_spec_file).parent, auth_enabled=not unsafe
mode, covfee_app, Path(project_spec_file).parent, auth_enabled=not unsafe
)
launcher.make_database(force, with_spinner=True)
launcher.create_or_update_database(delete_existing_data=force)

# 3. Launch the app based on the current data/configuration.
if not no_launch:
print(
get_start_message(
Expand Down Expand Up @@ -179,3 +194,21 @@ def install_npm_packages(force=False):
npm_package = NPMPackage(shared_path)
if force or not npm_package.is_installed():
npm_package.install()


if __name__ == "__main__":

# The following code is intended to run a specific covfee command, such as "make"
# from the command line, so it is configurable with a debugger (like in VSCode).
# For example, running `python launch.py --debug-covfee-command make <args>`
DEBUG_COMMAND: str = "--debug-covfee-command"
if DEBUG_COMMAND in sys.argv:
debug_command_index = sys.argv.index(DEBUG_COMMAND) + 1
if debug_command_index < len(sys.argv):
debug_command = sys.argv[debug_command_index]
# Note: covfee uses "click" to parse command line parameters. We remove
# DEBUG_COMMAND, which is not recognized by either of the available
# covfee functions.
sys.argv.pop(debug_command_index)
sys.argv.remove(DEBUG_COMMAND)
globals()[debug_command]()
32 changes: 21 additions & 11 deletions covfee/client/admin/force_graph.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as React from "react"
import type { SimulationNodeDatum } from "d3"
import * as d3 from "d3"
import type { SimulationNodeDatum, Simulation } from "d3"
import { NodeStatusToColor, getNodeStatus } from "./utils"
import { NodeType } from "../types/node"
import * as React from "react"
import { ReducedJourney } from "../models/Journey"
import { HitInstanceType } from "../types/hit"
import { JourneyType, ReducedJourney } from "../models/Journey"
import { NodeType } from "../types/node"
import { NodeStatusToColor, getNodeStatus } from "./utils"

const getDimensions = (nodes: SimulationNode[], nodeRadius: number) => {
let minX = Infinity,
Expand All @@ -22,12 +22,18 @@ const getDimensions = (nodes: SimulationNode[], nodeRadius: number) => {
}

const createNodes = (nodes: NodeType[], focusedNode: number) => {
const res = nodes.map((n, index) => ({
id: n.id,
name: n.name,
focused: focusedNode == index,
color: NodeStatusToColor[getNodeStatus(n)],
}))
const res = nodes.map((n, index) => {
let name = n.name
if (n.progress !== null && n.progress !== undefined) {
name += ` (${n.progress.toFixed(1)}%)`
}
return {
id: n.id,
name: name,
focused: focusedNode === index,
color: NodeStatusToColor[getNodeStatus(n)],
}
})

return res
}
Expand Down Expand Up @@ -118,6 +124,9 @@ export const ForceGraph = ({
.attr("stroke-opacity", ({ index }) =>
nodes[index].focused ? "0.1" : "0.01"
)
nodesRefs.current
.selectChildren("text")
.text(({ index }) => nodes[index].name)
}

React.useEffect(() => {
Expand Down Expand Up @@ -256,6 +265,7 @@ export const ForceGraph = ({
.attr("fill", "#000")
.attr("stroke", "#fff")
.attr("stroke-width", "5px")
.attr("text-anchor", "middle")
.attr("x", (d) => d.x)
.attr("y", (d) => d.y)
.text(({ index }) => nodes[index].name)
Expand Down
35 changes: 26 additions & 9 deletions covfee/client/admin/hit_block/hit_block.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as React from "react"
import styled from "styled-components"

import { HitInstanceType } from "../../types/hit"
import { NodeStatus } from "../../types/node"
import { NodeIndexOutlined } from "@ant-design/icons"
import classNames from "classnames"
import { appContext } from "../../app_context"
import { HitInstanceType } from "../../types/hit"
import { NodeStatus, NodeType } from "../../types/node"
import { ForceGraph } from "../force_graph"
import {
JourneyColorStatus,
JourneyColorStatuses,
Expand All @@ -16,13 +18,10 @@ import {
getJourneyStatus,
getNodeStatus,
} from "../utils"
import classNames from "classnames"
import { ForceGraph } from "../force_graph"
import { JourneyRow } from "./journey_buttons"
import { NodeButtons, NodeRow } from "./node_buttons"
import { HoveringButtons } from "./utils"
import type { HoveringButtonsArgs } from "./utils"
import { JourneyRow } from "./journey_buttons"

import { HoveringButtons } from "./utils"
interface Props {
hit: HitInstanceType
}
Expand Down Expand Up @@ -130,7 +129,14 @@ export const HitBlock = (props: Props) => {
</Header>
{!collapsed && (
<div style={{ display: "flex", flexDirection: "row" }}>
<div style={{ display: "flex", alignItems: "center", width: "60%" }}>
<div
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
width: "60%",
}}
>
<NodesList>
<h2>Nodes</h2>

Expand Down Expand Up @@ -177,8 +183,16 @@ export const HitBlock = (props: Props) => {

<ul>
{props.hit.journeys.map((journey, index) => {
let journeyNodes: NodeType[] = []
for (const node_id of journey.nodes) {
journeyNodes.push(
props.hit.nodes.find((node) => node.id === node_id)
)
}

return (
<JourneyRow
journeyNodes={journeyNodes}
key={index}
focus={focusedJourney == index}
onFocus={() => {
Expand Down Expand Up @@ -244,9 +258,12 @@ const JourneyStatusSummary = NodeStatusSummary
const GraphContainer = styled.div`
flex: 1 0 auto;
max-width: 60%;
/* FIXME #CONFLAB: Hiding the GraphContainer because it takes too much space */
visibility: hidden;
width: 0px;
height: 0px;
`
const NodesList = styled.div`
max-width: 50%;
flex: 1 0 auto;
padding: 3px;

Expand Down
Loading