Code Monkey home page Code Monkey logo

unshred-tag's Introduction

unshred-tag

Build Status Coverage Status

Flask/Mongo app to manually tag shreds. Experimental, volatile, unstable. No english translation yet, sorry.

This is companion for my unshred experiments. Allows to load results to mongo and then process and tag them manually. Still in very early stages. Utilizes flask/mongo/heroku/s3.

You've been warned

Collaboration

If you want to help with development or documentation – we have a bunch of useful links for you to start

Tests

UI tests can be found here. Thanks to @bv

unshred-tag's People

Contributors

dchaplinsky avatar excieve avatar g1itch avatar mastak avatar onary avatar parabolala avatar z4y4ts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unshred-tag's Issues

Page for non-logged users/restricted access to WS

We need to move "logged in" logic outside of template so app will have a main page for non-logged users with some inside and only after login other page will be available (on the different url). If logged user is trying to access home page he should be redirected straight to workplace.

We also need to forbid an access to next/skip/etc WS for non-logged users.

Inconsistent tags storage in DB

Sometimes tags are stored in lowercase, e.g. app.py:

    tags = set(map(unicode.lower, request.form.getlist("tags")))
  ...
    Shreds.objects(...).update_one(
        push__tags=..... tags=list(tags),
    User.objects(.....).update_one(
  ...
        add_to_set__tags=list(tags)

And then, few lines below it's capitalized:

    for tag in tags:
        Tags.objects(pk=tag.capitalize()).update_one(

There's probably some other convention for transferring tags over HTTP and displying on the page.

There should be a consistent convention, e.g. tag db entries have separate:

  • some id, either text or just numeric which is used throughout the db and over HTTP
  • label, which is only used for display.

Update next/skip views to allow multiple users to work in parallel

Basically we want to each user to work independently so all shreds will be processed with some redundancy (for example 1 shred should be processed at least by two users).

We also want to track progress per user and make sure that user A cannot see results of user B.
Tags suggestions however should be common.

New layout

Go away from central column layout.
Hide technical information on the right. Show it only by click or mouse hover.
Put tags input instead of technical information.
Put recognizable text (#21) input under tags input.
Put list of base tags (#25) next to inputs.
Make Instructions link more visible.

Store/display user stats on page

Amount of processed shreds during current session, amount of all shreds processed by user since creation of the account. Position in global rating.

Fixes to tags suggestions box

Allow user to add new tag that consists of substring of existing tag.
Right now if we have base tag “Foobar” it's not possible to create new tag “bar”, because by hitting Enter it'll add Foobar to the list of tags.

Ability to Skip shred

Use should be able to skip the shred she is presented. For instance, with the following screenshot one is stumbled:

First shred

This is especially true for new user, when the only tag to be assigned to a shred is already typed in, and the only action that is possible is to "Save", but the user hadn't done any change, thus is afraid not to break something. Usually the first time users are lurkers, and would like to browse through shreds, trying to find one that can have her attention.

We should display a service page after registration.

As long as we don't want users to start working without reading help we should display them a service page with some text + the same help as we have in lightbox and a big button “I got it, ready to work” below the text.

Magnifying glass for shred

Display 2x copy of the part of the image under the mouse so user can make a closer inspection of the shred.

Create shreds/clusters browsing UI

This might a part of the admin UI. What we need is a tool to assist tags analysis.
The first use-case would be answering the queries: show me the clusters having tags X AND/OR Y (ideally any combination of parentheses, conjunctions, disjunctions).

Updates to tags model

Tags model should also have a flag which says if it's base tag (chosen by admin or approved by admin) and category field (so we can group tags by categories like background, text, etc).

Stats page: users

We need a page where admin will be able to check per user stats. Just for now this page will be accessible to anyone, and when #6 will be landed we will protect an access to that page.

For now page should display very basic stats: amount of processed/skipped items, amount of tags used, avg tag/shred ratio, last login.

No pagination for now.

Bonus: sorting by last login time, some indication of activity (to easily spot champions)

Stats page: tags

Similar to #7. Also admin only.

Very basic stuff for now: tag name, number of usages, number of shreds tagged with it (so for example if two users used the same tag for shred number 1, first value will be 2, second one will be 1).

Ideally: also examples of shreds tagged with each tag. 5-10 (ruled by setting).

Provide at least basic test coverage for http handlers

Without any tests the code seems too fragile and dangerous for any major refactoring.

It would be nice to have at least the basic sanity tests that verify all the existing HTTP handlers (GET/POST) work as expected.

Another task would be lower-level unittests which are probably out of scope for current issue.

Move non-HTTP code out of app.py

Currently app.py looks like a pile of functions. There's a number of helper functions, which clobber the code.
It would make sense to move most of the functions that are not flask http handlers to more suitable modules. e.g. most of the get_*() functions would make more sense as corresponding model's (e.g. Tag) methods.

Track time spent on tagging

Each time user tags something also track interval between rendering of task and storing of the tags.

Separated mongo collection, should include current time, time difference in seconds or msec, user _id and shred _id.

So we can have a metric to measure time required to process single shred and see how that correlates with UI changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.