A collection of tasks for testing and accessing UltraViolet instances.
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 initializeThen you'll want to update the generated environments/*.env files with the correct values for each configuration
variable.
To view the list of available tasks use invoke --list.
To view help on a particular tasks use invoke --help <task_name>.
Initialize the project's environment configuration files.
You should only need to do this once.
$ invoke initializeIn order to run the majority of tasks you will need an Access Token. To obtain one:
- Log in to the UltraViolet instance you wish to access.
- Click on the upper-right navigation dropdown and click Applications.
- In the Personal access tokens section click on + New token
- Give the token a name and click Create.
- Copy the provided Access token and paste it into the
.envfile for that environment.
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 qaUpload 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 qaUpload 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" qaPublish 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 developmentList all communities.
$ invoke communities.list-all --environment=qa
$ invoke communities.list-all -e qa
$ invoke communities.list-all qaShow extended info about a single community.
$ invoke communities.show --slug=foo --environment=qa
$ invoke communities.show -s foo -e qa
$ invoke communities.show foo qaEnable 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 qaTo run tests, using the following command:
$ pipenv run python -m pytest