Giter VIP home page Giter VIP logo

textthresher's Introduction

TextThresher

An annotation interface for detailed text annotation by crowdworkers along researcher-defined topics of interest. Under development for the Deciding Force Project. Currently, this app only runs locally.

Built with React and Redux.

To setup

The backend is supported by Docker. If you do not have it already, you will need to install it.

Once installed, start the Docker application (if on a Mac), then go to the project directory and run:

  1. docker-compose build
  2. docker-compose up -d
  3. ./init_docker.sh
  4. npm install
  5. bower install
  6. npm run dev

You will only need to run the above commands once. Those will do the preliminary setup for the application by installing the dependencies and seeding the Docker containers to setup the database.

Use docker-compose stop to stop the containers or docker-compose down to both stop and remove the containers.

To develop

You will have to refresh your containers depending on the types of changes that happen as you develop, or when you switch to another git branch.

If you are NOT CERTAIN what has changed in the current commit since the last time the containers were initialized and started, the most prudent course is to perform ALL of the following steps. If you want to take a shortcut, use the following table as a guide. But you should probably perform ALL the steps and then test your work before submitting a pull request.

To refresh your containers, first stop and remove them with:

  1. docker-compose down
Step Command Restart at this step when:
2. docker-compose build requirements.txt changes
3. docker-compose up -d sample data changes
4. ./init_docker.sh
5. npm install package.json changes
6. bower install bower.json changes
7. npm run dev webpack changes

To view a browsable interface for the queries, navigate to localhost:5000/api/.

For easier front-end development, we recommend React Dev Tools and the Redux Dev Tools. Other install options for Redux DevTools are discussed in Redux DevTools Extension README.

Mac Note: If you encounter an error that the module text-highlighter/src/TextHighlighter cannot be found, you will need to update brew by running brew update.

To deploy

In the project dictory, run docker-compose start and npm run deploy. The output files will be written to the dist folder.

NOTE: this command currently currently not fully functional and needs to be upgraded. Running npm run dev instead will show the most recent version of the code.

To deploy the backend to Heroku:

  • push the code to Heroku git push heroku

  • Reset the db with heroku pg:reset postgres --confirm text-thresher

  • Prepare the database. You have two options.

  • To initialize the database but not load data, run heroku run python manage.py syncdb

  • To initialize the database with a copy of your local data, verify that your local postgres database has data and works when you run the app locally, then run heroku pg:push LOCAL_DB_NAME postgres

  • Visit the application to make sure it worked.

textthresher's People

Contributors

arjunmehta94 avatar btburton42 avatar fadyshoukry avatar floraxue avatar jasminedeng avatar mngyuan avatar nickbadams avatar normangilmore avatar p-patil avatar stefanv avatar stevenelleman avatar thisisdhaas avatar vivi avatar youdongz avatar

Watchers

 avatar  avatar

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.