Skip to main content

Toolkit for developers of the `dkist-processing-*` stack.

Project description

codecov

Overview

This repo contains a suite of tools that will hopefully be helpful to developers of the dkist-processing-* stack. More tools will be added as we learn more about how we use them, but if you know of something you want then please add it!

Install

Using base pip

Probably do this in a virtual environment that matches the python version used by the DKISTDC.

pip install dkist-dev-tools

Shell Completion

If you want shell completion then add the following to your shell rc file:

bash

Add to ~/.bashrc

eval "$(_DDT_COMPLETE=bash_source ddt)"

zsh

Add to ~/.zshrc

eval "$(_DDT_COMPLETE=zsh_source ddt)"

Tools

The top-level command is called ddt. The subcommands are shown below

Freeze Dependencies

ddt freeze [-d project_dir] [-c] [-t] VERSION

This command prepares for a new version of a project by freezing a complete set of dependencies under the “frozen” pip extra in pyproject.toml. This allows airflow workers (or human users) to install with pip install dkist-processing-INSTRUMENT[frozen] and always get the exact same environment for a given version.

There is no need to worry about your current python environment (besides the version); a fresh temporary environment is used to install the project and inspect the dependencies. This temporary environment is deleted when we’re done with it.

After this script is run the pyproject.toml file in the project_dir will be updated in two places:

  • The project.optional-dependencies.frozen node will either be created or updated to show the full list of dependencies in the as-built environment.

  • The tool.dkist-dev-tools node will be either created or updated to show when the command was run and with what version. This information is used to check the project prior to building a new release on Bitbucket.

If the -c option is passed then the above changes will be committed to git with the message “Freeze deps for {VERSION}”.

If the -t option is passed then the above changes will be committed AND that commit will be tagged with the given version. This option implies the -c option.

Render Changelog(s)

ddt changelog [-d project_dir] [-s] [-c] VERSION

This command uses towncrier to render an update to CHANGELOG from fragments in the changelog fragment directory. If science fragments also exist then the SCIENCE_CHANGELOG will also be updated.

By default a draft of the changes will be shown and the user asked to confirm that it looks correct. Passing the -s option skips this step.

If the -c option is passed then the above changes will be committed to git with the message “Render CHANGELOG[s] for {VERSION}”.

All changes will need to be manually committed.

Check Release Conditions

ddt check

This group of commands is used to check that the main commands were run properly for the current version about to be released.

Check Dependencies Frozen

ddt check freeze [-d project_dir]

Confirm that the version frozen into a pyproject.toml file matches the current version. The current version comes first from the BITBUCKET_TAG environmental variable. If this is not set then the version is inferred from a “v*” git tag on HEAD.

Check Changelog Status

ddt check changelog

If git HEAD is a tagged version then check that the changelog has been correctly rendered and no fragments remain. Otherwise run towncrier check, which makes sure fragments exist if there is a diff between the current branch and origin/main.

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

dkist_dev_tools-3.0.0rc1.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

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

dkist_dev_tools-3.0.0rc1-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file dkist_dev_tools-3.0.0rc1.tar.gz.

File metadata

  • Download URL: dkist_dev_tools-3.0.0rc1.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for dkist_dev_tools-3.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 caba748b717dba9e1b7caa30da90469d6522149ab5d7766c122997bfcf053422
MD5 b08b52410a7a0a6340d842f32e59e7d8
BLAKE2b-256 5cb442bcfc4fb82b0333ed428d4248f84d48a93112db3910cad46ba68016ffb1

See more details on using hashes here.

File details

Details for the file dkist_dev_tools-3.0.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for dkist_dev_tools-3.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a1b5c160a87b0be2aba3614ccd965ce9121e87a99d3a7613df656a2250c7106
MD5 b3b38b6550ef0f73688062e5c69043a3
BLAKE2b-256 18776a3cfa33c1e8f760ee73aa01d88a4cc7b2addc5197286bcda21a8b9b514c

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