Git Product home page Git Product logo

paperbadger's Introduction

PaperBadger Build Status

Join the chat at https://gitter.im/mozillascience/PaperBadger

Issuing badges to credit authors for their work on academic papers

As the research environment becomes more digital, we want to test how we can use this medium to help bring transparency and credit for individuals in the publication process.

Using Paper Badger

You can display contributorship badges for science on your own site! Researchers earn badges for their specific contributions to an academic paper. A researcher who worked on investigation earns a prestigious investigation badge for that paper.

The PaperBadger widget enables anyone, from publishers to individual researchers, to easily display badges on a website by including just a few lines of script with the relevant doi (digital object identifier) and a designated <div> in your view file. Authors can add the script to their own sites to display badges earned, while publishers can use the script to display all badges associated with a paper:

You can either use paper-badger-widget.js (documentation), which supports old browsers or widget.js (documentation), which is in development and currently only supports evergreen browsers and IE9+.

Current Users

Two journals, GigaScience (BioMed Central) and Journal of Open Research Software (Ubiquity Press) have added the Paper Badger widget to their papers.

JORS example: A Web-based modeling tool for the SEMAT Essence theory of software engineering

Live Example

Contributing

Project Roadmap: #17

Want to help? We love new contributors! Please review our contributing guidelines and take a look at some good first bugs.

Getting Started

Are you ready to contribute to Paper Badger? This section will help you set up your own development version of the Contributorship Badges prototype.

Clone (or Fork) PaperBadger and enter the directory: git clone https://github.com/mozillascience/PaperBadger && cd PaperBadger

For an overview of the architecture of the system and other details, visit the docs section.

Environment variables

If you would like to override the default configuration, create an .env file in your favourite text editor and use default.env as a template (do not delete or modify default.env).

If you would like to develop against the hosted custom badgekit-api we have running specifically for PaperBadger testing, your environment values should look this:

    # default port is 5000
    export PORT=5000
    export SESSION_SECRET=USE_SOMETHING_GOOD_LIKE_puUJjfE6QtUnYryb

    # Badges
    export BADGES_ENDPOINT=http://badgekit-api-test-sciencelab.herokuapp.com/
    export BADGES_KEY=master
    export BADGES_SECRET=#############
    export BADGES_SYSTEM=badgekit

    # ORCID Auth
    export ORCID_AUTH_CLIENT_ID=#############
    export ORCID_AUTH_CLIENT_SECRET=#############
    export ORCID_AUTH_SITE=#############
    export ORCID_AUTH_TOKEN_PATH=#############
    export ORCID_REDIRECT_URI=#############

Ask @acabunoc for ones marked ###########. Our custom BadgeKit API code can be found here. Feel free to change PORT to any available port.

Run using Docker

You can use Docker to bring up a quick instance of the app to develop against. This way you don't need to have node, MongoDB, and redis installed on your host.

  • Make sure you have Docker (>=1.10) and docker-compose (>=1.6) installed.
  • Setup your environment variables as explained in the previous section
  • start the service with docker-compose up
  • visit the running service
    • If on Linux host: http://localhost:5000
    • If not Linux: http://(docker_host_ip):5000 (You can find your docker IP with docker-machine ip default)

This setup will create 3 containers:

  • paperbadger_paperbadger_1 contains the PaperBadger code, mapped to the /src volume
  • paperbadger_mongo_1 is the MongoDB container with a DB called test
  • paperbadger_redis_1 is the redis server

You can connect to the main container by using docker exec -it paperbadger_paperbadger_1 /bin/bash. ctrl+c will stop the three containers.

Run locally

  • Make sure you have at least node version 4.4.5 installed. Installing node through nvm is recommended, so you don't need to use sudo in the next step.
  • Install PaperBadger's Node dependencies: npm install
  • Make sure MongoDB and redis-server are running and locally accessible. You can install these from their official website or use your favorite package manager.
  • Setup your environment variables as explained in a previous section
  • Run npm start, and open up http://localhost:5000/ in your favourite web browser!

API Endpoints


