Skip to main content

FourDigits CLI tool

Project description

FourDigits CLI

A command line tool to make development and deployment easier within Four Digits.

It has the following commands:

  1. "docker"
    • "build": Build docker images in our Gitlab CI pipelines
  2. "gitlab"
    • "fix-coverage-paths": Change the generated coverage.xml so Gitlab can show coverage visualization in merge requests
  3. "exonet"
    • "deploy": Deploy a project to Exonet
    • "db:download": Download a database from Exonet and import it locally
    • "db:copy": Copy a database from one environment to another

Install

pip install fourdigits-cli

Upgrade

pip install --upgrade fourdigits-cli

Enable auto complete

bash

Add this to ~/.bashrc:

eval "$(_FD_COMPLETE=bash_source fd)"
eval "$(_FOURDIGITS_COMPLETE=bash_source fourdigits)"

Zsh

Add this to ~/.zshrc:

eval "$(_FD_COMPLETE=zsh_source fd)"
eval "$(_FOURDIGITS_COMPLETE=zsh_source fourdigits)"

Usage

After installation the cli tool is available under fourdigits and fd. For more information use:

fourdigits --help

Project configuration

The project is configured in the pyproject.toml file, available options and their defaults:

[project]
name = "default-project"

[tool.fourdigits]
exonet_project_name="<default is project name>"
docker_repo="<default is project name>"
slack_channel="<default is project name>"
docker_image_user="fourdigits"

[tool.fourdigits.envs.<environment anem>]
# Every setting can be overridden per environment
slack_channel="custom-channel"

Example project with seperate nextjs

[project]
name = "django-project"

[tool.fourdigits]
# default to project name

[tool.fourdigits.envs.tst]

[tool.fourdigits.envs.acc]

[tool.fourdigits.envs.prd]

[tool.fourdigits.envs.nextjs_tst]
exonet_project_name = "nextjs"
docker_repo = "nextjs"

[tool.fourdigits.envs.nextjs_acc]
exonet_project_name = "nextjs"
docker_repo = "nextjs"

[tool.fourdigits.envs.nextjs_prd]
exonet_project_name = "nextjs"
docker_repo = "nextjs"

Development

make develop

Releasing

To make a new release available on pypi, follow these steps:

  1. Update version by edit fourdigits_cli/__init__.py and commit.
  2. Run: make push-version
  3. Update the installation of fourdigits-cli in https://gitlab.com/fourdigits/utils/docker-pipeline-image/-/blob/main/Dockerfile to the newest version.

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

fourdigits-cli-1.13.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fourdigits_cli-1.13.2-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file fourdigits-cli-1.13.2.tar.gz.

File metadata

  • Download URL: fourdigits-cli-1.13.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.17

File hashes

Hashes for fourdigits-cli-1.13.2.tar.gz
Algorithm Hash digest
SHA256 68dee62a190e21f36e0a9f8a837b981f557e66c49e66ca17948939e65676c6bb
MD5 28be6e613f6c78685abccd615693731f
BLAKE2b-256 f595e9553e624f19d85ff13bbe711d7b1704dfcec4783aadf405bb43e755f5cc

See more details on using hashes here.

File details

Details for the file fourdigits_cli-1.13.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fourdigits_cli-1.13.2-py3-none-any.whl
Algorithm Hash digest
SHA256 183ff56bc4e4851ce5627bfd5af1f55dcc9a40be0e373ab20469acc7e429644b
MD5 5938da4713f20289f038b61bdae333a4
BLAKE2b-256 0709de735a155be32d7d4adfe6881b9bd59b38dc566c92cfa44bcc1dcce08a00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page