Skip to main content

An open-source handbook of applied guidance and tools for sustainable software development and maintenance.

Project description

The Software Gardening Almanack

PyPI - Version Build Status Coverage Status Software DOI badge

The Software Gardening Almanack is an open-source handbook of applied guidance and tools for sustainable software development and maintenance.

The project entails two primary components:

  • The Almanack handbook: the content found here helps educate, demonstrate, and evolve the concepts of sustainable software development.
  • The almanack package: is a Python package which implements the concepts of the book to help improve software sustainability by generating organized metrics and running linting checks on repositories. The Python package may also be used as a pre-commit hook to check repositories for best practices.

Please see our pavilion section of the book for presentations and other related materials for the Almanack.

Handbook

Package

Install

You can install the Almanack with the following:

# install from pypi
pip install almanack

# install directly from source
pip install git+https://github.com/software-gardening/almanack.git

Once installed, the Almanack can be used to analyze repositories for sustainable development practices. Output from the Almanack includes metrics which are defined through metrics.yml as a Python dictionary (JSON-compatible) record structure.

Command-line Interface (CLI)

You can use the Almanack package as a command-line interface (CLI):

# generate a table of metrics based on a repository
almanack table path/to/repository

# perform linting-style checks on a repository
almanack check path/to/repository

Pre-commit Hook

We provide pre-commit hooks to enable you to run the Almanack as part of your automated checks for developing software projects. Add the following to your pre-commit-config.yaml in order to use the Almanack.

For example:

# include this in your pre-commit-config.yaml
- repo: https://github.com/software-gardening/almanack
    rev: v0.1.1
    hooks:
    - id: almanack-check

Python API

You can also use the Almanack through a Python API:

For example:

import almanack
import pandas as pd

# gather the almanack table using the almanack repo as a reference
almanack_table = almanack.table("path/to/repository")

# show the almanack table as a Pandas DataFrame
pd.DataFrame(almanack_table)

Example notebook

Please see this example notebook which demonstrates using the Almanack package.

Contributing

Please see our CONTRIBUTING.md document for more information on how to contribute to this project.

Acknowledgements

This work was supported by the Better Scientific Software Fellowship Program, a collaborative effort of the U.S. Department of Energy (DOE), Office of Advanced Scientific Research via ANL under Contract DE-AC02-06CH11357 and the National Nuclear Security Administration Advanced Simulation and Computing Program via LLNL under Contract DE-AC52-07NA27344; and by the National Science Foundation (NSF) via SHI under Grant No. 2327079.

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

almanack-0.1.4.tar.gz (54.0 kB view details)

Uploaded Source

Built Distribution

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

almanack-0.1.4-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file almanack-0.1.4.tar.gz.

File metadata

  • Download URL: almanack-0.1.4.tar.gz
  • Upload date:
  • Size: 54.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for almanack-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8218b8fb7d2bf33ab287ed94c3331ae1f6e41cd2470910e2e2b1b58438315cb0
MD5 3ab7952bfc3904ba017757e1cac262d2
BLAKE2b-256 77026008f6255dda8aa1f0532c4e7f4552d48c1ff0debf1ce6f3a165224c72e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for almanack-0.1.4.tar.gz:

Publisher: publish-pypi.yml on software-gardening/almanack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file almanack-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: almanack-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for almanack-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 84a85ae17f06d32df5f3748695d63777ea900c9770ddd1dc27c4b223a0cc67e4
MD5 8f7d03b9aadacb4274b4a027cabb3db3
BLAKE2b-256 25a3526627acfc344e61bb43ac9b16d9eef9cea899697f8201f097059e893cf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for almanack-0.1.4-py3-none-any.whl:

Publisher: publish-pypi.yml on software-gardening/almanack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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