Commit Graph

58 Commits

Author SHA1 Message Date
Hervé Beraud fbe3f2fe7c Adding pre-commit
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: I7ac1599e903577e28fb64bb07a6b984e1ff8a023
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-15 15:05:13 +02:00
Hervé Beraud 24fc79fe24 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: I453515f347a59f4c6f60e0dcba2c327cf2a40426
2020-08-17 17:43:44 +02:00
Andreas Jaeger 7ee77130c4 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I5f985549671e3b4f8c438f247fae0818d25b21f5
2020-05-29 12:45:49 +02:00
Andreas Jaeger ae0833ad9f Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Change-Id: I621cc7f472e2666d3422113675b18d838688a434
2020-03-30 12:03:26 +00:00
Andreas Jaeger 06d7ac27b7 Update docs building
Use sphinx-build and cleanup unused config.
Switch to openstackdocstheme 1.20.0 and remove obsolete settings from
conf.py files.

Update some RST files, they had wrong indentation.

Change-Id: Iaad2841db809f8a343fb8b1031cf8d0587d70442
2019-08-11 09:48:06 +02:00
Andreas Jaeger 0ebc4cc42e Update hacking
Update hacking requirement to current 1.1.0 release.

Change-Id: Ieddf10f6876dc8a85bf3c92c321fa0a610f685b7
2018-12-11 08:19:26 +01:00
Vu Cong Tuan 500911422f Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Ibbad6f4e63efbef4e2e144f3ba4218ce6579371a
2018-07-11 13:10:05 +07:00
OpenStack Proposal Bot 675f242c30 Updated from global requirements
Change-Id: I7a5b257f365dd708d6eb5d4d5c3a5dd1a8c78a25
2018-01-24 01:22:22 +00:00
OpenStack Proposal Bot 551cb5a46a Updated from global requirements
Change-Id: I480dbe933ad55beae31e6e492aada5a01cd2fc76
2017-09-16 23:21:07 +00:00
OpenStack Proposal Bot b27a4d2103 Updated from global requirements
Change-Id: Ib4c1d1cde60c67ab31de987eb05877ff76d55c80
2017-09-13 12:59:50 +00:00
OpenStack Proposal Bot 370698d1a5 Updated from global requirements
Change-Id: I8a34b0533b518fd7ada5863b9ff2a82c27609ee4
2017-09-11 21:46:07 +00:00
OpenStack Proposal Bot 4e5a167b2f Updated from global requirements
Change-Id: Iefe4c95a065a56401f05fd80ad1a48874409a259
2017-08-18 11:39:07 +00:00
OpenStack Proposal Bot fe469cca54 Updated from global requirements
Change-Id: I5530c4ba801aeb5903b48e0c3c810d83d8d6227a
2017-08-18 04:49:13 +00:00
OpenStack Proposal Bot f87192cc77 Updated from global requirements
Change-Id: I856a9a643e7fe58eef2a2fe21a4f48255f495330
2017-07-27 19:18:42 +00:00
Andreas Jaeger c3bf1aa507 Switch to openstackdocstheme
Update to use current openstackdocstheme everywhere instead of
oslosphinx, remove now obsolete settings.

Change-Id: I812f72ebf9fb4d96b1031880c44596833da9d384
2017-06-27 22:59:01 +02:00
OpenStack Proposal Bot 58eeb19133 Updated from global requirements
Change-Id: I4a89feb028462f0d3d79528d3827c1b085a157f4
2017-06-27 12:19:18 +00:00
OpenStack Proposal Bot 2df1a73033 Updated from global requirements
Change-Id: I4fb63c1b6a7f8d671f2e5c47216ebb2cfbedea20
2017-06-05 12:49:40 +00:00
Brian Moss d3bc42483a Update sitemap tests
- add py3 to tox.ini (gate already tests py3)
- move all tests to $GITROOT/test so they can all run
  through testr
