LSST the Docs build tool
Project description
LSST the Docs: Mason
Mason is the build tool for LSST software documentation that runs in the Jenkins build environment. It is a part of the LSST the Docs (LTD) service for continuous documentation deployment. You can learn more about LTD in our SQR-006 technote.
Installation
Mason is intended to work with either Python 2.7, 3.4, or 3.5.
We recommend that you install Mason inside a virtual environment (such as virtualenv / virtualenvwrapper on Python 2.7/3 or the built-in pyenv for Python 3).
If the Sphinx project being built uses Python introspection to build an API reference with autodoc or numpydoc, then the Python package being documented must be installed in the same virtual environment as Mason.
Install for production
Mason is available on PyPI:
pip install ltd-mason
Next, see the Usage section.
Install for development/testing
Once the environment is ready, install Mason from this Git repository via:
git clone https://github.com/lsst-sqre/ltd-mason.git pip install -r requirements.txt python setup.py develop
See Testing for information on running unit tests.
Usage
Mason is intended to be used as a command line app, ltd-mason. typical usage is:
ltd-mason --manifest manifest.yaml
See ltd-mason -h for additional options.
YAML Manifest
A YAML-encoded manifest file tells ltd-mason what documentation to build, and where to find individual packages for multi-package LSST Stack-type build. The manifest’s schema is described in SQR-006, and examples are also available here in the tests/ and integration_tests/ directories. Formally the manifest schema is defined in manifest_schema.yaml.
Enviroment Variables and AWS credentials
LTD Mason is configured through environment variables.
Credentials for AWS S3
- LTD_MASON_AWS_ID
AWS access key ID.
- LTD_MASON_AWS_SECRET
AWS secret access key.
- LTD_MASON_AWS_PROFILE
This variable can be set as an alternative LTD_MASON_AWS_ID and LTD_MASON_AWS_SECRET. LTD_MASON_AWS_PROFILE is the name of a profile in ~/.aws/credentials that contains your secret key and ID. See the boto3 configuration guide for more information.
If None of these variables are configured, LTD Mason will attempt to use the default AWS credential setup in your environment.
Note that the AWS credentials specified here must have permission to read and write into the S3 buckets managed by the LTD Keeper server.
Credentials for LTD Keeper
- LTD_KEEPER_URL
URL of LTD Keeper instance.
- LTD_KEEPER_USER
Username for LTD Keeper instance.
- LTD_KEEPER_PASSWORD
Password for LTD Keeper instance.
Testing
Unit and integration tests are available.
Unit tests
Developers can run unit tests via pytest:
py.test
To run a full suite of AWS S3 integration tests, you’ll need AWS credentials and an S3 bucket to test in. Configure the tests to use these by setting the following environment variables:
- LTD_MASON_TEST_AWS_ID
AWS access key ID
- LTD_MASON_TEST_AWS_SECRET
AWS secret access key
- LTD_MASON_TEST_BUCKET
Name of an S3 bucket that already exists and can be used for testing.
Integration tests
We have separate integration tests to exercise code that interacts with AWS S3 and ltd-keeper. See integration_tests/README.rst for instructions on how to run these integration tests.
Release Procedures
LTD Mason is distributed with PyPI at https://pypi-hypernode.com/pypi/ltd-mason/. Follow this procedure to create a new release:
Ensure the version in setup.py is correct. Use x.y.z.devN for development versions.
Test the metadata:
python setup.py check --metadata --restructuredtext --strict
Build the distributions:
rm -R dist python setup.py sdist bdist_wheel
Upload the distributions with twine:
twine upload dist/*
Copyright 2016 AURA/LSST.
License: MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ltd-mason-0.1.0.dev0.tar.gz
.
File metadata
- Download URL: ltd-mason-0.1.0.dev0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8edea0130ca059847b15a39a23c53965ec93dcad496e649560cbbb571d40911a |
|
MD5 | b09b599b3782b092b7056e64abc93a1f |
|
BLAKE2b-256 | 5b0966caf5747adbb54618fa240c6384c69696c8d37f0b2221c790dd9fb2574a |
File details
Details for the file ltd_mason-0.1.0.dev0-py3-none-any.whl
.
File metadata
- Download URL: ltd_mason-0.1.0.dev0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25d0e358cf18f93ccf54c002e751537659f2d6606644aa66348667f2fbb7ba9a |
|
MD5 | 2eb76e20ca9241103cea98280d2ff3a8 |
|
BLAKE2b-256 | 61bb4ee721d38520a340af6cdde51b1b0445a49330d1ba4af140c206c23b6418 |