diff --git a/.devcontainer/.dockerignore b/.devcontainer/.dockerignore new file mode 100644 index 0000000..0e1e95c --- /dev/null +++ b/.devcontainer/.dockerignore @@ -0,0 +1,6 @@ +# The devcontainer metadata is read by the CLI, not by the image build, so +# keeping it out of the build context avoids a needless cache invalidation on +# every edit to devcontainer.json. +devcontainer.json +devcontainer-lock.json +env-info.conf diff --git a/.devcontainer/env-info.conf b/.devcontainer/env-info.conf new file mode 100644 index 0000000..0ea1f7d --- /dev/null +++ b/.devcontainer/env-info.conf @@ -0,0 +1,11 @@ +# Drives the on-attach banner the devbase Feature prints. Sourced as shell, so +# quote values containing spaces. Every setting is optional; see +# https://github.com/centralnicgroup-opensource/rtldev-middleware-devcontainer-features + +TITLE="PYTHON-SDK - development environment" + +SHOW_PYTHON=true +SHOW_NODE=auto + +# Node is here for the release tooling only, not for the product code. +NODE_DEPS="semantic-release" diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100755 index 0000000..04084be --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env zsh +# shellcheck shell=bash +# Python dependency install for this repository. +# +# Runs after the devbase Feature's own post-create, so pnpm, the global packages +# and the package.json dependencies are already in place. Everything the previous +# version of this script did besides the pip steps -- installing pnpm and the +# global packages, sourcing ~/.zshrc, symlinking ~/.gitconfig and ~/.zsh_history +# out of /WSL_USER -- is devbase's job now. +set -e + +echo "=> Upgrading pip and installing pip-tools" +pip install --upgrade pip setuptools pip-tools + +echo "=> Compiling requirements.txt from pyproject.toml" +pip-compile pyproject.toml + +echo "=> Installing dependencies" +pip install -r requirements.txt + +echo "=> Installing centralnicreseller as an editable package" +pip install -e .