This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This repository contains different utilities and tools which help with the StackStorm integration pack development.

Tools

Pack Bootstrap / Scaffolding tool

Pack bootstrap tool makes it easier to get started with the StackStorm pack development.

Currently, the tool creates the correct pack directory structure.

Usage

Run tool in the non-interactive mode:

st2sdk bootstrap <pack name>

This will create a pack directory named <pack name> in the current working directory. This directory will contain all the directories and files which are needed by pack.

Run tool in the interactive mode:

st2sdk bootstrap -i [pack name]

In the interactive mode, the tool will ask you a couple of questions and the answers will be used to populate pack metadata and other files.

Check and Lint scripts

This repository also contains various “check” and “lint” scripts which can be ran standalone or hooked up to your continuous integration system. Those scripts validate metadata file syntax, verify that pack contains pack.yaml file, etc.

Some of those scripts require access to the database and network (e.g. PyPi to download pack dependencies, etc.) and they also manipulate the file system. You should make sure that you provide a clean environment on every invocation of those scripts. This can be achieved by using a fresh VM, docker container or similar for each run.

All of those scripts are also hooked up to our Travis CI system and run on every push to our st2contrib repository.

For some examples on how to utilize this scripts, please refer to the Makefile in st2contrib repository - https://github.com/StackStorm/st2contrib/blob/master/Makefile

As you may notice in the Makefile, we have some scripts and optimizations in place, so by default for Pull Request we only run scripts on changed files and / or pack. This is an important optimization because if we ran scripts for all the files and packs (even the ones which haven’t been touched) this would substantially slow down the CI run time for a particular Pull Request and delay the time it takes for user to get feedback about their PR.

In case you have a lot of custom packs in your repository, you might want to utilize similar approach.

st2-check-validate-yaml-file

This script verifies that a provided YAML file contains a valid syntax. It’s usually used with action metadata files and other YAML files.

Usage:

st2-check-validate-yaml-file <path to YAML file>

Keep in mind that this script just performs syntax and no semantic checks. If you want to confirm that your action or other metadata file is correct, you should also run st2-check-register-pack-resources script which tries to register all the resources in a pack and errors out of registration

st2-check-validate-json-file

This script verified that a provided JSON file contains a valid syntax. It’s usually used with action metadata files and other YAML files.

Usage:

st2-check-validate-json-file <path to JSON file>

Keep in mind that this script just performs syntax and no semantic checks. If you want to confirm that your action or other metadata file is correct, you should also run st2-check-register-pack-resources script which tries to register all the resources in a pack and errors out of registration of a particular resource fails.

st2-check-validate-pack-metadata-exists

This script verifies that a pack contains pack.yaml metadata file.

Usage:

st2-check-validate-pack-metadata-exists <path to the pack root directory>

st2-check-register-pack-resources

This script tries to register all the resources in a particular pack and fails if registering a particular resource fails.

Usage:

st2-check-register-pack-resources <path to the pack root directory>

This script requires access to a fresh database (MongoDB) on each run. In addition to that, it requires all the StackStorm components (st2actions, st2common, etc.) to be in PYTHONPATH. You can achieve that by cloning st2 repository in a particular directly (e.g. /tmp/st2) and then setting ST2_REPO_PATH environment variable to point to that directory when invoking the script.

st2-check-pylint-pack

This script runs pylint on all the Python files inside a particular pack.

Usage:

st2-check-pylint-pack <path to the pack root directory>

This script installs packs regular and test requirements so it needs to run inside a virtual environment which is created for purpose of this script.

Similar to st2-check-register-pack-resources this script also requires access to StackStorm code-base and st2 components. You can achieve that by cloning st2 repository in a particular directly (e.g. /tmp/st2) and then setting ST2_REPO_PATH environment variable to point to that directory when invoking the script.

st2-check-print-pack-tests-coverage

This script prints a test coverage for a particular pack. It prints all the actions which contains tests and the ones which are missing it.

Keep in mind that this script is for informational purposes only - right now it doesn’t fail if some action is missing tests.

Usage:

st2-check-print-pack-tests-coverage <path to the pack root directory>
Release History

Release History

0.2.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
st2sdk-0.2.0.tar.gz (15.0 kB) Copy SHA256 Checksum SHA256 Source Jun 10, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting