Skip to main content

Top-level package for Platform.sh/Upsun Configuration Validator.

Project description

upsunvalidator

Contribute, request a feature, or check out our resources

Check out Jeck.ai       Blog       Report a bug       Request a feature

Open issues    Open PRs    License


A Python-based validator for Upsun (formerly Platform.sh) configuration files. This tool helps catch configuration errors before deployment by validating configuration YAML files against the official Upsun & Platform.sh schemas.


Features       Installation       Usage       Testing       License       Contribute      

Features

  • Validates application runtimes, services, and their versions
  • Validates application and service configurations
  • Validates route patterns and configurations
  • Provides clear error messages for invalid configurations
  • Provides recommendations when possible
  • Includes test suite with passing and failing examples

Installation

Requirements

  • Python >= 3.12
python -m pip install --user upsunvalidator

You can then check the installed version with:

upsunvalidator version

Upgrade

python -m pip install --user upsunvalidator --upgrade

Usage

Validating project code for various PaaS providers

  1. Provider: Upsun

    # If executing from within the repository, pwd will be used.
    upsunvalidator validate --provider upsun
    # or
    upv validate --provider upsun
    
    # If outside the project dir, use the --src flag
    upsunvalidator validate --src $PATH_TO_REPO --provider upsun
    # or
    upv validate --src $PATH_TO_REPO --provider upsun
    
  2. Provider: Platform.sh

    # If executing from within the repository, pwd will be used.
    upsunvalidator validate --provider platformsh
    # or
    upv validate --provider platformsh
    
    # If outside the project dir, use the --src flag
    upsunvalidator validate --src $PATH_TO_REPO --provider platformsh
    # or
    upv validate --src $PATH_TO_REPO --provider platformsh
    
  3. All providers

    # If executing from within the repository, pwd will be used.
    upsunvalidator validate
    # or
    upv validate
    
    # If outside the project dir, use the --src flag
    upsunvalidator validate --src $PATH_TO_REPO
    # or
    upv validate --src $PATH_TO_REPO
    

Testing

The project includes a comprehensive test suite:

python3 -m venv venv
source venv/bin/activate
pip install .
pytest

License

MIT License

Contribute

We're very interested in adding to the passing configs. If you have working configuration files for Platform.sh and/or Upsun, please share!

  1. Create an issue
  2. Fork the repository
  3. Create your feature branch (git checkout -b feature/amazing-feature)
  4. Add you configuration to the tests/valid using the pattern tests/valid/YOUR_EXAMPLE_OR_FRAMEWORK_NAME/files/...
  5. Commit your changes (git commit -am 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

See CONTRIBUTING.md for more details.

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

upsunvalidator-0.1.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

upsunvalidator-0.1.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: upsunvalidator-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for upsunvalidator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 040765ffb56c6abaeeb6d80296ee157e707153827d1d24a3b16f8a251c5d172a
MD5 ab67c2ebf4f542319f319adcbaf1f6cc
BLAKE2b-256 025b702f0e79d6aef4a0e7e910d3b60da431672fe6fa51328deb990ef41b2097

See more details on using hashes here.

File details

Details for the file upsunvalidator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for upsunvalidator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aae830b45978d03f1353c85de8e08f4989bcb745768821d0647fe07b816968fd
MD5 58a577c220c605c4ec6a97605afec917
BLAKE2b-256 4319ae4334cb8499fd71032ee4834391ca1841f709e88616a17eebbeccd0ff3d

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