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:

[!IMPORTANT]
upsunvalidator requires at least Python 3.12.

pip install upsunvalidator

You can then check the installed version with:

upsunvalidator version

Upgrade

pip install --upgrade upsunvalidator

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 --upgrade pip
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.2.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.2-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: upsunvalidator-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 aa57c07b3f59f5dcffd9b00aae31915b3c9b53ee50cfdb72cdbc753e77fae151
MD5 274e20c43fa15df75724be212d0ad0bf
BLAKE2b-256 4f9bdb70748340a62accc1003619b1bb925b3614f548eb88bca517b1081d0499

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for upsunvalidator-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c44cb31d46bd85fac92d4a8f02819db6a45b27d189a04c14de24b6a1cb0ffbd
MD5 5b22e9626ff3f73d525f0cb4c20a9174
BLAKE2b-256 de87a05b3d49d5893054892ff5bbd97159de3c15f0e0f1dcc85145b761df02d6

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