Skip to main content

A Cron Expression Parser

Project description

Cronpar - a tool for parsing cron expression

Requirements

To run this program, you need setup you local environment as following

  • A Python Environment with Python 3.8+ and pip (reckon use pyenv and create a virtualenv)
  • Poetry (Dependency management)
  • make (a dev tool)

Setup

Before you can run everything, please make sure you have setup a Python environment

if you are using make, you can setup the dev environmane by simply using

make init

this will install poetry and install all dependencies. If you don't want to use make, alternatively, just run the following commands

pip install poetry
poetry install

To prepare/build the cli tool for you to play with, run

make build

or, just run

pipx install .

Now, you should be able to run the program, for example

cronpar explain "*/15 0 1,15 * 1-5 /usr/bin/find"

Yesting & Contribution

There are some test cases generated during development, to run the tests, you can either run

make test

pr

poetry run pytest tests/ --cov --cov-fail-under 89

Please make sure you have tested all the changes you made properly, and all tests passed before you push

Also, it will be good to keep the code formatted, you can check this by running

make format
make lint

or

poetry run black --preview --line-length 120 cronpar
poetry run isort --line-length 120 cronpar
poetry run flakehell lint .

Notice

Please Note this program is still in development, it may be not very stable, but we will fix and add more features in the coming future.

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

cronpar-1.0.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

cronpar-1.0.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

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