Commit Graph

60 Commits

Author SHA1 Message Date
Takashi Kajinami cf27f03c79 pre-commit: Integrate doc8 and bandit
We also remove these unnecessary linter dependencies from
test-requirements.txt.

The independent bandit target was removed because it's integrated to
the pep8 target.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: I094897e6de223753a5a497ec42348e4449132b17
2024-01-30 16:00:04 +09:00
Takashi Kajinami ac181cec92 Bump hacking
hacking 3.0.x is too old.

Also, fixtures appears in both requirements and test-requirements.
Because this library is only used in oslo_service.fixtures for testing,
we can remove it from runtime requirements.

Change-Id: Iaf57598a73af62e07e890245dc51c9af6a807bd7
2024-01-27 18:49:56 +09:00
Hervé Beraud 4bff0d2d8b Bump bandit
Change-Id: I55ca7b1197d8c0d93a1037f175db7671c2ccb400
2023-05-17 11:37:17 +02:00
Hervé Beraud 10ce88ed2b 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: Ib18f38dbec90c62e870307bf22a8b4f193237bce
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-08 14:26:37 +02:00
Moisés Guimarães de Medeiros 99ed582f1b Bump bandit version
This patch bumps bandit allowed version to >=1.6.0,<1.7.0 in order to
avoid the errors detailed here https://github.com/PyCQA/bandit/pull/393

Change-Id: I44b8f01489e503df0813ecac32639dc96c8a1c98
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-24 17:36:41 +02:00
zhangboye 2e0ef272f8 Fix hacking min version to 3.0.1
Change-Id: I66d8f944a16ba72f4ce934eaf62ae5f03ab2aac4
2020-05-22 10:53:52 +08:00
Sean McGinnis 7d3578827d
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ic18f03681c14131217e3025e2cb0cca46ada84ee
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-20 09:29:01 -05:00
Andreas Jaeger b7dc0d72c9 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: I0564dc6c961a55387a430f095ed83b392a81c119
2020-04-02 15:07:51 +02:00
caoyuan d9ffc59031 Move doc related modules to doc/requirements.txt
Change-Id: I995f7c4e0152a19d2ae2890d6940419f30638444
2019-08-24 09:49:33 +08:00
chenke 6aa2b7159c Cap Bandit below 1.6.0 and update Sphinx requirement
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.

Sphinx 2.0 no longer works on python 2.7, so we need to start marking
it there as well.

Co-Authored-By: Hervé Beraud <hberaud@redhat.com>
Co-Authored-By: Ben Nemec <openstack@nemebean.com>

Reference:
https://github.com/PyCQA/bandit/pull/489

Related to Ibaa10b092b262e49435d35f093906bb75dc9762f

Change-Id: Ie3dd6c91c733b85c233213a1c6343009d5f34766
2019-05-14 20:46:18 +08:00
ZhijunWei 671cbd6024 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I8bb814f8db8c87ba6b757be482d79d40548a137d
2019-02-13 17:08:38 +08:00
Vu Cong Tuan ebad161c89 Convert oslo.service to using stestr
With the upgrade to oslotest 3.6.0 [0], testr no longer works [1].
This is because oslotest no longer requires testr and we don't depend
on it directly in oslo.service. Let's switch to using stestr, too!
Everyone's doing it...
This patch follows [2] in oslo.policy

[0] d5a3c58f71
[1] 897823fbd6
[2] https://review.openstack.org/#/c/579295/

Change-Id: Ia82a17fe26b41730c8c323819591523d66a8cb36
2018-07-04 08:39:21 +07:00
Dirk Mueller eaf624211d Add test dependency on requests
oslo_service/tests/test_wsgi is explicitly and directly using
requests, so depend on it