This work is a collaboration with publishers BioMed Central (BMC), Ubiquity Press (UP) and the Public Library of Science (PLoS); the biomedical research foundation, The Wellcome Trust; the software and technology firm Digital Science; the registry of unique researcher identifiers, ORCID; and the Mozilla Science Lab.

paperbadger's People

Contributors

abbycabs avatar aid29 avatar alicoding avatar alicole avatar aperala avatar audy avatar gitter-badger avatar janhohner avatar jinankjain avatar jonocodes avatar josmas avatar rcpeters avatar scottdowne avatar sudheesh001 avatar wjrsimpson 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paperbadger's Issues

Update habitat implementation

Let new contributors get started immediately (remove cp .env.tempate step) -- based on @rcpeters's suggested during our last project call

Assigned to @alicoding since he first integrated habitat in the project

Remove filtering badges

In several places, we fetch a set of badge instances from badgekit-api, then filter the results for the badges we actually want. We should be able to fetch just the ones we're looking for from badgekit-api.

Load data from Amye in database

I got some good data from @akenall @ BMC for a few of their test papers. Will load in so we can play with some real data! (and not just badges assigned to me for everything...)

Roadmap

Roadmap

Contributorship Badges for Science

Issuing badges to credit authors for their work on academic papers.

Using Mozilla's Badgekit-api to implement our badges, we can issue and fetch badges from badgekit via the badgkit-api-client. By authenticating against ORCID, a user can reliably issue badges to a valid ORCID, the standard unique researcher identifier.

Want to jump in?

  • Good first bugs: This is a good place to start if you're new to the project. These issues are all mentored.
  • Design: We need some help designing interfaces and deciding how these badges will look on a paper page / on an ORCID page.
  • Writing code: Ready to write some JavaScript with us? These issues are waiting for you!
  • Discuss: There are still some open ended questions for this prototype. Join in on the discussion.

