Skip to main content

Utilities for setting up a Sentry development environment

Project description

devenv

managing dev environments since '24

devenv is an extensible execution framework and library for authoring a simple set of high level commands - bootstrap, sync, doctor, nuke - that manage a repository's dev environment.

install

Download this and run it:

bash install-devenv.sh

user guide

devenv bootstrap

This is intended for initial setup.

devenv fetch [repository name]

Any repository on github in the form of [org]/[reponame]

Repositories are cloned to a "coderoot" directory which is specified in the global configuration.

Note: sentry and ops are currently special names which perform more complicated installations (e.g., sentry will set up both sentry and getsentry)

devenv sync

When you're inside a repository, this will bring the dev environment up to date, or create it if it doesn't exist. It runs [reporoot]/devenv/sync.py.

devenv doctor

When you're inside a repository, this diagnoses and tries to fix common issues. Checks and fixes are defined in [reporoot]/devenv/checks.

devenv nuke|uninstall (wip)

When you're inside a repository, this completely removes the dev environment.

technical overview

devenv itself lives in ~/.local/share/sentry-devenv. Inside:

  • bin contains devenv itself and direnv
    • this is the only PATH entry needed for devenv
  • a private python and virtualenv used exclusively by devenv

As much as possible, a repo's dev environment is self-contained within [reporoot]/.devenv.

We're relying on direnv (which bootstrap will install, globally) to add [reporoot]/.devenv/bin to PATH. Therefore a minimum viable [reporoot]/.envrc might look like:

if [ -f "${PWD}/.env" ]; then
    dotenv
fi

PATH_add "${HOME}/.local/share/sentry-devenv/bin"

if ! command -v devenv >/dev/null; then
    echo "install devenv: https://github.com/getsentry/devenv#install"
    return 1
fi

PATH_add "${PWD}/.devenv/bin"

configuration

global configuration is at ~/.config/sentry-devenv/config.ini.

repository configuration is at [reporoot]/devenv/config.ini.

develop

We use tox. The easiest way to run devenv locally is just using the tox venv's executable:

~/code/sentry $  ~/code/devenv/.tox/py311/bin/devenv sync

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

sentry_devenv-1.7.0.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

sentry_devenv-1.7.0-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file sentry_devenv-1.7.0.tar.gz.

File metadata

  • Download URL: sentry_devenv-1.7.0.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for sentry_devenv-1.7.0.tar.gz
Algorithm Hash digest
SHA256 c7638ef923dc2755ab8e2307dab334d5e56b255652d1b55ba0d4af8af8da0a65
MD5 3cd739d44f28378f312103c032f0560d
BLAKE2b-256 3cb9b8d2a4e2b3cd563aa773ce3ba5ceeeb0cb1256b38f10093ecdf965b2a620

See more details on using hashes here.

File details

Details for the file sentry_devenv-1.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sentry_devenv-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7503fa833576d28c19197b9e5bb63bf0bc5e003662dbc781ff469563470d383
MD5 880c201784670fd84110866b0bc472d8
BLAKE2b-256 7c7a2d094ddb4f9e230084790359a14186477fb3a7fd28f6d3d273142a24b0ca

See more details on using hashes here.

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