Commit Graph

11 Commits

Author SHA1 Message Date
Takashi Kajinami 897f088ec9 Bump hacking
hacking 3.0.x is too old.

Change-Id: Ie182c4501004d8b6fdb735376fe53073ec2e730e
2024-01-26 01:14:48 +09:00
Ghanshyam Mann 9d3bb03fc8 Fix lower-constraints job
oslotest 1.5.1 is restricted to pbr <1.0 which conflict
with other deps lower constarint for pbr.

Error:
The conflict is caused by:
    oslo-i18n 3.15.3 depends on pbr!=2.1.0 and >=2.0.0
    oslo-serialization 2.21.1 depends on pbr!=2.1.0 and >=2.0.0
    oslo-utils 4.5.0 depends on pbr!=2.1.0 and >=2.0.0
    oslotest 1.5.1 depends on pbr!=0.7, <1.0 and >=0.6

https: //zuul.opendev.org/t/openstack/build/cb2bce3b4e004601958b764dfd0737b8
Change-Id: I513262b85a57ce9f81a63bd778fdd7f7be27e485
2020-12-07 14:24:37 -06:00
Ghanshyam Mann c705067278 Add common checks for json to yaml policy file migration
As part of community goal[1] for migrating the policy file
from JSON format to YAML we need to add upgrade check to
detect any JSON formatted file. That check needs to be
done in each service side which are deprecating the JSON
format. So to avoid duplicate code, this commit add that
check in oslo_upgradechecks and that can be enabled from
service side during they migrate to YAML format.

Service will enable it like below:

    _upgrade_checks = (
        (_('Policy File JSON to YAML Migration'),
            (common_checks.check_policy_json, {'conf': CONF})),
    )

Also modify the check() method to accept the **kwargs for checks.

[1] https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ifa71c20879c964f794a40b981744d95db4ab1602
2020-11-21 19:11:55 +00:00
Hervé Beraud 85abe44233 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: I8d5290d62b12a7850fc932c3778cc37951dd67ed
Co-authored-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-03 14:10:56 +02:00
Andreas Jaeger b93610d0e3 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Ignore W504 line break after binary operator

Change-Id: Ice5627d714bad308bcf2e467a553d2d2297ea337
2020-03-30 12:03:13 +00:00
caoyuan c80448dd8b Move doc related modules to doc/requirements.txt
Change-Id: I3d2e5e2322ac8374881f76217e35792efeea073a
2019-07-06 01:31:31 +08:00
jacky06 18781536c6 Sync Sphinx requirement
Sync sphinx dependency with global requirements. It caps python 2 since
sphinx 2.0 no longer supports Python 2.7.

Change-Id: I676fdc12fe0bb1278754d6f21c6a113b4182186f
Closes-Bug: #1831406
2019-06-03 11:16:20 +08:00
Stephen Finucane d6278ce104 doc: Switch to openstackdocstheme
No reason to still be using oslo.sphinx in this day and age.

Change-Id: I7734f9a636b5435f70659f8bd3d0c2b7e49c78d6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2018-12-13 14:44:52 +00:00
Ben Nemec a5039dae1d Add reno support
Change-Id: I05e50ae0b6e96e2d793dcd14d76ac0f990d88e36
2018-10-09 21:56:06 +00:00
Ben Nemec 574fd4d3ef Migrate to stestr 2018-09-13 15:50:37 +00:00
Ben Nemec d671294399 Initial commit 2018-09-12 17:35:58 +00:00