Skip to main content

License Updater

PyPI version main

All Contributors

Every year I go through projects and update license strings. It's OK for a few projects but can get really arduous! Thus, I made this license updater to do exactly what I needed.

TODO

The actions updater will make it easy to update actions:

  • 🥑 updated syntax and commands
  • 🥑 versions of actions, either for releases or commits
  • 🥑 preview, write to new file, or write in place!
  • 🥑 run as a GitHub action workflow for annual checks!

You can see the ⭐️ Documentation ⭐️ for complete details!

⭐️ Quick Start ⭐️

Installation

The module is available in pypi as license-updater, and to install we first recommend some kind of virtual environment:

$ python -m venv env
$ source env/bin/activate

And then install from pypi using pip:

$ pip install license-updater

Usage

For all commands below, the actions updater can accept a directory with yaml files, or a single yaml file that matches the GitHub actions schema.

View updaters available (and descriptions)

$ license-updater list-updaters

You should likely detect (to preview) before you write the changes to file.

# Run all updaters
$ license-updater detect .github/workfows/main.yaml

# Only detect for the setoutput updater
$ license-updater detect -u setoutput .github/workfows/main.yaml

And finally, write updates to file!

$ license-updater update .github/workfows/main.yaml

🎨 Screenshots 🎨

If a file has updates, it will print to the terminal the updated file for preview.

docs/assets/img/detect.png

And after you run update (described below) you will see all green!

docs/assets/img/clean.png

Running across many files:

docs/assets/img/updates.png

And that's it! The action comes with several updaters that will look for particular aspects to lint or update. If you have a request for a new updated, please open an issue.

Feature Ideas

This could be fairly easy to extend to allow for more "linting" style actions to reflect preferences in style, e.g:

$ license-updater lint .github/workflows/main.yaml

If this sounds interesting to you, please open an issue to discuss further! We currently do some basic linting, as the yaml loading library has preferences for saving with respect to spacing, etc.

😁️ Contributors 😁️

We use the all-contributors tool to generate a contributors graphic below.

Vanessasaurus
Vanessasaurus

💻
Mike Henry
Mike Henry

💻

License

This code is licensed under the MPL 2.0 LICENSE.

Metadata

Release files for license-updater 0.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 license-updater 0.0.0
File Size Uploaded
license-updater-0.0.0.tar.gz 23.8 kB Details

Release files / license-updater-0.0.0.tar.gz

Download URL license-updater-0.0.0.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
78c43217e9d89b82fc6b69e96dab79e6cabc9e653a531c13a858148f1300b098
BLAKE2b-256 checksum
How to use checksums
d1fa9d72db2480ea24d18397b2c8636047baf03deb2db6d6e8fa405592a1fe22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.0.0 This release

1 release file

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