- add scrapy to test-requirements.txt to support sitemap tests
- move tests from test_items.py to test_sitemap_file.py
- fix broken sitemap tests
- add newton to list of old releases in sitemap_file.py
- ignore flake8 H101 as it returns false positives for Sphinx conf.py
- Use openstackdocstheme for docs
- Update sitemap README
- Restructure repo docs
- fix minor style issues

Change-Id: I22c018149b2eefde6ca5c38c22ac06886fe9a7a8
2017-04-29 10:36:27 +10:00
OpenStack Proposal Bot e71cc262c9 Updated from global requirements
Change-Id: I4ec27508e1f87695193f3e73a947fc1d967a8996
2017-03-03 00:02:15 +00:00
Andreas Jaeger f52c24fd22 Update hacking
Update hacking to current version as defined in global requirements.

Change-Id: I8ab0d9dd352997a2674cf42b1002bd06cb6aa4a6
2017-03-01 19:40:13 +01:00
OpenStack Proposal Bot 51e3476e22 Updated from global requirements
Change-Id: I7b7b3bacd672fd3015e0643bf6648e3965263359
2016-11-02 15:38:34 +00:00
OpenStack Proposal Bot 85348f194e Updated from global requirements
Change-Id: Iae627a1151c2aecf2716997d1fe2cd2de9babb16
2016-09-27 10:05:54 +00:00
Andreas Jaeger ceb8afd1c1 Increase hacking version
Sync with global-requirements.

Change-Id: I86ea995c2fab39819f29af3509321ada36ab78f6
2016-09-22 09:15:58 +02:00
Percila c050836a8f doc-tools unit tests
Renamed sitemap file to avoid module name conflict
when importing at the sitemap unittest

Added py.test tox environment

Change-Id: I94480e374b29802414b62591a51c04ecd804905e
Closes-Bug: #1387716
2016-08-03 07:05:51 +00:00
OpenStack Proposal Bot bb5061ddd7 Updated from global requirements
Change-Id: I19f150c88bbad6e1a64910be76d4781b2f22fe13
2016-06-24 03:16:04 +00:00
OpenStack Proposal Bot 4306880466 Updated from global requirements
Change-Id: I17cd6c2550e227e5ccb6c727f292829a8871f573
2016-06-22 20:01:20 +00:00
OpenStack Proposal Bot 84f55df9f8 Updated from global requirements
Change-Id: Ibe273f9ab62a41bcfd372c188077a7b9a2e912eb
2016-06-21 18:03:54 +00:00
OpenStack Proposal Bot 268ee9250a Updated from global requirements
Change-Id: I7343616293339157466753b1e2dc444786c24840
2016-05-03 16:01:45 +00:00
Christian Berendt 4396ade948 Add docs environment
Change-Id: I93deef31ab30b1ce46c35f9c39242adfc4a3ae83
2016-04-29 23:30:43 -05:00
OpenStack Proposal Bot 7ea67f3175 Updated from global requirements
Change-Id: I88f87eeb9d0674d30525ef6843c052623e651eeb
2016-04-07 17:12:36 +00:00
Andreas Jaeger d1f1ea7305 Remove unused requirements
Argparse is not needed, adding it was a workaround. Remove it again
and remove testtools as well.

Change-Id: I6459a17d7ccd89805cfbcfbd0ceeeec7fa395312
2016-01-20 12:29:55 +01:00
OpenStack Proposal Bot 3b65a14889 Updated from global requirements
Change-Id: I81f652f580cebb0e8785e441e3b2809a2d3757f5
2016-01-16 03:30:41 +00:00
Andreas Jaeger 1c3a82d818 Add testrepository to test-requirements
Current python packages do not install this automatically, add it so
that our toolchain works - pbr needs it.

