Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename old RETWORKX environment variables #976

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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