Roarquery
Project description
Features
Query ROAR runs
Download ROAR runs and trials
List ROAR Firestore collections
Requirements
Python 3.9+
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:
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
Then install fuego
git clone https://github.com/sgarciac/fuego.git
cd fuego
go build .
go install .
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
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.
Retrieve or generate a Service Account key file.
go to your Firebase project console,
go to “Project settings” (in the little gear menu next to “Project Overview”),
click on the “Service accounts” tab,
click on the “Generate new private key” button.
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"
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for roarquery-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4581544c6e4885b8d24dbaa9522daa1e55f85127e1c7db680a0c80207a3fc6fe |
|
MD5 | 008dbcc70b705b538e3557edc758d3dc |
|
BLAKE2b-256 | 29605fd42140154112a6ac9d7d1ecbd871d3e792cc7c9f21ca83fec0675b999a |