diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8390fccecb20cefb33dbb33be455e9926af22bac..7497ee95edd016e4dd1e4691c2f19a6590737b27 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 + rev: v0.8.5 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -20,7 +20,7 @@ repos: hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.14.1 hooks: - id: mypy - repo: https://gitlab.com/devopshq/gitlab-ci-linter @@ -41,7 +41,7 @@ repos: - --license-filepath - license_header.txt - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 0.7.21 hooks: - id: mdformat additional_dependencies: diff --git a/docs/changelog.md b/docs/changelog.md index c443621e2cb95e909b41ad734a45086e53979617..d0e97c33f24f57a1d999e84d28eb051d51ee77a0 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -479,7 +479,7 @@ Thanks to @matograine for this bugfix and the release! - #153: Install on Windows, Scrypt issue - #154: net: can’t get screen size on Windows -- !92: Document Windows installation with pip +- !92: Document Windows installation with pip #### Project diff --git a/docs/contributing/container_usage.md b/docs/contributing/container_usage.md index f1d0bd7335788f27ceb091030fe558b2859d075b..1ef92f15300f3e8162fc27ca405cb9a4189dc4dc 100644 --- a/docs/contributing/container_usage.md +++ b/docs/contributing/container_usage.md @@ -9,11 +9,13 @@ In case you use `docker`, you can [add your user into the `docker` group, so you Pull the image: === "Podman" + ``` podman pull registry.duniter.org/clients/python/silkaj/release/pip:latest ``` === "Docker" + ``` sudo docker pull registry.duniter.org/clients/python/silkaj/release/pip:latest ``` @@ -21,11 +23,13 @@ Pull the image: Run Silkaj from outside the image: === "Podman" + ``` podman run -it registry.duniter.org/clients/python/silkaj/release/pip:latest silkaj info ``` === "Docker" + ``` sudo docker run -it registry.duniter.org/clients/python/silkaj/release/pip:latest silkaj info ``` @@ -33,11 +37,13 @@ Run Silkaj from outside the image: Go into the image: === "Podman" + ``` podman run -it registry.duniter.org/clients/python/silkaj/release/pip:latest bash ``` === "Docker" + ``` sudo docker run -it registry.duniter.org/clients/python/silkaj/release/pip:latest bash ``` @@ -58,11 +64,13 @@ This is fine for doing small editions. For bigger editions, it is adviced to use Pull the image: === "Podman" + ``` podman pull registry.duniter.org/clients/python/silkaj/release/poetry:latest ``` === "Docker" + ``` sudo docker pull registry.duniter.org/clients/python/silkaj/release/poetry:latest ``` @@ -70,11 +78,13 @@ Pull the image: Run Silkaj from ouside the image: === "Podman" + ``` podman run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest silkaj info ``` === "Docker" + ``` sudo docker run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest silkaj info ``` @@ -82,11 +92,13 @@ Run Silkaj from ouside the image: Go into the image: === "Podman" + ``` podman run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest bash ``` === "Docker" + ``` sudo docker run -it registry.duniter.org/clients/python/silkaj/release/poetry:latest bash ``` diff --git a/docs/contributing/install_poetry.md b/docs/contributing/install_poetry.md index a4e465ad6d3522bc567bab92cfabe5763741d1bc..051b85d4d526a67ff61004279159025095eff350 100644 --- a/docs/contributing/install_poetry.md +++ b/docs/contributing/install_poetry.md @@ -7,11 +7,13 @@ ### Install libsodium === "Debian" + ``` sudo apt install libsodium23 ``` === "Fedora" + ``` sudo dnf install libsodium ``` diff --git a/docs/install.md b/docs/install.md index dc4e123f1c27a0f716811ac487d609aa3db8baa1..f7c6ed29dd043aca680d121d499f1858a86e6798 100644 --- a/docs/install.md +++ b/docs/install.md @@ -19,16 +19,19 @@ On a Unix system, run in your shell following commands: ### Install libsodium === "Debian" + ``` sudo apt install libsodium23 ``` === "Fedora" + ``` sudo dnf install libsodium-devel ``` === "macOS" + ``` brew install libsodium ``` @@ -38,16 +41,19 @@ On a Unix system, run in your shell following commands: Check [`pipx` documentation](https://pipx.pypa.io/stable/) for an extended installation tutorial. === "Debian" + ``` sudo apt install pipx python3-dev ``` === "Fedora" + ``` sudo dnf install pipx python3-devel ``` === "macOS" + ``` brew install python3 pipx ``` @@ -98,16 +104,19 @@ ______________________________________________________________________ ### Install `pip` === "Debian" + ``` sudo apt install python3-pip ``` === "Fedora" + ``` sudo dnf install python3-pip ``` === "macOS" + Already installed with `python3` ### Completing `PATH` @@ -148,16 +157,19 @@ silkaj Set up the shell completion by adding following line in your shell configuration depending on your shell: === "Bash" + ```title="$HOME/.bashrc" eval "$(_SILKAJ_COMPLETE=bash_source silkaj)" ``` === "Zsh" + ```title="$HOME/.zshrc" eval "$(_SILKAJ_COMPLETE=zsh_source silkaj)" ``` === "Fish" + ```title="$HOME/.config/fish/completions/silkaj.fish" _SILKAJ_COMPLETE=fish_source silkaj | source ``` diff --git a/pyproject.toml b/pyproject.toml index f693c9932717ec60375dccc3a350dd221af1ba4f..86fc39dcacb4bb98a02aef05cf3ab0d9d690b048 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ pydiscourse = { version = "^1.7.0", optional = true } [tool.poetry.group.test.dependencies] pytest = "^8.1.1" -pytest-cov = "^5.0" +pytest-cov = "^6.0" pytest-sugar = "^1.0.0" pytest-clarity = "^1.0.1" diff --git a/silkaj/blockchain/blocks.py b/silkaj/blockchain/blocks.py index 9225fa1c6eeff10e02fdce00099066b4ae16bf74..d49e4fa9cd1d3b7f54977803c96d54330459fdce 100644 --- a/silkaj/blockchain/blocks.py +++ b/silkaj/blockchain/blocks.py @@ -58,8 +58,8 @@ def list_blocks(number: int, detailed: bool) -> None: issuer["powMin"] = block["powMin"] issuers_dict[issuer["pubkey"]] = issuer issuers.append(issuer) - for pubkey in issuers_dict: - issuer = issuers_dict[pubkey] + for pubkey in issuers_dict.items(): + issuer = issuers_dict[pubkey[0]] time.sleep(BMA_SLEEP) try: idty = identity_of(issuer["pubkey"])