From 099a34893e4ed760d94b914a8e8f1220f887d2eb Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Thu, 1 Feb 2024 10:07:29 +0100 Subject: [PATCH] [clean] Removing references to 'test.pypi.org' index, or the 'develop' branch (no longer default) --- .github/workflows/build_and_tests.yml | 12 +++--------- .github/workflows/documentation.yml | 8 +------- README.md | 4 ++-- doc/installation.rst | 2 +- doc/tutorial_installation.rst | 17 +++++------------ src/ragger/backend/__init__.py | 5 ++--- template/usage.md | 5 ++--- 7 files changed, 16 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build_and_tests.yml b/.github/workflows/build_and_tests.yml index 722a6fa0..13258ee9 100644 --- a/.github/workflows/build_and_tests.yml +++ b/.github/workflows/build_and_tests.yml @@ -46,7 +46,7 @@ jobs: - name: Build & install run: | - pip install --extra-index-url https://test.pypi.org/simple/ -U .[tests,all_backends] + pip install -U .[tests,all_backends] pip install -U click>=8 - name: Download app binaries @@ -81,14 +81,8 @@ jobs: - name: Build Ragger Python package run: | pip install --upgrade pip build twine - if [[ ${{ github.ref }} == "refs/tags/"* ]]; \ - then \ - python -m build; \ - pip install . - else \ - PIP_EXTRA_INDEX_URL=https://test.pypi.org/simple/ python -m build; \ - pip install --extra-index-url https://test.pypi.org/simple/ . - fi + python -m build + pip install . python -m twine check dist/* echo "TAG_VERSION=$(python -c 'from ragger import __version__; print(__version__)')" >> "$GITHUB_ENV" diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 801331f1..0dd4f219 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -26,13 +26,7 @@ jobs: sudo apt-get update sudo apt-get install graphviz - name: Install Python dependencies - run: | - if [[ ${{ github.ref }} == "refs/tags/"* ]]; \ - then \ - pip install .[doc] - else \ - pip install --extra-index-url https://test.pypi.org/simple/ .[doc] - fi + run: pip install .[doc] - name: Generating automatic resources run: (cd doc && make gen_resources) - name: Generate the documentation diff --git a/README.md b/README.md index 1a76287b..5611a0ff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Ragger -[![codecov](https://codecov.io/gh/LedgerHQ/ragger/branch/develop/graph/badge.svg)](https://codecov.io/gh/LedgerHQ/ragger) +[![codecov](https://codecov.io/gh/LedgerHQ/ragger/branch/master/graph/badge.svg)](https://codecov.io/gh/LedgerHQ/ragger) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=LedgerHQ_ragger&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=LedgerHQ_ragger) [![CodeQL](https://github.com/LedgerHQ/ragger/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/LedgerHQ/ragger/actions/workflows/codeql-analysis.yml) @@ -32,7 +32,7 @@ More complete documentation can be found [here](https://ledgerhq.github.io/ragge ### Python package -Ragger is available on https://pypi.org. To install it, just run: +Ragger is available on https://pypi.org. To install it fully, just run: ``` pip install ragger[all_backends] diff --git a/doc/installation.rst b/doc/installation.rst index 18a07beb..75d58373 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -8,7 +8,7 @@ installed with ``pip``: .. code-block:: bash - pip install --extra-index-url https://test.pypi.org/simple/ ragger + pip install ragger By default - to avoid wasting useless time and space - the ``ragger`` package diff --git a/doc/tutorial_installation.rst b/doc/tutorial_installation.rst index 444be25b..f71d2912 100644 --- a/doc/tutorial_installation.rst +++ b/doc/tutorial_installation.rst @@ -7,16 +7,9 @@ dependencies: .. code-block:: bash - $ pip install --extra-index-url https://test.pypi.org/simple/ ragger[speculos] + $ pip install ragger[speculos] -Some explanation on arguments: - -- ``--extra-index-url https://test.pypi.org/simple/`` is necessary to get the - latest version of ``Ragger``, as it is currently not deployed on the - stable ``pypi`` repositories. -- ``ragger[speculos]`` means than Speculos and its dependencies will also - be installed. ``Ragger`` tries to uncouple its dependencies so that only - what is needed is installed. - All the extras can be seen - `in the setup.cfg `_ - file. +``ragger[speculos]`` means than Speculos and its dependencies will also be +installed. ``Ragger`` tries to uncouple its dependencies so that only what is +needed is installed. All the extras can be seen in the `setup.cfg +`_ file. diff --git a/src/ragger/backend/__init__.py b/src/ragger/backend/__init__.py index d5ca71a1..b9309b97 100644 --- a/src/ragger/backend/__init__.py +++ b/src/ragger/backend/__init__.py @@ -16,9 +16,8 @@ from .interface import BackendInterface, RaisePolicy from .stub import StubBackend - -ERROR_MSG = "This backend needs {}. Please install this package (run `pip install " \ - "--extra-index-url https://test.pypi.org/simple/ ragger[{}]` or check this address: '{}')" +ERROR_MSG = ("This backend needs {}. Please install this package (run `pip install ragger[{}]` or " + "check this address: '{}')") try: from .speculos import SpeculosBackend diff --git a/template/usage.md b/template/usage.md index 0d948344..ca3dfc11 100644 --- a/template/usage.md +++ b/template/usage.md @@ -8,8 +8,8 @@ This framework allows testing the application on the Speculos emulator or on a r ### Install ragger and dependencies ``` -pip install --extra-index-url https://test.pypi.org/simple/ -r requirements.txt sudo apt-get update && sudo apt-get install qemu-user-static +pip install .[speculos] ``` ### Compile the application @@ -61,7 +61,7 @@ Standard useful pytest options -s enable logs for successful tests, on Speculos it will enable app logs if compiled with DEBUG=1 -k only run the tests that contain in their names --tb=short in case of errors, formats the test traceback in a readable way -``` +``` Custom pytest options ``` @@ -72,4 +72,3 @@ Custom pytest options --log_apdu_file log all apdu exchanges to the file in parameter. The previous file content is erased --seed on Speculos, use the seed (mnemonic) provided. ``` -