Giter Site home page Giter Site logo

push-to-share's Introduction

push-to-share

Application to push metadata from a spreadsheet into SHARE -- a free, open dataset of research (meta)data.

Setup

Clone the push-to-share repository to your computer.

It is useful to set up a virtual environment to ensure python3 is your designated version of python and make the python requirements specific to this project.

mkvirtualenv share -p `which python3`
workon share

Once in the share virtual environment, install the necessary requirements.

pip install -r requirements.txt

Copy cp sharepush/settings/source-dist.py to sharepush/settings/source.py. NOTE: This is your local settings file. It will not be added to source control, so change it as you wish.

$ cp sharepush/settings/source-dist.py sharepush/settings/source.py

Add data

See data/example-*.csv for proper formatting.

In the data directory add works.csv and other relevant files. Currently supports:

  • works.csv
  • contributors.csv
  • funders.csv
  • awards.csv

NOTE: the column headers and column names of the csv files must match the format of the example files. Excluding the first column (i.e., work_id), column order does not matter.

Run

Run the following commands from the terminal to test loading data from the csv files. dry=True will result in the JSONLD that would be sent to SHARE to be printed to the terminal:

$ python
$ from sharepush.push import load_data
$ load_data(dry=True, dir_name='data-test')

Run the following commands from the terminal to load data from the csv files and push the data to SHARE. dir_name is the name of the folder to read data from; if parameter is not provided it will default to 'data':

$ python
$ from sharepush.push import load_data
$ load_data(dir_name='data-test')

If errors occur on submission, the graph of the work and the response will print to the terminal.

push-to-share's People

Contributors

laurenbarker avatar aaxelb avatar

Watchers

James Cloos 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.