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
# or
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.1.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.1-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: upsunvalidator-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ed45ec9041f0594795c517e51992f1f990ff3df1db4a7f980007603f59c6f4be
MD5 755d55e3e3cac69583f78edceb3f1478
BLAKE2b-256 28f87e50f5078a54883840a496f6d91d48aabed69faed851033800c0d2efa6ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for upsunvalidator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b01d2e0c97cd81bb7ef94ba8f5df3f124cc522c5d855bbe9dabba30eecf7c493
MD5 2d0449ea99164cebdc083f29eaa428f8
BLAKE2b-256 64bd52f90a745cc98e96a81fb5b910263e88f97e09cf490d68a0fa860e88159d

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