Change-Id: I21c8ae3bcf3d2eb6a009331ce7457a6341d1ee8f
2015-12-26 11:12:10 +01:00
OpenStack Proposal Bot 5699190cec Updated from global requirements
Change-Id: I5111562e303a3add64edb3d7a3c1dfea968b8e81
2015-12-08 12:39:09 +00:00
OpenStack Proposal Bot 47481e2624 Updated from global requirements
Change-Id: Iec593e1da873b21e08ca6d3de93d15e3edcff611
2015-11-19 15:59:54 +00:00
OpenStack Proposal Bot b5075a8136 Updated from global requirements
Change-Id: Id6371f6c5a7a81a35ff85297a639f13672f44273
2015-11-09 12:32:55 +00:00
Andreas Jaeger 4c77a32ada Add reno for release-notes
Add renote to automatically generate release notes - the same way other
OpenStack projects do it.
For details see
http://lists.openstack.org/pipermail/openstack-dev/2015-November/078301.html

Change-Id: I9789c5e21d8594593fc5536562a01644c6d63eef
2015-11-07 17:10:06 +01:00
OpenStack Proposal Bot 817e8db177 Updated from global requirements
Change-Id: I2ca92df8f88cb3b6d0d058b8018130049a0a6ed0
2015-07-15 01:36:05 +00:00
OpenStack Proposal Bot 1de9be90a1 Updated from global requirements
Change-Id: I944acbdbb6ba74e8f68eb110c40a1169f85dc363
2015-06-22 08:26:37 +00:00
OpenStack Proposal Bot 32ee302e2e Updated from global requirements
Change-Id: I2c460838f676eaa2f408bb1e75474237e4c2335a
2015-05-07 23:36:16 +00:00
Andreas Jaeger f5f53acae8 Update to hacking 0.10
Update version of hacking.

To pass our gates with the new hacking version, remove author tags.
Note: hacking needs to be manually synced.

Change-Id: I8a4db46a8df2f1e8d1cd22ae6ac421d55ac9ccce
2015-01-13 09:04:27 +01:00
OpenStack Proposal Bot 4fb00fb814 Updated from global requirements
Change-Id: Ia08d40173ce0f4ab69975a269f5946f37b47c1c0
2014-11-13 19:22:37 +00:00
OpenStack Proposal Bot c5f4621e66 Updated from global requirements
Change-Id: I12b8c0a7e35ec8e7b683c6bd90eca35039496e56
2014-11-08 14:22:57 +00:00
Gauvain Pocentek 5324dfe7de Provide the hotref sphinx extension
This extension simplifies the generation of hyperlinks referencing HOT
resources in the hot-reference book. It will be used in the hot-guide.

Change-Id: I382b5960733bec9b96924475887b02c8b1b01ea6
Implements: blueprint heat-templates
2014-09-06 14:11:44 +02:00
Andreas Jaeger b2286d33d6 Warn against sorting requirements files
Change-Id: Ie8eb32ff31dfb6440f7f48f3d1a05c7368d4604c
2014-09-04 06:14:44 +02:00
OpenStack Proposal Bot 8244a6a2a1 Updated from global requirements
Change-Id: Ibae57e31a362901c90648cf605fd1313c3f79193
2014-08-18 18:31:11 +00:00
Andreas Jaeger 94849df097 Fix issues found by bashate and include in gating
Cleanup shell scripts to pass bashate testing.
Add bashate check to pep8 check target.

Change-Id: I49b9ab1e352378a43f82a4e1f5db02a8dae99d27
2014-08-17 15:17:30 +02:00
Andreas Jaeger 175e79ebf7 Run doc8 as part of pep8 test
Fix all issues found and enable doc8 run.

Change-Id: I1b3fc9ac3db5e2d1dfa138b026e26835ead4d7fb
2014-08-17 06:51:54 +02:00
Christian Berendt 6b609001b3 Bump hacking to version 0.9.2
Change-Id: Ia4e8cbe0bece7d2f567d3064f97b4731057f5046
2014-07-16 14:11:18 +02:00
OpenStack Proposal Bot 3011f63c15 Updated from global requirements
Change-Id: I2555e916f8f69ecdc326e28322f46c1aad97a425
2014-06-18 00:45:28 +00:00