Commit Graph

11 Commits

Author SHA1 Message Date
Ian H Pittwood dae192efc6 Upgrade yapf to 0.28
Upgrades yapf to newest version, 0.28.0, and runs the formatter to
update all existing code.

Adds entry to .gitignore to ignore pyenv installations.

Change-Id: I11512a8a522cc530165461cc8f52f7ff010dd092
2019-08-14 19:15:04 +00:00
Ian H Pittwood fd3d935941 Restructure plugin base
This change makes some mild restructuring and naming changes to the
data-extractor plugin base. Data extraction will now be separated into
two main workflows: loading raw data and source specific parsing into
model objects. Naming of methods was changed to help more accurately
reflect their function in these workflows.

Change-Id: Ia3bc892994ff96cce5c1672fadf35ef2d1c4164b
2019-07-18 12:26:46 -05:00
Ian H. Pittwood b3f1e59148 Use init to configure plugins
Plugins currently use a couple configuration methods to set up field
data for the class. This seems superfluous. This change moves these
configuration steps into the init method so plugin classes can ingest
data as kwargs.

Here is an example of how the change will be implemented in plugins:
https://review.opendev.org/#/c/670171/

Change-Id: Ib26636f1eb4146902ee801af5bcce53d137be2ad
2019-07-15 21:08:57 +00:00
Ian H. Pittwood 4747222641 Implements data object models
This change implements data object models from [0] in data extraction
and parsing. The change results in minor modifications to the outputted
intermediary, which can be seen between these two example intermeidary
files [1].

This fully implements the data objects from models.py in data extraction
and parsing. A follow-up change will implement use of the data objects
in Jinja2. Temporarily, all objects will be converted to dictionaries
for generating documents from templates.

[0] https://review.opendev.org/#/c/658917/
[1] https://www.diffchecker.com/NnjjJrb2

Change-Id: Ifd867787aab541be5dabecf9f6026faa2ec7049e
2019-06-21 15:00:46 -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
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
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 e15045a6d3 Fix the misspelling of "configuration"
Change-Id: Ia5aa6e331cc6f29a94ff9b8898dd78273a41f85a
2018-12-27 15:25:11 +08:00
Purnendu Ghosh 4a8e2720e1 Base Code for Tugboat Plugin and Addition of config files, templates 2018-11-29 02:20:31 +05:30
Hemanth Nakkina 296705a0a5 Base code for spyglass
- Spyglass skelton with engine, site processor
- Spyglass data extractor with formation plugin
- Docker files and scripts to run spyglass
2018-11-28 15:19:43 +05:30