Change-Id: Iaf827c04c1923ba1dab8f25bdc77e60c3c36a435
2018-05-30 08:49:11 +02:00
OpenStack Proposal Bot a58e4242f8 Updated from global requirements
Change-Id: I2cb32f6418eafc3db4b87df44c07ef161f0451ec
2018-01-27 18:26:10 +00:00
OpenStack Proposal Bot 3172cb2daf Updated from global requirements
Change-Id: I5cb91020bda1629d3ae5a7988939051b2eddb663
2018-01-16 04:27:56 +00:00
OpenStack Proposal Bot 1a973c42cf Updated from global requirements
Change-Id: I8026d48914d6d0cb339aa69e8910d999b604c611
2017-09-16 23:22:18 +00:00
OpenStack Proposal Bot 23fb4a8129 Updated from global requirements
Change-Id: I2466898630dbb99fd677d523df5d60fbf324227c
2017-09-13 13:01:06 +00:00
OpenStack Proposal Bot 66ee21329a Updated from global requirements
Change-Id: I427a8e733eff6e9bef54a2489dbc71832e26af34
2017-08-18 11:40:24 +00:00
OpenStack Proposal Bot 986a41baed Updated from global requirements
Change-Id: I6171ff2ec40fb265884568dee25519f68cbfd529
2017-08-18 04:50:27 +00:00
OpenStack Proposal Bot f250d729e9 Updated from global requirements
Change-Id: Idb0c6e001044855f8bf850816af319ce2960ae73
2017-07-27 19:19:57 +00:00
Akihiro Motoki 343ce056ea switch from oslosphinx to openstackdocstheme
Change-Id: I068331d11e661ed28001607d66a761292699026c
2017-07-01 19:11:26 +09:00
OpenStack Proposal Bot ca3a40a3df Updated from global requirements
Change-Id: I6af7ed52f97baa8ed5528c56636d3309c682b392
2017-06-27 12:20:33 +00:00
OpenStack Proposal Bot b5ef78ae14 Updated from global requirements
Change-Id: I1ec70ee9213bc234295957f45327d9f4f72387d0
2017-06-02 22:05:40 +00:00
OpenStack Proposal Bot ec2820e0c6 Updated from global requirements
Change-Id: I02ffc1d5974d1c5303e155768c7158dfc8e66926
2017-05-20 04:43:25 +00:00
OpenStack Proposal Bot 8ba069a036 Updated from global requirements
Change-Id: I037c0d8c86258ff6d5fb0a43a981659cae33e28f
2017-05-15 00:53:12 +00:00
OpenStack Proposal Bot 0099d768f6 Updated from global requirements
Change-Id: I83b221c4eaa7e10127955321c85439294a10292d
2017-03-03 00:03:22 +00:00
ricolin 7b540dfbf2 [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: Ia99ace49991a7bced6169f024e32832f1b190588
2017-03-02 18:31:57 +08:00
OpenStack Proposal Bot dc9e443cc9 Updated from global requirements
Change-Id: Iab93c839e13e2a3e8a8ebcfe6aa7675013e2170d
2017-02-10 05:57:59 +00:00
OpenStack Proposal Bot 4a38e16f0e Updated from global requirements
Change-Id: Ib48ccd89abf0a8938f8bc601b21f072bfb26aafa
2016-11-02 15:39:28 +00:00
OpenStack Proposal Bot 6f08d3a2c9 Updated from global requirements
Change-Id: I18ebd25c7b13199f7018789683702518e75c16e7
2016-10-27 12:21:29 +00:00
OpenStack Proposal Bot 61b5ef5d30 Updated from global requirements
Change-Id: Id6365892164a0c2860523daef09ec77d2405f5e2
2016-09-28 16:59:50 +00:00
OpenStack Proposal Bot da31eeee5a Updated from global requirements
Change-Id: Ib4e67335871dc5593859389e83e549f02d07131d
2016-09-27 10:06:37 +00:00
Jenkins ac9ac3a498 Merge "Add reno for release notes management" 2016-09-20 11:35:51 +00:00
OpenStack Proposal Bot 9df6088a41 Updated from global requirements
Change-Id: I0813c3dcacb0c9ad1405f1e53efc48d3c7740a75
2016-08-18 05:56:02 +00:00
Kirill Bespalov 39760084ae Add reno for release notes management
An initial patch to add reno and create a base directory for
release notes

Change-Id: I0250a698b789568a86705be585fc1b01c831aed0
2016-06-30 10:02:49 +00:00
OpenStack Proposal Bot e7317d7f44 Updated from global requirements
Change-Id: Ia9e72128ca8fb376a7e11399a55576713fc87f35
2016-06-21 18:04:39 +00:00
OpenStack Proposal Bot 241e19661b Updated from global requirements
Change-Id: Ia82b3b9aebb94f62ba4c8afc1a8801114db8ffdc
2016-06-03 18:18:14 +00:00
OpenStack Proposal Bot 9143d0cb14 Updated from global requirements
Change-Id: Ia220f15c252b10c549045cb114257cf46b8d5e41
2016-05-31 03:05:32 +00:00
OpenStack Proposal Bot 1083a7f242 Updated from global requirements
Change-Id: I8785c5d071d245d85438ba90019dd38c2e5000eb
2016-05-30 00:38:28 +00:00
OpenStack Proposal Bot 14eda53c74 Updated from global requirements
Change-Id: I93df868b8ea44843624d419e6cf321ae4f09ae6d
2016-05-26 17:04:09 +00:00
OpenStack Proposal Bot 96ccba8416 Updated from global requirements
Change-Id: I0272852f8b92ae7b43f7a4b6a5304104aed5599a
2016-04-28 16:16:20 +00:00
OpenStack Proposal Bot 9a2e79226b Updated from global requirements
Change-Id: I472ad19732eac8dc819fe179c478ecee37552392
2016-04-08 00:32:21 +00:00
OpenStack Proposal Bot 2d1a419341 Updated from global requirements
Change-Id: I6845caf6868fe5c8c64883e2ba25afd8e23e3152
2016-02-04 18:59:10 +00:00
OpenStack Proposal Bot 1bd01f4939 Updated from global requirements
Change-Id: I7172c089d9d9eccd77f3268078f476dd3038c846
2016-01-17 01:15:01 +00:00
Elena Ezhova 1c763f2285 Add Bandit to tox for security static analysis
Bandit is a tool designed to find common security issues in
Python code. This change adds a bandit target to tox.ini.

The config file bandit.yaml was generated using bandit-config-generator

Run bandit:
    tox -e bandit

Change-Id: I3bd64e1e58d4dc460ce869c50818e9913fe1b9b8
2015-12-01 16:10:15 +03:00
Jenkins 5c927520e0 Merge "Add functionality for creating Unix domain WSGI servers" 2015-11-26 23:00:54 +00:00
OpenStack Proposal Bot bb92634d76 Updated from global requirements
Change-Id: Idb98597961b6b7cb794493e347238467d103ca72
2015-11-19 16:00:37 +00:00
Elena Ezhova 9d8acfb38e Add functionality for creating Unix domain WSGI servers
This change modifies WSGI Server to allow creating Unix sockets
along with ip sockets. This would allow consuming projects to use
wsgi.Server to start Unix domain WSGI servers too, and thus get
rid of duplicating code.

Change-Id: I3de23efcd661b95cce6bbd1aa2c94abf0c814dbe
2015-11-18 17:35:16 +03:00
Joshua Harlow 91a92f0db1 Add doc8 to py27 tox env and fix raised issues
Fixes a bunch of long lines and ensures that doc8
will not complain about any future issues by adding it
to the commands performed during running the py27 tox
environment.

Change-Id: I9ae2f2a05a408dbfe105bf38ea0ae235701fbe0e
2015-10-15 16:54:33 -07:00
Ronald Bradford fddca3b272 Fix coverage configuration and execution
A number of configuration errors prevent the successful creation of code
coverage. This corrects the .coveragerc source/omit setup and the tox
package name generation.

Change-Id: I966bf06550c20d6977fff659264a5a7d021b260f
2015-10-01 19:48:34 +00:00