Contributor’s Guide#
Contributions are welcome. Follow this guide if you would like to get setup as a project contributor or maintainer.
Setup#
Services Setup#
Follow the Google Cloud Setup Guide to setup a Google Cloud project with service account that has access to the Google Sheets API. Obtain a service account credentials JSON file, move it into the root directory of this repository, and rename it as “google-credentials.json” specifically.
Follow the Google Sheets Setup Guide to setup a Google Sheet document, update your document’s sharing settings to share editor access with your service account, and note the identifier of this document (i.e. the GOOGLE_SHEETS_DOCUMENT_ID
). Repeat this step to create a test document, and obtain its document identifier (i.e. GOOGLE_SHEETS_TEST_DOCUMENT_ID
).
Repo Setup#
Clone the repository, and navigate to the root directory from the command line.
Setup and activate a new Anaconda virtual environment:
conda create -n gspread-models-env python=3.10
conda activate gspread-models-env
Install package dependencies:
pip install -r requirements.txt
Create local “.env” file to configure environment variables:
# This is the ".env" file...
GOOGLE_SHEETS_DOCUMENT_ID="..."
GOOGLE_SHEETS_TEST_DOCUMENT_ID="..."
Testing#
Running tests locally:
pytest
For testing on CI (skips some requests):
CI=true pytest
Pre-Release Testing#
Before creating a release, create a new notebook and install the package from GitHub source and verify everything is working as desired:
pip install git+https://github.com/s2t2/gspread-models-py.git
Releasing#
See the GitHub Actions Guide for more information about the package release workflow.
Documentation Site#
Installing package requirements for documentation site:
pip install docs/requirements.txt
Checking links:
jupyter-book build docs/ --builder linkcheck
Building docs site (local preview):
jupyter-book build docs/ --builder html
Building pdf:
jupyter-book build docs/ --builder pdfhtml
# jupyter-book build docs/ --builder pdflatex
See the GitHub Actions Guide for information about the documentation site hosting and deployment workflow.