GithubHelp home page GithubHelp logo

mrgambal / vulyk Goto Github PK

View Code? Open in Web Editor NEW
34.0 6.0 6.0 937 KB

Flask/Mongo application to provide intuitive web-interface for tasks distribution

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.37% Python 92.91% JavaScript 0.99% CSS 2.08% HTML 3.59% Procfile 0.06%
collaboration flask crowdsourcing python python3

vulyk's People

Contributors

axsapronov avatar dchaplinsky avatar dependabot[bot] avatar hotsyk avatar mrgambal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

vulyk's Issues

We need "default" group

We need "default" group which is always available and assigned to all newly created users.

Groups managing with CLI is a pain now, and 80% of use-cases will be “just allow users to do some work”. Having default group will simplify that to one command: manage.py group addtype ...

Propose (and implement) a way to manage assets.

Each plugin might have optional JS and CSS assets that it should expose to the framework

We have webassets/Flask-webassets on board already to work with merges that belongs to the framework (check assets.py for details).

On plugin pages we want to include both types of merges, those from framework and those from current plugin (so plugin might talk to frameworks methods defined in Vulyk object).

Please investigate if we can use webassets to manage plugin's assets as well. Take into account, that at least CSS assets for plugin aren't mandatory.

Please reflect that in documentation.

Concept of batches.

We need to migrate concept of batches from unshred.it.

Idea here is following: Tasks are imported in batches. Tasks in the feed for the user is also ordered by batch, so user will receive all tasks from batch that comes first before next batch will be started.

This is a requirement because we don't want our results to be spread across 20000 of declarations with average of 0.5 response for each declaration. We want first 200 declarations (say, from ministry of ecology) to be done first with 3 responses per decl.

Scaffolding scripts

We need a simple script that will be installed alongside with package and can create an empty project with file structure like that:
Procfile
app.py
local_settings.py
----probably (optionally?)---
heroku related stuff.
uwsgi related stuff.
.hgignore
.gitignore
plugins/demo_plugin.py

It should be described in docs as well.

Basically we need super simple analog of django-admin.py or scrapy.py so newcomers can easily start playing with the system.

Building wheels for collected packages: rjsmin ERROR

I am trying to install and run. I get an error executing this installation command:

pip install -e ../vulyk-declaration

I am running Ubuntu on WSL2 Windows 10

Description: Ubuntu 20.04.1 LTS
Release: 20.04

