From e386f32566a85e77c3ba9a0d600d824bcc3fa35b Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 1 Apr 2019 15:09:26 +0000 Subject: [PATCH] Add a dedicated "lpimport" tox testenv To simplify the launchpadlib dependency installation for the storyboard-migrate utility, use a separate tox testenv specifically for this purpose and put that as its only additional runtime requirement. Name the testenv "lpimport" with the expectation that in time we may also rename the storyboard-migrate utility similarly (so as to disambiguate it from the Alembic migrations we rely on for database schema upgrades). Change-Id: I8bd36bf69c235c8957ae4a161fd22cbe80028cf4 --- doc/source/migration.rst | 4 ++-- requirements.txt | 3 +-- tox.ini | 7 +++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/source/migration.rst b/doc/source/migration.rst index 6cb8fa50..fd5778f4 100644 --- a/doc/source/migration.rst +++ b/doc/source/migration.rst @@ -79,7 +79,7 @@ Test Migration You can do this with the following command:: - tox -e venv -- storyboard-migrate + tox -e lpimport -- --config-file etc/storyboard.conf --from-project $PROJECT_IN_LAUNCHPAD --to-project $PROJECT_IN_STORYBOARD @@ -89,7 +89,7 @@ Test Migration `$PROJECT_IN_STORYBOARD` should be replaced the name of the project you are importing into in StoryBoard, for example `openstack/monasca`. - Two parameters of the `storyboard-migrate` command + Two parameters of the `storyboard-migrate` command used by `lpimport` allows for filtering by the tags associated to the bug. Both parameters accept a comma-separated lists of tags and they are mutually exclusive. diff --git a/requirements.txt b/requirements.txt index 10d30039..253f48c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,6 +29,5 @@ apscheduler>=3.0.1,<3.1.0 python_dateutil>=2.4.0 oslo.concurrency>=3.8.0 # Apache-2.0 oslo.i18n>=2.1.0 # Apache-2.0 -#launchpadlib # Only for migration python-swiftclient -openstacksdk \ No newline at end of file +openstacksdk diff --git a/tox.ini b/tox.ini index c2c0e693..4d1d81ee 100644 --- a/tox.ini +++ b/tox.ini @@ -72,5 +72,12 @@ basepython = python3 deps = bindep commands = bindep test +[testenv:lpimport] +basepython = python3 +# The Launchpad bug import tool uses launchpadlib, which is not a typical +# runtime dependency of anything else in StoryBoard +deps = launchpadlib +commands = storyboard-migrate {posargs} + [hacking] import_exceptions = storyboard._i18n