Commit Graph

9 Commits

Author SHA1 Message Date
Ian Pittwood a002e4203d Separate plugins from Spyglass
This change removes plugins from Spyglass and places them in separate
repositories. Formation, a proprietary plugin, will be removed by this
change and Tugboat will become its own OpenDev maintained repo,
spyglass-plugin-xls. By creating more streamlined plugin management,
end users should be able to more easily create their own plugins for
different data sources.

Related change https://review.opendev.org/#/c/659116/

Depends-On: Ib2f75878b1a29e835cb8e2323aebe9d431c479e7

Change-Id: Ie0eb2e5aefe6bb764e1aa608e53371adaabb9a17
2019-05-29 10:30:14 -05:00
Ian Pittwood 3396b9fa0e Removes remaining yapf: disable statements
The initial addition of yapf into Spyglass caused a few alignment
issues that were temporarily fixed by disabling yapf. This change adds
a knob to the yapf configuration that causes long function statements
to always break before the first statement. This results in more
consistent, visually pleasing code.

Change-Id: I18f9a7677c61524fed12e71a2ecf1003a6ee0ad9
2019-05-14 12:30:29 -05:00
Ian H. Pittwood 7cf016e05f Add yapf configuration file
Some of the default behaviors of yapf do not match the styling
preferences of Airship and OpenDev, such as line breaks between
dictionary key/value pairs. This change sets the style template for yapf
(PEP-8) and sets a few knobs to help remedy problematic behavior.

Adds .style.yapf configuration file.

Updates styling of existing files using new configuration.

Change-Id: Ifea58ef2d7be93f47dd8e4f42cac6aea514b83bd
2019-04-29 15:37:25 -05:00
Alexander Hughes 3bf68e464a PEP-8 code styling and linting
As a newer project, Spyglass is still a work in progress in terms of its
styling. This change is meant to help improve readability and compliance
of Spyglass source code.

To match other Airship projects, this change implements YAPF into tox so
linting is automatically ran. This will hopefully keep formatting grey
areas styled consistently.

PEP-8: https://www.python.org/dev/peps/pep-0008/

OpenStack Style Guidelines:
https://docs.openstack.org/hacking/latest/user/hacking.html

PEP Index: https://www.python.org/dev/peps/

Depends on https://review.openstack.org/#/c/648764.

Change-Id: I45b19cc8a7932fd7823dcb69f64a0a1bf19fc434
2019-04-22 18:46:48 +00:00
Alexander Hughes 03a058bfcf Various fixes to Spyglass to resolve tox errors
The tox configuration needs to be updated in order for it to be helpful
for Zuul. This change makes some minor modifications to the tox config
to improve its usability and uniformity with other Open Stack configs.

Makes bare minimum changes for pep8 tests compliance.

Adds gate scripts for white space linting.

In the future, additional changes will need to be made to add tests to
Spyglass. These changes will need to enable the 'py36' and 'cover' tox
env and set coverage levels. Additional linting should also be
performed to improve Spyglass code readability and organization.

Change-Id: I73f946619786e661d02c69bd8e197453f049e0c7
2019-04-16 12:22:53 -05:00
Ian Pittwood 8a39a6fd17 Resolves Bandit 101 errors from misusing asserts
From Bandit's docs:
It was discovered that some projects used assert to enforce interface
constraints. However, assert is removed with compiling to optimised byte
coden (python -o producing *.pyo files). This caused various protections
to be removed. The use of assert is also considered as general bad
practice in OpenStack codebases.

Change-Id: Ie2b5e9cc3e1afcf9e9bd0f8675947754fa1e4b7d
2019-04-09 19:47:13 +00:00
Tin Lam 89dfec7b4c Add gate
This patch set puts in a rudimentary gate.

Change-Id: I3a2466bd7be5352b46273b385d215913eb8079ba
Signed-off-by: Tin Lam <tin@irrational.io>
2019-04-04 19:25:58 -05:00
lijunjie dcf0735b08 Fix the misspelling of "configuration"
Change-Id: I7becd34e9b29ed73d79742f8a8bd8110f436a3e5
2018-12-27 15:26:41 +08:00
Purnendu Ghosh 4a8e2720e1 Base Code for Tugboat Plugin and Addition of config files, templates 2018-11-29 02:20:31 +05:30