Giter Site home page Giter Site logo

aaxelb / ember-osf-preprints Goto Github PK

View Code? Open in Web Editor NEW

This project forked from centerforopenscience/ember-osf-preprints

0.0 2.0 0.0 20.26 MB

This is the codebase for OSF Preprints, the open preprint repository network

Home Page: https://osf.io/preprints/

License: Apache License 2.0

JavaScript 71.19% HTML 20.86% CSS 7.56% Dockerfile 0.40%

ember-osf-preprints's Introduction

ember-preprints

master Build Status: Build Status

develop Build Status: Build Status

Coverage Status

This is the codebase for OSF preprints. This guide will help you get started if you're interested.

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone this repository
    • To pull in local preprint provider assets as well, use git clone --recursive instead (assuming you are using git >= 1.6.5).
  • yarn install --pure-lockfile
  • bower install

Preprint Provider Assets

If you will be using local preprint provider assets (rather than the CDN):

  1. If you did not clone the repository using --recursive, run: git submodule update --init --recursive
  2. Set the PROVIDER_ASSETS_URL environment variable to 'local'

Updating Assets

  • To refresh your local assets, run: git submodule update
  • To update the assets submodule to the latest assets, run: npm run update-assets
  • To update to the latest assets and create a hotfix, run: npm run updates-assets-hotfix

Running / Development

For local development, this is designed to run alongside (and from within) the flask application for osf.io.

  1. Check out this OSF feature branch: https://github.com/CenterForOpenScience/osf.io/tree/feature/ember-preprints
  2. Start your Ember server: ember serve
  3. Copy these lines to your website/settings/local.py file. Uncomment '/preprints/': 'http://localhost:4200', and restart your flask app.
  4. Visit your app at http://localhost:5000/preprints/

Provider Domains

  1. Start the API server
  2. Run sudo ./scripts/add-domains.js. This will add the domains to your /etc/hosts. Use --dry for a dry run.
  3. Visit your app at one of the provider domains with https://local.<domain>:4200 (e.g. http://local.socarxiv.org:4200)

If you encounter problems, make sure that your version of ember-osf is up to date. If login fails, try logging in from any other OSF page, then returning to the preprints app.

Generating test data on the OSF

There are a few scripts to run to populate your local preprint providers list, and help generate some "fake" preprints locally so you can begin testing using the OSF API.

  • Populate the OSF's PrerpintProvider model with data:

python -m scripts.populate_preprint_providers

  • Populate the OSF's Subject model with data:

python -m scripts.update_taxonomies

  • Create "fake" preprints using some additional arguments to the create_fakes script:

python -m scripts.create_fakes -u [email protected] --nprojects 2 --preprint True --preprintprovider osf,psyarxiv

notes: You can enter as many providers as you like, seperated by commas. Also, this script does not currently create actual fake files, only fake file metadata; the file itself won't render in a preprint view, but you can still request its information from the API.

Code Generators

Make use of the many generators for code, try ember help generate for more details

Running Tests

You can run tests either with ember installed on your machine or by using Docker

On your local machine

  • ember test
  • ember test --server

With Docker

  • docker build --tag preprints .
  • docker run preprints

Building

  • ember build (development)
  • ember build --environment production (production)

Further Reading / Useful Links

ember-osf-preprints's People

Contributors

aaxelb avatar abought avatar binoculars avatar bnosek avatar brianjgeiger avatar caneruguz avatar caseyrollins avatar chrisseto avatar drdub avatar el1t avatar ember-tomster avatar erinspace avatar fabmiz avatar hmoco avatar icereval avatar jamescdavis avatar laurenbarker avatar laurenrevere avatar mattclark avatar mfraezz avatar ml3ha avatar pattisdr avatar sheriefvt avatar sloria avatar terroni avatar zachjanicki 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.