requirements/tools
Stephen Finucane 258e59dd69 Group requirements into sections and sort
We add the script used to do this. This script will grow in complexity
in future changes as we add logic to e.g. remove old version constraints
that are no longer necessary. There's probably more sorting to be done
here, but that can always be tacked on with a follow-up.

Psst, reviewers: you can ensure we haven't lost/gained any dependencies
with this little script:

  #!/usr/bin/env python3
  import pathlib
  import subprocess
  import sys

  previous = subprocess.check_output(
      ['git', 'show', 'HEAD~:global-requirements.txt']
  ).decode(sys.stdout.encoding)
  current = pathlib.Path('global-requirements.txt').read_text()

  assert sorted(
      x for x in previous.split('\n') if x and not x.startswith('#')
  ) == sorted(
      x for x in current.split('\n') if x and not x.startswith('#')
  )

We haven't checked _this_ in since it's trivial and not broadly useful
here.

Change-Id: If836960167fe66534034a8a512ea63553649c3ff
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-17 12:05:50 +01:00
..
README.txt Remove requirements-integration job 2019-11-12 11:02:50 -06:00
babel-test.sh Babel Integration tests 2016-04-24 17:21:18 -05:00
build_wheels.sh Add a bashate tox environment and address errors 2017-09-28 12:09:04 +10:00
cap.py Fix "wrap functions with 2 blank lines" pep8 check 2016-11-16 18:52:03 +08:00
check-install.py Remove six 2024-01-24 15:49:09 +01:00
code-search.sh [tools] Add a tool to grep local repos 2018-01-10 11:59:08 +11:00
cruft.sh Replace openstack.org git:// URLs with https:// 2019-03-24 20:36:01 +00:00
fix-lower-constraints.py Fix typo in fix-lower-constraints.py 2018-06-07 12:30:41 -04:00
functions Add tool to generate a health report for all reqs 2020-05-08 11:14:54 -05:00
get-health-report.sh Add tool to generate a health report for all reqs 2020-05-08 11:14:54 -05:00
grep-all.sh [tools/grep-all] Hide eol releases by default 2018-09-12 13:26:19 +10:00
lint.py Group requirements into sections and sort 2024-04-17 12:05:50 +01:00
list-unused-packages.sh Add tool to generate a health report for all reqs 2020-05-08 11:14:54 -05:00
noop-change.sh [tools] Add a tool to make a no-op change 2017-10-12 13:42:59 +11:00
publish_constraints.sh [tools] include newton-eol in tools/publish_constraints.sh 2018-02-14 18:42:23 +11:00
what-broke.py Remove six 2024-01-24 15:49:09 +01:00

README.txt

OpenStack Requirements tools.

This directory contains a number of tools that are useful to the requirements core team and OpenStack
developers.

babel-test.sh
-------------
A tool check for regressions with new Babel releases.

build_wheels.sh
---------------

Generate wheels for all of the requirements, ignoring any packages
that won't build wheels so we get as many as possible. This is meant
to be used on a development box combined with devpi and a wheelhouse
configuration setting for pip, such as described in
https://www.berrange.com/posts/2014/11/14/faster-rebuilds-for-python-virtualenv-trees/

cap.py
------

Take the output of 'pip freeze' and use the installed versions to caps requirements.

check-install.py
----------------

Used in tox environment pip-install.  Only installs requirements (as opposed to
test-requirements and verifies that all console-scripts have all modules
needed.

code-search.sh
--------------
Assuming you have a set of local git repos grep them all for interesting things.

cruft.sh
--------

This script, when run from the root directory of this repository, will search
the default and feature branches of all projects listed in the projects.txt
file for declared dependencies, then output a list of any entries in the
global-requirements.txt file which are not actual dependencies of those
projects. Old dependencies which were removed from projects or which were used
only for projects which have since been removed should be cleaned up, but many
entries likely represent recent additions which still have pending changes to
add them to one or more projects. In most cases, git pickaxe will yield the
answer.

grep-all.sh
-----------

List a requirements specification and constratint for a given libarary

noop-change.sh
--------------

Generate a bulk no-op changes in supplied projects.  Useful if we have a risky
change in global-requirements or upper-constraints and we want to test impacted
projects.

publish_constraints.sh
----------------------
Used in the gate!  Generate the constraints files from git for publishing to a
static server.

what-broke.py
-------------
figure out what requirements change likely broke us.