Install
This guide will walk you through the installation process for the sonyci package. It can be installed with pip or uv
(Option 1) Install with pip
pip install sonyci
(Option 2) Install with uv
uv is used as the packaging manager. It can be installed with pip install uv.
Clone the repository::
git clone https://github.com/WGBH-MLA/sonyci.git
cd sonyci
Create a virtual environment
uv venv
Activate your virtual environment
source .venv/bin/activate
Deactivate
To deactivate the virtual environmet, run the deactivate command.
deactivate
Install
Install the project with development dependencies:
uv sync
Login
The first time you run the application, you will need to get an access token. You can do this with the login command:
ci login
Credentials
You will need to provide your username and password, as well as your client_id and client_secret. These can be provided as command line options, or (recommended) as ENVIRONMENT_VARIABLES:
Create a file called .cred with the following contents, and add your credentials:
export CI_USERNAME=
export CI_PASSWORD=
export CI_CLIENT_ID=
export CI_CLIENT_SECRET=
export CI_WORKSPACE_ID=
Dot notation
Alternate notation for source (may not be available in your terminal):
. .cred
Activate the variables:
source .cred
Check ennvironment variables
To check your environment variables are stored, run:
echo $CI_USERNAME
If your username does not appear, you may need to run the source command again.
Otherwise, you can now login and get an access token:
ci login
This will save a file called .token in the current directory. This file will be used to authenticate future requests, and you do not need to login again until the token expires.
Run the application
Now you are ready to run the application:
ci -h
See the CLI reference for more details.
Development
Additional development scripts are available in the pyproject.toml file. You can run them with uv run <script_name>. For example, to run the tests:
uv run test
Available scripts
test: Run the testslint: Run the linter, autofix fixable issuesformat: Format the codedocs: Build the documentation