Skip to content

kznmft/curate_science

 
 

Repository files navigation

Curate Science

Build Status

Science Deliciously User-Friendly.

Code base of Curate Science, an author page web app to make scientific papers deliciously user-friendly to consume and universally accessible (think Google Scholar substantially enhanced in several unique ways; see our release 0.4.0 video for a demo of new features). The app is part of a broader integrated curation system to ensure that research is transparent and credible. For more details, see our meta-scientific theoretical framework that guides the implementation of our integrated system. See also our current funding requesting document, which outlines our 5-year roadmap.

alt text

 

Contributing

Bug Bounty Program (Fix an issue, earn cash!)

Current value: USD$500 (March 2020). Total current escrow $1,000. (more coming soon.)

To identify talent to expand our team, we’re running a monthly bug bounty program. Current top-priority issues are worth a specific # of points to fix (see issues under "Improved demoability" milestone). Earn cash proportional to the points earned, shared among contributing programmers (at the end of the month). To incentivize both individual and communal productivity, a larger proportion of monthly escrow is unlocked for larger total points collectively earned by the team. For example, if dev#1 earns 270 points, and dev#2 earns 750 points, the total >1,000 points collectively earned unlocks a larger chunk of the total monthly escrow amount available (the maximum amount is unlocked if all issues are fixed).

Application Structure

Curate Science is a web application written in Python 3 using the Django framework 2.1. with PostgreSQL 9.6, running on Google App Engine Standard Environment. The master branch is continuously deployed to production with Travis CI. The application features a REST API for interacting with the curated data programmatically.

  • Entity models are in curate/models.py (current entity-relationship diagram (v0.3.0) (entities to-be-added in blue))
  • REST API view controllers use Django REST Framework and are in views/api.py
  • REST API model serializers are in curate/serializers.py
  • HTML view controllers are in curate/views.py
  • HTML templates use the Django template engine and are in templates/
  • URL routes are in curate_science/urls.py
  • JS, CSS, and image files go in static/curate/
  • Application configurations are in curate_science/settings.py

Useful Documentation

Back-end

Front-end

Setup

To set up the app locally:

  1. Clone this repository
  2. Install Python >= 3.6
  3. Install PostgreSQL >= 9.4 (command may be sql or psql depending on install method)
  4. Create a .env file and set the environment variables DB_USER, DB_PASS, and SECRET_KEY
  5. Create a superuser to access Django admin: python manage.py createsuperuser and follow prompts
CREATE DATABASE curate;
CREATE USER [DB_USER] WITH PASSWORD '[DB_PASS]';
GRANT ALL PRIVILEGES ON DATABASE curate TO [DB_USER];
ALTER USER [DB_USER] CREATEDB;
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver_plus

Running Tests

python manage.py test

Starting Local Server for Development

Ensure Postgres is running.

python manage.py runserver_plus
# In a new terminal (to compile JS bundle(s) and HTML)
yarn start

App should be running at localhost:8000. Django admin should be available at localhost:8000/admin.

DB migration instructions:

For staging: export GOOGLE_CLOUD_PROJECT=curate-science-staging-2

(For more realistic testing of performance, user-friendliness, and general feel/esthetic, please contact us at admin@curatescience.org to be granted access to our production DB backup bucket, which you can import into your local environment.)

For production: export GOOGLE_CLOUD_PROJECT=curate

Then run python manage.py migrate

Then don’t forget to reset the env var: export GOOGLE_CLOUD_PROJECT=

(DB_NAME is set conditionally, based on the value of GOOGLE_CLOUD_PROJECT, here)

(for a more detailed set of instructions on how to setup a local instance of the app, see here)

License

Curate Science source code is licensed under an open-source MIT license for all personal, educational, research, and other open source applications. A commercial license is required for all commercial applications. Please contact admin@curatescience.org for more information about our commercial license.

Core Regression Tests

  1. Core functionality
    1. Create a new article, add information to all fields, including uploading multiple figures simultaneously via drag-and-drop
    2. Save a new article
      • All fields can successfully save information
      • Canceling unsaved information prompts warning dialog
    3. Edit an article
      • All fields can successfully be edited, including deleting a key figure (admin only)
    4. Delete an article (admin only)
    5. Link an existing article to an author page (e.g., https://curate-science-staging-2.appspot.com/app/author/etienne-p-lebel)
    6. Link that same article to a (different) co-author's page (admin only)
    7. Ensure article page works (e.g., https://curate-science-staging-2.appspot.com/app/article/57)
    8. Ensure search/search results page works (e.g., https://curate-science-staging-2.appspot.com/app/search/?q=disgust)
    9. Ensure Browse/recent page works: https://curate-science-staging-2.appspot.com/app/recent
      • Ensure filtering and sorting works (e.g., show only "Replication" articles)
    10. Create a new author page (admin only)
    11. Invite/create a new user (admin only)
  2. Full-screen mode functionality (e.g., author page with lots of embedabble full-screen PDF/HTML articles: https://curate-science-staging-2.appspot.com/app/author/etienne-p-lebel)
    1. PDF: Ensure a supported embeddable full-text PDF article activates full-screen icon AND is displayed in right-panel embed viewer (e.g., https://etiennelebel.com/documents/lebeletal(2018,ampss)a-unified-framework-to-quantify-the-credibility-of-scientific-findings.pdf)
    2. HTML: Ensure a supported embeddable full-text HTML article activates full-screen icon AND is displayed in right-panel embed viewer (e.g., https://www.frontiersin.org/articles/10.3389/fpsyg.2017.01004/full)
  3. Author page publication list external embedding

About

Science deliciously user-friendly.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 52.8%
  • JavaScript 26.8%
  • CSS 15.3%
  • Python 5.0%
  • Other 0.1%