Skip to content

A collection of tasks for testing and accessing UltraViolet instances

Notifications You must be signed in to change notification settings

nyudlts/ultraviolet-data-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UltraViolet Data Loader

A collection of tasks for testing and accessing UltraViolet instances.

Getting Started

Project Setup

To check out the project and prepate your local environment, do the following:

$ git clone git@github.com:nyudlts/ultraviolet-data-loader.git
$ cd ultraviolet-data-loader
$ pipenv install
$ pipenv shell
$ invoke initialize

Then you'll want to update the generated environments/*.env files with the correct values for each configuration variable.

Tasks

To view the list of available tasks use invoke --list.

To view help on a particular tasks use invoke --help <task_name>.

Initialize

Initialize the project's environment configuration files.

You should only need to do this once.

$ invoke initialize

Acquiring an Access Token

In order to run the majority of tasks you will need an Access Token. To obtain one:

  1. Log in to the UltraViolet instance you wish to access.
  2. Click on the upper-right navigation dropdown and click Applications.
  3. In the Personal access tokens section click on + New token
  4. Give the token a name and click Create.
  5. Copy the provided Access token and paste it into the .env file for that environment.

Records

Create Draft

Creates a draft record and provides its Draft ID.

$ invoke records.create-draft --environment=qa
$ invoke records.create-draft -e qa
$ invoke records.create-draft qa

Upload File

Upload a single file to a draft record.

$ invoke records.upload-file --draft-id=exeph-73h23 --file-path=tasks/records.py --environment=qa
$ invoke records.upload-file qa -d exeph-73h23 -f tasks/records.py -e
$ invoke records.upload-file exeph-73h23 tasks/records.py qa

Upload Files

Upload multiple files to a draft record.

$ invoke records.upload-files --draft-id=vhtmn-sw870 --glob-pattern="data/*.wacz" --environment=qa
$ invoke records.upload-files -d vhtmn-sw870 -g "data/*.wacz" -e qa
$ invoke records.upload-files vhtmn-sw870 "data/*.wacz" qa

Publish Draft

Publish a draft record.

$ invoke records.publish --draft-id=006da-12v05 --environment=development
$ invoke records.publish -d 006da-12v05 -e development
$ invoke records.publish 006da-12v05 development

Communities

List All

List all communities.

$ invoke communities.list-all --environment=qa
$ invoke communities.list-all -e qa
$ invoke communities.list-all qa

Show

Show extended info about a single community.

$ invoke communities.show --slug=foo --environment=qa
$ invoke communities.show -s foo -e qa
$ invoke communities.show foo qa

Enable Subcommunities

Enable subcommunities on the target community

$ invoke communities.enable-subcommunities --slug=foo --environment=qa
$ invoke communities.enable-subcommunities -s foo -e qa
$ invoke communities.enable-subcommunities foo qa

Development

Tests

To run tests, using the following command:

$ pipenv run python -m pytest

About

A collection of tasks for testing and accessing UltraViolet instances

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages