Skip to content

Commit

Permalink
Rename old RETWORKX environment variables (#976)
Browse files Browse the repository at this point in the history
* Replace old environment variables refering to retworkx

* More flags

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
IvanIsCoding and mergify[bot] committed Sep 11, 2023
1 parent 0bea6cb commit f685d85
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ not include any way to view the images from the visualization tests.

If you want to inspect the output from the visualization tests (which is common
if you're working on visualizations) you can set the
`RETWORKX_TEST_PRESERVE_IMAGES` environment variable to any value and this will
`RUSTWORKX_TEST_PRESERVE_IMAGES` environment variable to any value and this will
skip the cleanup. This will enable you to look at the output image and ensure the
visualization is correct. For example, running:

```
RETWORKX_TEST_PRESERVE_IMAGES=1 tox -epy
RUSTWORKX_TEST_PRESERVE_IMAGES=1 tox -epy
```

will run the visualization tests and preserve the generated image files after
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

# Prepend warning for development docs:

if not os.getenv('RETWORKX_DEV_DOCS', None):
if not os.getenv('RUSTWORKX_DEV_DOCS', None):
rst_prolog = """
.. raw:: html
Expand Down Expand Up @@ -124,7 +124,7 @@
for source_str in fd:
redirects[f"stubs/{source_str}"] = f"../apiref/{source_str}"

if os.getenv("RETWORKX_LEGACY_DOCS", None) is not None:
if os.getenv("RUSTWORKX_LEGACY_DOCS", None) is not None:
redirects["*"] = "https://qiskit.org/ecosystem/rustworkx/$source.html"
html_baseurl = "https://qiskit.org/ecosystem/rustworkx/"

Expand Down Expand Up @@ -152,7 +152,7 @@ def _get_versions(app, config):


def _get_version_label(current_version):
if not os.getenv('RETWORKX_DEV_DOCS', None):
if not os.getenv('RUSTWORKX_DEV_DOCS', None):
current_version_info = current_version.split('.')
return ".".join(current_version_info[:-1])
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
except Exception:
HAS_PILLOW = False

SAVE_IMAGES = os.getenv("RETWORKX_TEST_PRESERVE_IMAGES", None)
SAVE_IMAGES = os.getenv("RUSTWORKX_TEST_PRESERVE_IMAGES", None)


def _save_image(image, path):
Expand Down
2 changes: 1 addition & 1 deletion tests/retworkx_backwards_compat/visualization/test_mpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
except ImportError:
HAS_MPL = False

SAVE_IMAGES = os.getenv("RETWORKX_TEST_PRESERVE_IMAGES", None)
SAVE_IMAGES = os.getenv("RUSTWORKX_TEST_PRESERVE_IMAGES", None)


def _save_images(fig, path):
Expand Down
2 changes: 1 addition & 1 deletion tests/rustworkx_tests/visualization/test_graphviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
except Exception:
HAS_PILLOW = False

SAVE_IMAGES = os.getenv("RETWORKX_TEST_PRESERVE_IMAGES", None)
SAVE_IMAGES = os.getenv("RUSTWORKX_TEST_PRESERVE_IMAGES", None)


def _save_image(image, path):
Expand Down
2 changes: 1 addition & 1 deletion tests/rustworkx_tests/visualization/test_mpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
except ImportError:
HAS_MPL = False

SAVE_IMAGES = os.getenv("RETWORKX_TEST_PRESERVE_IMAGES", None)
SAVE_IMAGES = os.getenv("RUSTWORKX_TEST_PRESERVE_IMAGES", None)


def _save_images(fig, path):
Expand Down
2 changes: 1 addition & 1 deletion tools/deploy_documentation_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sudo apt-get install -y ./rclone.deb
RCLONE_CONFIG_PATH=$(rclone config file | tail -1)

# Build the documentation.
RETWORKX_DEV_DOCS=1 tox -edocs
RUSTWORKX_DEV_DOCS=1 tox -edocs

echo "show current dir: "
pwd
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extras =
mpl
graphviz
passenv =
RETWORKX_TEST_PRESERVE_IMAGES
RUSTWORKX_TEST_PRESERVE_IMAGES
RUSTWORKX_PKG_NAME
RUSTWORKX_DEBUG
changedir = {toxinidir}/tests
Expand Down Expand Up @@ -51,8 +51,8 @@ deps =
-r {toxinidir}/docs/source/requirements.txt
passenv =
{[testenv]passenv}
RETWORKX_DEV_DOCS
RETWORKX_LEGACY_DOCS
RUSTWORKX_DEV_DOCS
RUSTWORKX_LEGACY_DOCS
RUST_DEBUG
changedir = {toxinidir}/docs
commands =
Expand Down

0 comments on commit f685d85

Please sign in to comment.