Building wheels for collected packages: rjsmin
Building wheel for rjsmin (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /mnt/c/Projects/sandbox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e315onj0/rjsmin/setup.py'"'"'; file='"'"'/tmp/pip-install-e315onj0/rjsmin/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-cxcv1bo0
cwd: /tmp/pip-install-e315onj0/rjsmin/
Complete output (12 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
copying ./rjsmin.py -> build/lib.linux-x86_64-3.8
running build_ext
building '_rjsmin' extension
creating build/temp.linux-x86_64-3.8
gcc -pthread -B /home/dandrade/anacondawsl/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DEXT_MODULE=_rjsmin -UEXT_PACKAGE -I_setup/include -I/mnt/c/Projects/sandbox/venv/include -I/home/dandrade/anacondawsl/include/python3.8 -c rjsmin.c -o build/temp.linux-x86_64-3.8/rjsmin.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for rjsmin
Running setup.py clean for rjsmin
Failed to build rjsmin
Installing collected packages: rjsmin, translitua, wheel, unicodecsv, XlsxWriter, vulyk-declaration
Attempting uninstall: rjsmin
Found existing installation: rjsmin 1.1.0
Uninstalling rjsmin-1.1.0:

[enhance] Custom currencies

Environment:

https://vulyk.herokuapp.com, any browser

Steps to reproduce:

  • Authorize via Facebook
  • Load any declaration
  • Scroll to the bottom, Розмір доходу в іноземній валюті

Actual result:

Iнший тип валюти is either enabled or disabled but visible at all times

Expected result:

Only show it when a Інша option is previously selected

[minor] White link color for declaration download

Environment:

https://vulyk.herokuapp.com, any browser

Steps to reproduce:

  • Authorize via Facebook
  • Load first declaration
  • Click on the PDF link

Actual result:

In some states the link color will change to #fff and it will be invisible on the #fff background, which is slightly confusing.

Expected result:

Do not change the typical browser-based link coloring behavior

Requirements from github won't work

we have 2 plugins requirements in requrements.txt

-e git+https://github.com/hotsyk/vulyk-declaration.git@master#egg=vulyk_declaration
-e git+https://github.com/hotsyk/vulyk-tagging.git@master#egg=vulyk_tagging

At first sight but when I try to dry run setup.py develop I get something like:

Processing dependencies for vulyk==0.1.0
Searching for vulyk-declaration
Reading https://pypi.python.org/simple/vulyk-declaration/
Couldn't find index page for 'vulyk-declaration' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for vulyk-declaration
error: Could not find suitable distribution for Requirement.parse('vulyk-declaration')

I found the reason: some say that pip runs setuptools, which calls http://nullege.com/codes/search/setuptools.package_index.safe_name so I want you to just rename your plugin-repos (it's safe now) and fix existing links.

In case if you have better solution - you're always welcome.

Confirmation on form submit

Not particularly a problem but user should get some confirmation that their action was successful (a notification or a redirect to a page).

Propose a structure for a plugin.

Please define both, a structure of plugin directory (including optional assets) and min/max set of classes that user must/may define to write his own plugin and methods of those classes as well (check for those that marked as NotImplemented in abstract classes).

Reflect that in docs.

Simple progress stats

We need to display user's progress (amount of tasks of this type done by him since reg, since beginning of the session, his position in rating for this task) somewhere in the footer. Ideally we'll need a scoreboard as well.

Add batch support to results export

We can export only whole amount of reports related to certain tasks type, but would be great to have an ability to diversify this process and break it down to batches.

Proper position calculation in ratings

Right now ties are broken randomly, instead we want to have places in rating to be allocated in this way:
if two users has same amount of reported answers, they'll share the place.

Add some more stats to existing ones.

In addition to current place and the number of tasks done we want to show the number of tasks that are left. It's a bit complicated, as we have batches, skipped tasks and concurrency.

Some good ideas needed.

Add support for extra metadata for plugins

Right now plugin only has a system name and help text.

We need also human readable name, logo (will require changes to static files scheme from #23) and short description. Logo and short description should be optional.

Reports get static timestamp

Timestamp for Report.createdAt is statically calculated at the application start and doesn't update in future.
We need to move it out from default-parameter to the place where reports are being created.

Enable python3 on readTheDocs for the project

Please check and enable python 3 as the runner for documentation builds here on RTD.
The project is targeted only for python 3.4+, however its documentation is still being built using

python2.7 -mvirtualenv --no-site-packages --no-download /home/docs/checkouts/readthedocs.org/user_builds/vulyk/envs/latest

which causes:

  File "/home/docs/checkouts/readthedocs.org/user_builds/vulyk/checkouts/latest/vulyk/models/task_types.py", line 174
    yield from map(lambda a: a.as_dict(),
             ^
SyntaxError: invalid syntax

and lacunas in the final documentation.

Documentation

Current version of docs is definitely as old as mammoths 💩 , and doesn't reflect any aspect of the application at the moment.
We must update it due to need to easily get newcomers involved into the workflow.

Add CLI command to display list of batches for the given task type

This should display nice table, sorted by batch name.

For each batch it'd be nice to have a number of closed tasks, % of completion (total number of answers is counted as number of tasks in batch times redundancy setting). Each completed task is counted as redundancy number of answers (so we won't have problems with tasks that has more answers than redundancy or tasks that was closed because of inner logic of plugin before reaching redundancy).

Breakdown by number of completed tasks would be also nice!

Serving static files for plugins

I think here we need to cover two cases:

  • When static is served through flask app. To make it work we'll need to wrap our plugins into _PackageBoundObject, and expose their send_static_file in urls config just like flask itself does for blueprints. An alternative here is just to update urls config without wrapping.
  • When static is collected during deploy with extension like Flask-Collect. Files collected this way will be physically placed into given static folder and can be served with nginx directly (and this will save some CPU and provide better caching etc). I'm not sure if Flask-Collect plays well with Flask-Assets, but if we are going to cover that case too, we will need to create customer Flask Collect storage (https://github.com/klen/Flask-Collect/tree/develop/flask_collect/storage) that will look not only into flask app and it's blueprints but also into plugins.

Third way is to refactor plugins to be a proper blueprints but I'm not sure I have enough courage to do that now.

I'll play with no. 1 now.

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.