Skip to main content

dkist-dev-tools

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.

Metadata

Release files for dkist-dev-tools 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dkist-dev-tools 3.0.0
File Size Uploaded
dkist_dev_tools-3.0.0.tar.gz 26.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dkist-dev-tools 3.0.0
File Interpreter ABI Platform
dkist_dev_tools-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.6 kB

Release files / dkist_dev_tools-3.0.0.tar.gz

Download URL dkist_dev_tools-3.0.0.tar.gz
Size 26.0 kB
Tags Source
SHA-256 checksum
How to use checksums
64ea94607432e6b0046665884b0277eb6236bf711255e1ff1791b9812a08d571
BLAKE2b-256 checksum
How to use checksums
857394c2f0122fda9a98f3724c6380b5048038870bf7e2826e1baa8e495c8726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / dkist_dev_tools-3.0.0-py3-none-any.whl

Download URL dkist_dev_tools-3.0.0-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eceee46eee71d4e4f762ce27ba8ead4043c6fb45ba89154b368364a8411ec80
BLAKE2b-256 checksum
How to use checksums
67b415f82dcd7792e7d2a331a83af68e8892cc2276b03ee890daff6888c6a341
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page