Skip to main content

Tool to do source bumps

Project description

bumpkin

codecov CI

Tool to do source bumps :jack_o_lantern:

Features

  • Quick information fetch using the defined plugins
$ bumpkin demo basichttp https://discord.com/api/download?platform=osx
INFO:bumpkin.sources.basichttp:Downloading and hashing: https://dl.discordapp.net/apps/osx/0.0.273/Discord.dmg
{'sha256': '54794fbf4b29c9a56f6e8a736ff5445c75a1fd3cf49dce7b4d7aa6ff067ae2ef', 'final_url': 'https://dl.discordapp.net/apps/osx/0.0.273/Discord.dmg'}
  • Evaluation with JSON files. See the examples folder.
$ cat examples/discord.json 
{
  "x86_64-linux": {
    "stable": {
        "_type": "basichttp",
        "url": "https://discord.com/api/download?platform=linux&format=tar.gz"
    },
    "ptb": {
        "_type": "basichttp",
        "url": "https://discord.com/api/download/ptb?platform=linux&format=tar.gz"
    },
    "canary": {
        "_type": "basichttp",
        "url": "https://discord.com/api/download/canary?platform=linux&format=tar.gz"
    }
  },
  "x86_64-darwin": {
    "stable": "https://discord.com/api/download?platform=osx",
    "ptb": "https://discord.com/api/download/ptb?platform=osx",
    "canary": "https://discord.com/api/download/canary?platform=osx"
  },
  "aarch64-darwin": {
    "ptb": "https://discord.com/api/download/ptb?platform=osx"
  }
}

$ bumpkin eval -i examples/discord.json -o /tmp/discord.json 

$ cat /tmp/discord.json  | jq
{
  "x86_64-linux": {
    "stable": {
      "sha256": "581726cbd7f018fab756cd7eee520e47b3a25bf7749193482a9e10e4d458042c",
      "final_url": "https://dl.discordapp.net/apps/linux/0.0.25/discord-0.0.25.tar.gz"
    },
    "ptb": {
      "sha256": "2e80e0de2c0ad7cac3b3353f75010ad3f27c0c8c6bab276c7df959a3c200464b",
      "final_url": "https://dl-ptb.discordapp.net/apps/linux/0.0.39/discord-ptb-0.0.39.tar.gz"
    },
    "canary": {
      "sha256": "d99ad20f23e3dc01eb882599fdb6f7d371f727ded34ee9fffd68e62273449b09",
      "final_url": "https://dl-canary.discordapp.net/apps/linux/0.0.148/discord-canary-0.0.148.tar.gz"
    }
  },
  "x86_64-darwin": {
    "stable": "https://discord.com/api/download?platform=osx",
    "ptb": "https://discord.com/api/download/ptb?platform=osx",
    "canary": "https://discord.com/api/download/canary?platform=osx"
  },
  "aarch64-darwin": {
    "ptb": "https://discord.com/api/download/ptb?platform=osx"
  }
}

How it works

The basic primitive of bumpkin is a source, which is basically a reducer.

The reducer takes some parameters such as the URL, and exposes a reduce method. This method takes the previous state of the result data, or a empty dictionary, changes and then returns the new data. So, if the plugin has some handling to not refetch stuff if the URL or latest version didn't changed, for example, it has everything it needs at hand.

Install it from PyPI

pip install bumpkin

Usage

$ python -m bumpkin
#or
$ bumpkin

Development

Read the CONTRIBUTING.md file.

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

bumpkin-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

bumpkin-0.1.0-py2.py3-none-any.whl (12.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file bumpkin-0.1.0.tar.gz.

File metadata

  • Download URL: bumpkin-0.1.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for bumpkin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4fd9104fa9c44d4e1bed2077a33617a64dab11d532a72970899446d557b0582a
MD5 7ae0eaaebfc37bfaec2fdca6b8140296
BLAKE2b-256 63bfaba1df9964cfc548b260a18bcc97d401ae04145de8a6f0b3714c19d42d4b

See more details on using hashes here.

File details

Details for the file bumpkin-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: bumpkin-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for bumpkin-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5051a1f871fcbafa7c87dece6c1d89a8eac5bdd1f92d704deb971a4a9c88ffe9
MD5 9c1d9728df4300591449847042f39af9
BLAKE2b-256 78721fb512f0b89ff74e61a6e1945598a5ddb8fe098f8a25d2a49e0830b0f6ab

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