This patch addresses inconsistent code style and enforces it with a
gate for future submissions.
Separate work will be done in the future to address several of the
PEP8 ignores for docstrings, and attempt to bring the tests directory
to PEP8 compliance.
This patch:
1. Updates .style.yapf to set the knobs desired for YAPF.
2. Updates tox.ini to allow one of the knobs to work.
3. Removes unused code from several __init__.py files.
4. Updates the YAPF version in test-requirements.txt to latest (this
is needed for several knobs to work).
5. Stylistic changes to the python codebase in Pegleg.
6. Updates to tox.ini to run YAPF during PEP8 check.
Change-Id: Ieaa0fdef2b601d01c875d64b840986e54df73abf
Added a force-cleartext option (false by default) which forces
passphrases to be generated in cleartext rather than encrypted.
Change-Id: I157a40103f67f85a24976b4f59aa46f2d4b92334
This patch set expands on the unit test coverage for lint checks
in test_selectable_linting which only covers a small subset of
the lint checks handled by Pegleg. This logic should be properly
tested as linting is fundamental to Pegleg functionality.
Change-Id: I6a59295982abd22bba8036827cefd4186b68e2fb
This patch set changes Pegleg in two similar ways:
1) Ignore certain types of files altogether:
- those located in hidden folders
- those prefixed with "." (files like .zuul.yaml)
2) Only read Deckhand-formatted documents for lint/collect/etc.
commands as Pegleg need not consider other types of documents
(it separately reads the site-definition.yaml for internal
processing still).
The tools/ subfolder is also ignored as it can contain
.yaml files which are not Deckhand-formatted documents,
so need not be processed by pegleg.engine.
Change-Id: I8996b5d430cf893122af648ef8e5805b36c1bfd9
It looks like there's a missing % in pegleg/engine/util/definition.py, where
pluck creates its ClickException. This adds it in.
Change-Id: I26c12423af11f7d02944a077f762bcdd1e03be41
This patch set simplifies some code related to site_by_params
by allowing it to take an iterable argument called *fields
which specifies exactly which parameters to include from
the site-definition.yaml. This means that no hard-coding
is required to manually filter the params into the exact
parameters required by follow-up function calls. This is
done for better code maintenance.
Change-Id: Ief6483dfbf3759204106330284e8e9b824b5567e
With the implementation of revisioned repository to the CLI in
https://review.openstack.org/#/c/577886 there was a change to
the lint command [0], which changed it from being a global lint
to a site-level (targetted lint)... kind of: Only the CLI logic
was modified to support targetted single-site linting. Thus,
the first issue this patch set addresses is implementing the
back-end logic to realize targetted, single-site linting.
The second issue this patch set addresses is re-supporting global
linting (linting all sites within a repository) which means that
this partially reverts [0] which had (kind of) replaced global
linting with per-site linting.
So, this patch set:
1) Implements targetted, single-site linting back-end logic
2) Re-implements global linting for all sites in a repo
3) Adds unit tests for both
4) Adds some helper functions to util.engine.definition to
help with 1) and 2)
[0] https://review.openstack.org/#/c/577886/4/src/bin/pegleg/pegleg/cli.py@191
Change-Id: I5147282556763d93dfaf06912d2c4c876e1bd69f
This patch set removes Pegleg stub logic from the CLI and engine
because:
1) It's currently broken following revisioned repository support
with https://review.openstack.org/#/c/577886/
2) The functionality isn't used anywhere in Airship, either upstream
or downstream
3) The functionality is, in any case, obsolete following the
revision repository change
As such, it is better if we simply remove the stub logic out for
now and revisit the implementation later, once the requirements
for it are fully fleshed out to align with modern Pegleg architecture.
Change-Id: If82b91bcdd39555596f2a4003bfda0167142fddd
This patch set standardizes the Pegleg directory
structure because of the following reasons:
1) src/bin/pegleg is not necessary and only makes
building (e.g. documentation building) and running
of tox targets unnecessarily difficult.
2) src/bin/pegleg is a Java-like standard that
bears no relevance to Python.
Change-Id: I37d39d3d6186b92f8fbfe234221c9e44da48cf10