Name: ember-osf-preprints
Owner: Center for Open Science
Description: OSF Preprints: The open preprint repository network
Created: 2016-07-20 14:56:36.0
Updated: 2018-04-27 13:50:18.0
Pushed: 2018-05-24 12:30:27.0
Homepage: https://osf.io/preprints/
Size: 20126
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is the codebase for OSF preprints. This guide will help you get started if you're interested.
You will need the following things properly installed on your computer.
git clone
this repositorygit clone --recursive
instead (assuming you are using git >= 1.6.5).yarn install --frozen-lockfile
bower install
If you will be using local preprint provider assets (rather than the CDN):
git submodule update --init --recursive
git submodule update
npm run update-assets
npm run updates-assets-hotfix
For local development, this is designed to run alongside (and from within) the flask application for osf.io.
ember serve
website/settings/local.py
file. Uncomment '/preprints/': 'http://localhost:4200',
and restart your flask app.sudo ./scripts/add-domains.js
. This will add the domains to your /etc/hosts
. Use --dry
for a dry run.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.
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.
python -m scripts.populate_preprint_providers
python -m scripts.update_taxonomies
create_fakes
script:python -m scripts.create_fakes -u user@email.io --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.
Make use of the many generators for code, try ember help generate
for more details
You can run tests either with ember installed on your machine or by using Docker
ember test
ember test --server
docker build --tag preprints .
docker run preprints
ember build
(development)ember build --environment production
(production)