Short term - what we're working on now ๐ŸŽ‰

  • Testing (#75)
    • Mocha, supertest. Help us make sure we're building things that work! The testing framework has been added. Tests needed.
      • #75 Add tests for API endpoints
  • New JavaScript snippets (#72, #142, #124)
    • Any ideas on how we can better visualize these badges? Our API is ready for use! Use the data we have available in our API to write a JS snippet that visualizes a users / a papers badges. Built using our JSON endpoints, implement the visualizations created in #71. By providing these snippets, a journal (or an author, or ORCID) can just embed the snipped on their website to view badges for this paper/author.
  • Stability / bug fixes (#135, #129, #132)
    • Some smaller tasks we need to make the paper badger widget work better for more users.
  • Add redis to the Docker setup (#155)
    • Redis was added after we set the project up with Docker. Add redis and updates the docs!

Medium term - what we're working on next! ๐Ÿฐ

  • Migrating away from badgekit-api (#159)
    • Since our launch, we've learned that badgekit-api isn't optimized for our use case. Up next is researching and planning our migration.
    • Potential 'Google Summer of Code' Project
  • Implement endpoints for publishers (#160)
    • Right now, publishers need to fill out a web form to issue badges to their papers. Implementing endpoints will make it possible for them to integrate their paper submission system with Paper Badger.
    • Potential 'Google Summer of Code' Project

Longer term items - working on this soon! โฉ

These items are not essiential for an MVP, but are a part of our longer term plans. Feel free to jump in on these if you're interested!

Journal submission system / acceptance system integration

ORCID - push badges back to ORCID API when issued

Implement function on Publisher form submission

Part of #18: Building the badge issuing process
Help wanted: Development

Some back-end work needed to implement badge issuing. This happens on form submission (#22):

  • [Dev] Generate unique link for authors. Should contain DOI info.
  • [Dev] Email authors with the link

Add encrypted environment variables to .travis.yml

[Edit from @acabunoc]

Add encrypted variables to .travis.yml
File to edit: https://github.com/mozillascience/PaperBadger/blob/master/.travis.yml
Instructions: http://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables
Mentor: @acabunoc

----- original issue -----
We notice some TravisCI build don't setup the environment variables before running the tests. That make the tests failed. Looks like this happen only for the builds running on PR.
The failed builds example:
https://travis-ci.org/mozillascience/PaperBadger/builds/70191487
Same code passed example:
https://travis-ci.org/mozillascience/PaperBadger/builds/70419390

It will be good to understand the reason why Travis CI running the tests differently.

Proposed workflow

We're currently testing this proposed workflow for the Contributorship Badges project:

  1. Once an article is published, the publisher notifies the badging system and authors.
  2. Authors will fill out their roles based on the contributor taxonomy.
  3. Badges, crediting authors for the work they contributed, will appear next to the authors names and link to their ORCID page.
  4. The ORCID page will display all badges earned by that particular author.

We would love to hear your feedback below! We want to make sure this process is positive and beneficial at each step. We will be continually refining this workflow and experience as we go through the prototyping process.

Integration with ORCID production server

For our MVP, we'd like to test this out with real users and their real ORCIDs. Work with the ORCID group to use production data.

---- original issue ----
When I log in to ORCID via https://sandbox.orcid.org/oauth/signin, I get a different ORCID then when I log into the main site.

sandbox:
0000-0002-4134-9255

main site:
0000-0003-4959-3049

Not sure if this is specific to me, or if we need to update something to use users current ORCIDs to issue badges. @rcpeters & @wjrsimpson any ideas?

Build interface for the Authors

Part of #18: Building the badge issuing process
Help wanted: Design, Development

Following #23, where authors are sent a unique link (currently http://paperbadger.herokuapp.com/issue), this link should be associated with a DOI (& email address?). Once authenticated, the unique link will lead to a form that allows authors to select their roles on a paper. This will trigger issuing the badges. Authors can only issue badges to their own ORCID for papers that Publishers have confirmed they authored.

When an author visits the link (http://paperbadger.herokuapp.com/issue):

  • If they're not logged in, log in via ORCID auth to get ORCID
  • Display a list of roles authors can select

When the form is submitted:

  • A badge is issued to the authors' ORCID for each role they've selected

To do:

  • [Dev] link redirects to ORCID auth if not logged in
  • [Dev] prefill user' ORCID
  • [Dev] prefill DOI from unique link
  • [Dev] on submit, one badge is issued to the author's ORCID for a role they've selected
  • [Dev] allow for multiple badges to be selected and issued
  • [Design] Allow user to easily select multiple badges. Add badge descriptions somewhere.
  • [Dev] Build new design
  • Launch

Build the badge Issuing process

Help wanted: Design, Development, Input
We're testing out a way to issue badges! In this first prototype we will:

  1. The Publisher will manually fill out a form for each paper they're testing badges on
    • form will include: DOI, author emails, author ORCIDs (optional)
  2. This will trigger an email to each author with a custom link
  3. The custom link will take them to our site and prompt ORCID login
    • The login process will create an ORCID for the author if they do not have one already
  4. The custom link brings the author to a form where they can select all roles they contributed for this paper
  5. Badges are assigned to that author -- one for each role
    • each badge instance will have: ORCID, DOI & badge (role)
Build interface for the publisher (#22)

In the first prototype, Journals will manually enter in the DOI & Author emails in a form.

Implement function on Publisher form submission (#23)
  • Generate unique link for authors
  • Email authors with the link
Build interface for the Authors (#24)

The unique link will lead to a form that allows authors to select their roles on a paper (after login via ORCID). This will trigger issuing the badges. Authors can only issue badges to their own ORCID for papers that Publishers have confirmed they authored.

Checklist:

  • [Input, Design, Dev] #22 Build interface for the publisher
  • [Design] design the email that goes out to authors
  • [Dev] #23 Implement function on Publisher form submission
  • [Design, Dev] #24 Build interface for the Authors

Want to help us? Add your info here.

We're looking for publishers, researchers, developers and institutions to help us test ways to give credit to authors on scholarly papers. Add your info here!

Let us know if you'd like to help in a specific way.

You can see the project roadmap here: #17

ORCID login issue

Occasionally, after already logging in (but then waiting awhile), I get sent here
https://orcid.org/oauth/authorize/oauth/authorize?redirect_uri=ht...

Not sure why the double /oauth/authorize, or which end this is on. Login works properly the first time.

to reproduce

  • go to /issue
  • Log in via ORCID
  • Wait a few minutes (but not too long, after a long time it will work again) for the session to clear
  • refresh /issue that requires log in
  • get sent to strange url above

Designing Badges

We currently have some assets from @akenall
help wanted: Designer, Input


Summary from @vazquez

Background

  • A scholar can earn a badge by writing a paper where they contribute a specific element portrayed in Badges. So, for example, if a scholar contributes data visualization work to a paper, they will earn the prestigious Data Visualization Badge.

Probem

  • Right now, the badges are far too big to accommodate to the layout of the article. A more simplified badge aesthetic is needed (similar to what @akenall showed).

Requirements

  • When visiting a paper such as this one, the Abstract needs to show the badge.
  • When visiting the author's ORCID page, the Badges need to show next to the papers published.

screen shot 2015-07-13 at 14 45 06

But we need to design badges that:

  • can be displayed scaled down
  • can be seen in different 'views'
    • all authors and their corresponding badges for a paper
    • all papers and corresponding badges for an author

Discussion / inspiration:

@akenall has started some discussion on updating the design to be simpler like the stack overflow badges
image003

Add any comments here! Looking for a contributor who wants to own this design (you don't need to be an actual designer!) -- we're looking to implement these visualizations by the August project call.

Build interface for the publisher

Part of #18: Building the badge issuing process
Help wanted: Designers, Developers, Input

Our first prototype won't attempt to integration with the Publishers submission system. Instead, Publishers will manually enter article info in a form. The functionality of the form is handled in #23.

They should be able to input:

  1. DOI of the paper
  2. Author emails
  3. Author ORCIDs (optional)

To Do:

  • [Input] Decide how to authenticate publishers. Is this required for MVP?
  • [Dev] Implement publisher authentication (if needed)
  • [Design] Design form. Inputs: paper DOI, author emails
  • [Dev] Build form
  • Submission function handled in #23
  • Launch!

Questions:

  • Should pubilshers log in before they can access this form in our MVP? How will we know they are publishers?

Add author name to badgeinstances

We currently only store the ORCID for each author. During the issuing process, we can add the Author Name.

This will let the JS snippets display author names (not just ORCID).

  • Stores names when we create badge instance
  • Go through current data and add author names

AJAX replacement method for .get AJAX jquery functions.

Proposing to replace jquery function, with a general purpose vanilla Javascript method that works on latest browser versions, including IE 9. Currently due to AJAX CORS restrictions, widget not able to work on IE9. This change will fix that as well as removing Jquery dependency. Leaving only one more dependency to remove.

Build badgeKit API client

Extract the codes using the badgeKit API to a separated client class, make easy to test this client against real api server or a fake one.

Milap Bhojak: new volunteer via Mozilla Science Lab Collaborate

I also think the same way like As the research environment becomes more digital, we want to test how we can use this medium to help bring transparency and credit for individuals in the publication process.

Well, I can design product, UX, I'm writing code since 5 years so I can code. As I have 3 years of experience in open source community management, I can manage and become community growth hacker too :)

looking forward to contribute in this project.


This issue was created by @milapbhojak via Mozilla Science Lab Collaborate

Creating JavaScript snippets

Help wanted: developers

Our API is ready for use! Use the data we have available in our API to write a JS snippet that visualizes a users / a papers badges. Built using our JSON endpoints, implement the visualizations created in #71 (if finished). By providing these snippets, a journal (or an author, or ORCID) can just embed the snipped on their website to view badges for this paper/author.

We'll need two sets of snippets for our MVP

  1. Paper view:
    To be embedded on a publisher's site, on a paper page. This will display all the authors and their corresponding badges.
    Using the endpoint: GET /papers/:doi1/:doi2/badges
  2. User view:
    To be embedded on ORCID, or on an author's personal page. This will display all the papers for this author and their corresponding badges.
    Using the endpoint: GET /users/:orcid/badges

To Do:

  • get design assets from #71
  • implement paper view that integrates with BMC and PLoS (our partners)
  • send snippet to publishers, BMC and PLoS
  • implement author view that can integrate with ORCID or an author's personal page

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.