Skip to main content

inicheck is an high level configuration file checker enabling developers tight control over their users configuration files

Project description

Welcome to inicheck

https://img.shields.io/pypi/v/inicheck.svg Documentation Status https://travis-ci.com/USDA-ARS-NWRC/inicheck.svg?branch=master https://coveralls.io/repos/github/USDA-ARS-NWRC/inicheck/badge.svg?branch=master

What is inicheck?

inicheck is an advanced configuration file checker/manager enabling developers high end control over their users configuration files. inicheck is specifcially aimed at files that adhere to the .ini format. See wiki for more info on the file standards https://en.wikipedia.org/wiki/INI_file .

Objectives

The goal of inicheck was to reduce endless logic gates and repeat code for software that required complicated configuration files. We also wanted to centralize options for an ever changing repo. We have a lot of experience with codes that required config files that could easily have 1000 different configurations. So from that need inicheck has been born.

Basic Principles

inicheck requires a master config file to operate. The master config file is a gold standard files provided by the developer of a package. The master config (sometimes called the core config) provides the rules for every configuration file that is passed to the software. There the developer can set types, constrain options, documentation strings and defaults. The developer can also create recipes that can be triggered when a user has a specific combination of config file entries.

Once a master config file is created, all config files can be passed through the standards laid out in there. From there the software can provide feedback to the user about why their file is being rejected. The master file also enables the user to have really simple config files that have larger meaning. With recipes and defaults, a user can provide relatively little and the developer can still move forward without have a ridiculous amount of logic to handle scenarios.

Features

  • .ini file generating

  • Config file checking

  • Config file warning and error reporting

  • Command line interface

  • Apply defaults

  • Auto cast items into the correct types.

  • Constrain users by designated options

  • Create recipes to ensure the right settings are in place

  • Use custom types for your config file

  • Use multiple master config files for cleaner files

  • Auto config file documentation

  • Create changelogs to automatically manage deprecated config options

Credits

inicheck has been developed at the USDA-ARS-NWRC during efforts towards creating highly configurable, physically based watershed modeling software.

inicheck originally was based on config parser and with time went away from it. We would not be here with that base and for that were grateful.

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2018-01-05)

  • First release on PyPI.

0.2.0 (2018-04-11)

  • Recipes were added in

  • Custom Checkers

  • Multiple master files can be used

  • Module associated files to find master configs

  • Detail finding in cli to get help on the fly

0.3.0 (2018-08-10)

  • Added the ability require an config entry be a list

  • Added significant unit tests

0.4.0 (2019-07-19)

  • Added in url datatype

  • Added Datetime Ordered data type for start stop options

  • Added in an inidiff script for comparing config files

0.5.0 (2019-08-22)

  • Fixed bug relating to Datetime Ordered Pairs

  • Added in inimake script for creating scripts from scratch

  • Added in more unittests (54% coverage)

0.6.0 (2019-10-16)

  • Built in a brand new feature for migrating large changes in configs

  • Added bounds checking for type checking allowing for continuous types

  • Fixes for issues: 25 , 27 , 31 , 32

0.7.0 (2019-10-22)

  • Restructure the checkers some to better handle types

  • Fixed several broken tests.

0.8.0 (05-29-2020)

  • Increased unittest coverage from ~57% to ~83%)

  • Added in a CLI tool to find changelog impacts in python files

  • Switch from pandas to_datetime to dateparser to reduce package size

  • Added inicheck to traviCI and Coveralls

  • Fixes for 35 , 38 , 39, 40, 41, 42 43, 44, 45

  • Added in linting with isort and autopep8

  • Hardcoded parse_date to always use UTC and return timezone unaware object. 51

  • Updated release to use setuptools_scm. 52

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

inicheck-0.9.1.tar.gz (79.2 kB view details)

Uploaded Source

Built Distribution

inicheck-0.9.1-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

File details

Details for the file inicheck-0.9.1.tar.gz.

File metadata

  • Download URL: inicheck-0.9.1.tar.gz
  • Upload date:
  • Size: 79.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.1

File hashes

Hashes for inicheck-0.9.1.tar.gz
Algorithm Hash digest
SHA256 511c461407f892c9c1142d899684e6aaed4f3455b932403c383e5cfd32d518e7
MD5 e87ecfe5895090913339d8f0c3b37cdf
BLAKE2b-256 7db070e52e0435a9bc9d992fa3d85a6f091046e4d5266d89a7e13da4e80ed4e2

See more details on using hashes here.

File details

Details for the file inicheck-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: inicheck-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.1

File hashes

Hashes for inicheck-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 232d9f9b80719d8c6cea878b6d15ee4d432141d1a311ca76da362e76821a10d7
MD5 529ecb055443617cdd9d38e787d00d60
BLAKE2b-256 b33a874a87413c077c920c7c6192e947d9b3e2a262f5b2555624e9ac353e0e44

See more details on using hashes here.

Supported by

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