Skip to main content

Roarquery

Project description

PyPI Status Python Version License

Read the documentation at https://roarquery.readthedocs.io/ Tests Codecov

pre-commit Black

Features

  • Query ROAR runs

  • Download ROAR runs and trials

  • List ROAR Firestore collections

Requirements

Installation

You can install Roarquery via pip from PyPI:

pip install roarquery

Roarquery also requires you to install fuego, a command line firestore client. Please see the fuego documentation for complete installation instructions.

On a Mac, follow these steps:

  1. Ensure you have a working go installation. If

go version

returns something, then you are good to go. If not, install go with homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install go
  1. Then install fuego

git clone https://github.com/sgarciac/fuego.git
cd fuego
go build .
go install .
  1. Finally, modify your PATH variable to include the go installation directory, which can be done with the following incantation:

echo $HOME/go/bin | sudo tee -a /private/etc/paths.d/go
  1. You may need to open a new terminal window or tab for these changes to take effect.

Usage

Authentication

Before you can use Roarquery, you need to provide authentication details:

Roarquery works with both the current and legacy ROAR assessment databases. For example, the roarquery runs subcommand accepts a –legacy parameter to access the legacy database. If you would like to use roarquery with both databases, you will need to follow the steps below in both the legacy and current assessment Firebase projects.

  1. Retrieve or generate a Service Account key file.

    1. go to your Firebase project console,

    2. go to “Project settings” (in the little gear menu next to “Project Overview”),

    3. click on the “Service accounts” tab,

    4. click on the “Generate new private key” button.

  2. Save these files to somewhere on your computer. For example, presuming the previous commands downloaded the files to “$HOME/Downloads/private_key.json” and “$HOME/Downloads/legacy_private_key.json”

    mkdir -p "$HOME/.firebaseconfig"
    mv "$HOME/Downloads/private_key.json" "$HOME/.firebaseconfig/private_key.json"
    mv "$HOME/Downloads/legacy_private_key.json" "$HOME/.firebaseconfig/legacy_private_key.json"
  3. Set the environment variable ROAR_QUERY_CREDENTIALS (or ROAR_QUERY_LEGACY_CREDENTIALS for the legacy database) to point to these files.

    echo "export ROAR_QUERY_CREDENTIALS=\"$HOME/.firebaseconfig/private_key.json\"" >> ~/.zprofile
    echo "export ROAR_QUERY_CREDENTIALS=\"$HOME/.firebaseconfig/private_key.json\"" >> ~/.bash_profile
    echo "export ROAR_QUERY_LEGACY_CREDENTIALS=\"$HOME/.firebaseconfig/legacy_private_key.json\"" >> ~/.zprofile
    echo "export ROAR_QUERY_LEGACY_CREDENTIALS=\"$HOME/.firebaseconfig/legacy_private_key.json\"" >> ~/.bash_profile

Command-line Usage

Please see the Command-line Reference for details.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Roarquery is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz’s Hypermodern Python Cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roarquery-1.0.2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

roarquery-1.0.2-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file roarquery-1.0.2.tar.gz.

File metadata

  • Download URL: roarquery-1.0.2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.5

File hashes

Hashes for roarquery-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f329b7c0643a29c0dc997c23425cf96843ec0155865fdedcc60d6f2a6ea01b90
MD5 88a94813ad8f95f4035c3e9cb1433dce
BLAKE2b-256 00f5515c76e4b5f2e77f74d9c8d9ee8a390e8c718b6e695f97d7eb3fff7d0261

See more details on using hashes here.

Provenance

File details

Details for the file roarquery-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: roarquery-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.5

File hashes

Hashes for roarquery-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 55e0e918858eeb47e78aa864a6b4253a1f154c71afe83ae675142903258740fc
MD5 e3ee9bef7da35fb515e25670b474aef9
BLAKE2b-256 7ce58408e67723d10afe614a33c501fc510eb793318f064c515214d5b9d8544c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page