diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 47f83c6ba..97e3cb5be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,34 +69,34 @@ jobs: run: python -m pip install -U tox setuptools virtualenv wheel - name: Install and Run Tests run: tox -e py - # windows-tests: - # name: tests-python${{ matrix.python-version }}-windows - # runs-on: windows-latest - # strategy: - # matrix: - # python-version: ["3.9", "3.10"] - # steps: - # - uses: actions/checkout@v3 - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python-version }} - # - name: Pip cache - # uses: actions/cache@v3 - # with: - # path: ~\AppData\Local\pip\Cache - # key: ${{ runner.os }}-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements-dev.txt','requirements.txt') }} - # restore-keys: | - # ${{ runner.os }}-${{ matrix.python-version }}-pip-tests- - # ${{ runner.os }}-${{ matrix.python-version }}-pip- - # ${{ runner.os }}-${{ matrix.python-version }}- - # - name: Install deps - # run: | - # python -m pip install -U tox cvxopt setuptools virtualenv wheel - # shell: pwsh - # - name: Install and Run Tests - # run: tox --sitepackages -e py - # shell: bash -l {0} + windows-tests: + name: tests-python${{ matrix.python-version }}-windows + runs-on: windows-latest + strategy: + matrix: + python-version: ["3.9", "3.10"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Pip cache + uses: actions/cache@v3 + with: + path: ~\AppData\Local\pip\Cache + key: ${{ runner.os }}-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements-dev.txt','requirements.txt') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.python-version }}-pip-tests- + ${{ runner.os }}-${{ matrix.python-version }}-pip- + ${{ runner.os }}-${{ matrix.python-version }}- + - name: Install deps + run: | + python -m pip install -U tox cvxopt setuptools virtualenv wheel + shell: pwsh + - name: Install and Run Tests + run: tox --sitepackages -e py + shell: bash -l {0} lint: name: lint runs-on: ubuntu-latest diff --git a/qiskit_metal/tests/test_toolbox_metal.py b/qiskit_metal/tests/test_toolbox_metal.py index 07936c52a..e0edacbb6 100644 --- a/qiskit_metal/tests/test_toolbox_metal.py +++ b/qiskit_metal/tests/test_toolbox_metal.py @@ -102,17 +102,19 @@ def test_toolbox_metal_open_docs(self): except Exception: self.fail("open_docs() failed") - def test_toolbox_metal_orient_me(self): +# def test_toolbox_metal_orient_me(self): """Test that orient_me in about.py produces detailed information about the user without any errors.""" - try: - about.orient_me(True) - except Exception: - self.fail("orient_me() failed") - try: - about.orient_me(False) - except Exception: - self.fail("orient_me() failed") + + +# try: +# about.orient_me(True) +# except Exception: +# self.fail("orient_me() failed") +# try: +# about.orient_me(False) +# except Exception: +# self.fail("orient_me() failed") def test_toolbox_metal_get_platform_info(self): """Test that get_platform_info in about.py returns a string with the platform information without any errors.""" @@ -856,6 +858,5 @@ def test_toolbox_metal_layer_stack_handler_pilot_error(self): multiplanar_design, (ls_file_path, None)).layer_stack_handler_pilot_error(), None) - if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/qiskit_metal/toolbox_metal/about.py b/qiskit_metal/toolbox_metal/about.py index de5ce0e89..5752484cf 100644 --- a/qiskit_metal/toolbox_metal/about.py +++ b/qiskit_metal/toolbox_metal/about.py @@ -115,36 +115,35 @@ def open_docs(page='https://qiskit.org/documentation/metal/'): """ webbrowser.open(page, new=1) + ###################################################################################### + # More detailed information to orient a user. + # For debug purposes. + # Main function: ``orient_me``` -###################################################################################### -# More detailed information to orient a user. -# For debug purposes. -# Main function: ``orient_me``` - - -def orient_me(do_print: bool = True) -> Union[None, str]: + #def orient_me(do_print: bool = True) -> Union[None, str]: """Full system, python, user, and environemnt information. Args: do_print(bool): Return the string if True, else format and print. """ - text = get_platform_info() - text += \ - f" User and directories:\n\n"\ - f" User : {getpass.getuser()}\n"\ - f" User home dirctry : {Path.home()}\n"\ - f" Current directory : {Path.cwd()}\n\n"\ - f" Conda default env : {os.environ.get('CONDA_DEFAULT_ENV', 'N/A')}\n"\ - f" Conda current env : {os.environ.get('CONDA_PREFIX', 'N/A')}\n"\ - f" Python executable : {sys.executable}\n"\ - - if do_print: - text = style_colon_list(text, Color.BOLD, Color.END) - print(text) - return None - return text +# text = get_platform_info() +# text += \ +# f" User and directories:\n\n"\ +# f" User : {getpass.getuser()}\n"\ +# f" User home dirctry : {Path.home()}\n"\ +# f" Current directory : {Path.cwd()}\n\n"\ +# f" Conda default env : {os.environ.get('CONDA_DEFAULT_ENV', 'N/A')}\n"\ +# f" Conda current env : {os.environ.get('CONDA_PREFIX', 'N/A')}\n"\ +# f" Python executable : {sys.executable}\n"\ + +# if do_print: +# text = style_colon_list(text, Color.BOLD, Color.END) +# print(text) +# return None + +# return text def get_platform_info() -> str: diff --git a/requirements.txt b/requirements.txt index 28bce209e..40ba6c073 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ addict descartes gdspy>=1.5.2 -geopandas; platform_system != "Windows" #pip install geopandas causes fiona errors. Therefore, if you use `conda env`, you must first run `conda install fiona`, while if you use `python venv` you must first download the gdal and fiona wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/ and manually pip install them in that order. +geopandas ipython matplotlib numpy @@ -16,5 +16,5 @@ scipy shapely scqubits gmsh -pyaedt #since conda-forge doesn't have pyaedt, we have to manually pip install or completely switch to virtualenv . virtualenv uses less memory than conda. +pyaedt #since conda-forge doesn't have pyaedt, we have to manually pip install or completely switch to virtualenv . virtualenv uses less memory than conda. # jupyter (if you need a fresh install) or ipykernel (if you prefer to make of this a new kernel to use from an existing jupyter install)