Coder Social home page Coder Social logo

fabianp / openreview-py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openreview/openreview-py

0.0 1.0 0.0 6.05 MB

Official Python client library for the OpenReview API

Home Page: https://openreview-py.readthedocs.io/en/latest/

Python 76.35% JavaScript 23.65%

openreview-py's Introduction

OpenReview Python library

CircleCI Documentation Status CodeCov

Prerequisites

Python 3.6 or newer is required to use openreview-py. Python 2.7 is no longer supported.

Installation

There are two ways to install the OpenReview python library.

Using pip:

pip install openreview-py

From the repository:

git clone https://github.com/openreview/openreview-py.git
cd openreview-py
pip install -e .

Note: Depending on your Python installation you may need to use the command pip3 instead of pip.

Usage

The openreview-py library can be used to easily access and modify any data stored in the OpenReview system. For example, to get all the papers submitted to ICLR 2019 and print their titles:

import openreview

client = openreview.Client(baseurl='https://api.openreview.net', username='<your username>', password='<your password>')
notes = openreview.tools.iterget_notes(client, invitation='ICLR.cc/2019/Conference/-/Blind_Submission')
for note in notes:
    print(note.content['title'])

For more information and examples, see the official docs.

Test Setup

Running the openreview-py test suite requires some initial setup. First, the OpenReview API backend and OpenReview web frontend must be installed locally and configured to run on ports 3000 and 3030. For more information on how to install and configure those services see the README for each project:

Next, pytest along with pytest-selenium and pytest-cov have to be installed. These packages can be installed with pip:

pip install pytest pytest-selenium pytest-cov

Finally, you must download the proper Firefox Selenium driver for your OS from GitHub, and place the geckodriver executable in the directory openreview-py/tests/drivers. When you are done your folder structure should look like this:

├── openreview-py
│   ├── tests
│   │   ├── data
│   │   ├── drivers
│   │   │    └── geckodriver

Run Tests

Once the test setup above is complete you should be ready to run the test suite. To do so, start the OpenReview API backend running on localhost:

NODE_ENV=circleci node scripts/clean_start_app.js

and in a new shell start the OpenReview web frontend:

SUPER_USER=openreview.net npm run dev

Once both are running, start the tests:

pytest

Note: If you have previously set environment variables with your OpenReview credentials, make sure to clear them before running the tests: unset OPENREVIEW_USERNAME && unset OPENREVIEW_PASSWORD

To run a single set of tests from a file, you can include the file name as an argument. For example:

pytest tests/test_double_blind_conference.py

openreview-py's People

Contributors

melisabok avatar mohituniyal avatar mspector avatar celestemartinez avatar pmandler avatar zbialecki avatar carlosmondra avatar xkopenreview avatar marshall62 avatar nlbahy avatar haroldrubio avatar mzarozinski avatar akobre01 avatar ewertonbello avatar fabianp avatar purujitgoyal avatar

Watchers

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