Git Product home page Git Product logo

collections-service's Introduction

alt text Collections

Join the chat at https://gitter.im/cos-labs/collections

Collections is a prototype project at the Center for Open Science. This project is experimental, scope, technologies, code and functionality may change. This app has two main parts. The service stores data about the collection, and the client lets users interact with their collections.

Prerequisites

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

Installation

Get the code:

$ git clone [email protected]:cos-labs/collections-service.git
$ cd collections-service

Install Dependencies:

Setting up a virtual environment for Python 3 is recommended.

$ pyenv virtualenv 3.6.0 osf-collections
$ pip install -r requirements.txt

Running

Start Postgres:

Using a package manager like brew is recommended.

$ brew services postgres start
$ cd {collections}/
$ ./manage.py makemigrations
$ ./manage.py migrate

Run the service

$ python manage.py runserver

Visit the api at http://localhost:8000/api/ or admin panel at http://localhost:8000/admin/.

Run the client

Follow the set-up instructions in the README for https://github.com/cos-labs/collections.

Visit your app at http://localhost:4200.

Configuration

Set up the backend to use either staging or prod. Do this in the sessions for both the client and the service. export BACKEND=prod or export BACKEND=stage

Create a developer app at https://staging.osf.io/settings/applications/ with the following settings:

Create a django super user:

$ python manage.py createsuperuser

Create a new Site with domain name: http://localhost:8000/ in the django admin panel:

  • Note: The site id must match the SITE_ID variable defined in SITE_ID should be set to the site id in collections-service/service/settings/local.py
  • The SITE_ID can be found in the URL
  • You may have to define SITE_ID in the local.py file

Create a SocialApplication in the django admin panel:

  • Set provider to "Open Science Framework"
  • Set the client id and secret key to the ones defined in your developer app
  • Select http://localhost:8000/ as the site

Build the search index

  • python manage.py rebuild_index
  • This needs to be done on first run / population and then on a semi-regular basis when running the API to index new content from the API.

Populating the database

  • Before moving forward, make sure you've logged into the test server using your OSF staging credentials.
  • To populate the database with users, meetings, collections, and items, run $ python populate.py from the project root.

Running Tests

  • python manage.py test

collections-service's People

Contributors

nyanhelsing avatar samanehsan avatar cameronblandford avatar

Watchers

James Cloos avatar  avatar

Forkers

shadowgamefly

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.