Skip to content

Create python-app.yml#1

Merged
RainbowScientist5 merged 7 commits into
masterfrom
unknown repository
Mar 15, 2025
Merged

Create python-app.yml#1
RainbowScientist5 merged 7 commits into
masterfrom
unknown repository

Conversation

@GloWE3
Copy link
Copy Markdown

@GloWE3 GloWE3 commented Feb 19, 2025

https://g.dev/rainbowbeast

Motivation

Solution

Summary by Sourcery

CI:

  • Add a GitHub Actions workflow to automate the installation of Python dependencies, run tests, and perform linting on the master branch.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Feb 19, 2025

Reviewer's Guide by Sourcery

This pull request introduces a new GitHub Actions workflow file, python-app.yml, to automate the process of installing Python dependencies, running tests, and performing linting on the codebase using Python 3.10.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added a GitHub Actions workflow for Python application.
  • Created a new workflow file named python-app.yml.
  • Configured the workflow to trigger on pushes and pull requests to the master branch.
  • Set permissions for the workflow to read contents.
  • Defined a job named build that runs on the latest Ubuntu environment.
  • Included steps to check out the code, set up Python 3.10, and install necessary dependencies.
  • Added a step to lint the code using flake8 with specific error and complexity checks.
  • Included a step to run tests using pytest.
.github/workflows/python-app.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @GloWE3 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (performance): Consider caching pip dependencies to speed up workflow runs.

You might want to add a caching step (e.g., using actions/cache) to store installed pip packages and speed up subsequent builds.

Suggested implementation:

    - name: Set up Python 3.10
      uses: actions/setup-python@v3
      with:
        python-version: "3.10"
    - name: Cache pip dependencies
      uses: actions/cache@v3
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-

Note: This caching step uses the hash of requirements.txt to invalidate the cache when dependencies change. If your project uses additional dependency files (or none at all), you may need to adjust the key accordingly.

GloWE3 and others added 6 commits February 20, 2025 01:19
     Locking 218 packages to latest compatible versions
    Updating alloy-chains v0.1.52 -> v0.1.63
    Updating alloy-dyn-abi v0.8.18 -> v0.8.22
    Updating alloy-eip7702 v0.5.0 -> v0.5.1
    Updating alloy-json-abi v0.8.18 -> v0.8.22
    Updating alloy-primitives v0.8.18 -> v0.8.22
    Updating alloy-rlp v0.3.10 -> v0.3.11
    Updating alloy-rlp-derive v0.3.10 -> v0.3.11
    Updating alloy-sol-macro v0.8.18 -> v0.8.22
    Updating alloy-sol-macro-expander v0.8.18 -> v0.8.22
    Updating alloy-sol-macro-input v0.8.18 -> v0.8.22
    Updating alloy-sol-type-parser v0.8.18 -> v0.8.22
    Updating alloy-sol-types v0.8.18 -> v0.8.22
    Updating alloy-trie v0.7.8 -> v0.7.9
    Updating anstyle-wincon v3.0.6 -> v3.0.7
    Updating anyhow v1.0.95 -> v1.0.96
    Updating async-compression v0.4.18 -> v0.4.20
    Updating async-trait v0.1.84 -> v0.1.86
    Updating aurora-engine-modexp v1.1.0 -> v1.2.0
    Updating auto_impl v1.2.0 -> v1.2.1
    Updating aws-config v1.5.13 -> v1.5.17
    Updating aws-runtime v1.5.3 -> v1.5.5
    Updating aws-sdk-kms v1.54.0 -> v1.61.0
    Updating aws-sdk-sso v1.53.0 -> v1.60.0
    Updating aws-sdk-ssooidc v1.54.0 -> v1.61.0
    Updating aws-sdk-sts v1.54.0 -> v1.61.0
    Updating aws-sigv4 v1.2.6 -> v1.2.9
    Updating aws-smithy-async v1.2.3 -> v1.2.4
    Updating aws-smithy-http v0.60.11 -> v0.60.12
    Updating aws-smithy-json v0.61.1 -> v0.61.2
    Updating aws-smithy-runtime v1.7.6 -> v1.7.8
    Updating aws-smithy-types v1.2.11 -> v1.2.13
    Updating aws-types v1.3.3 -> v1.3.5
      Adding bit-set v0.8.0
      Adding bit-vec v0.8.0
    Updating bitflags v2.6.0 -> v2.9.0
    Updating blst v0.3.13 -> v0.3.14
    Updating bumpalo v3.16.0 -> v3.17.0
    Updating bytes v1.9.0 -> v1.10.0
    Updating bzip2 v0.4.4 -> v0.5.2
    Updating bzip2-sys v0.1.11+1.0.8 -> v0.1.13+1.0.8
    Updating cc v1.2.7 -> v1.2.16
    Updating chrono v0.4.39 -> v0.4.40
    Updating clap v4.5.23 -> v4.5.31
    Updating clap_builder v4.5.23 -> v4.5.31
    Updating clap_complete v4.5.40 -> v4.5.46
    Updating clap_derive v4.5.18 -> v4.5.28
    Updating comfy-table v7.1.3 -> v7.1.4
    Updating console v0.15.10 -> v0.15.11
      Adding const_format v0.2.34
      Adding const_format_proc_macros v0.2.34
    Updating cpufeatures v0.2.16 -> v0.2.17
    Updating crunchy v0.2.2 -> v0.2.3
    Updating data-encoding v2.6.0 -> v2.8.0
      Adding derive_more v2.0.1
      Adding derive_more-impl v2.0.1
    Updating dyn-clone v1.0.17 -> v1.0.18
    Updating either v1.13.0 -> v1.14.0
    Updating equivalent v1.0.1 -> v1.0.2
    Updating flate2 v1.0.35 -> v1.1.0
      Adding getrandom v0.3.1
    Updating gix-actor v0.32.0 -> v0.33.2
    Updating gix-config v0.40.0 -> v0.42.0
    Updating gix-config-value v0.14.10 -> v0.14.11
    Updating gix-features v0.38.2 -> v0.39.1
    Updating gix-fs v0.11.3 -> v0.12.1
    Updating gix-glob v0.16.5 -> v0.17.1
    Updating gix-hash v0.14.2 -> v0.15.1
      Adding gix-hashtable v0.6.0
    Updating gix-lock v14.0.0 -> v15.0.1
    Updating gix-object v0.44.0 -> v0.46.1
    Updating gix-path v0.10.13 -> v0.10.14
    Updating gix-ref v0.47.0 -> v0.49.1
    Updating gix-sec v0.10.10 -> v0.10.11
    Updating gix-tempfile v14.0.2 -> v15.0.0
    Updating gix-trace v0.1.11 -> v0.1.12
    Updating gix-utils v0.1.13 -> v0.1.14
    Updating gix-validate v0.9.2 -> v0.9.3
    Updating globset v0.4.15 -> v0.4.16
    Updating h2 v0.4.7 -> v0.4.8
    Updating handlebars v6.2.0 -> v6.3.1
    Updating httparse v1.9.5 -> v1.10.0
    Updating hyper v1.5.2 -> v1.6.0
    Updating ignore-files v3.0.2 -> v3.0.3
    Updating indexmap v2.7.0 -> v2.7.1
    Updating indicatif v0.17.9 -> v0.17.11
    Updating inferno v0.12.0 -> v0.12.1
    Updating inout v0.1.3 -> v0.1.4
    Updating instability v0.3.6 -> v0.3.7
    Updating ipnet v2.10.1 -> v2.11.0
    Updating is-terminal v0.4.13 -> v0.4.15
      Adding itertools v0.14.0
    Updating jiff v0.1.21 -> v0.1.29
    Updating jiff-tzdb v0.1.1 -> v0.1.2
    Updating jiff-tzdb-platform v0.1.1 -> v0.1.2
    Updating js-sys v0.3.76 -> v0.3.77
    Updating jsonwebtoken v9.3.0 -> v9.3.1
    Updating libc v0.2.169 -> v0.2.170
    Updating linux-raw-sys v0.4.14 -> v0.4.15
    Updating litemap v0.7.4 -> v0.7.5
    Updating log v0.4.22 -> v0.4.26
    Updating mdbook v0.4.43 -> v0.4.45
    Updating miette v7.4.0 -> v7.5.0
    Updating miette-derive v7.4.0 -> v7.5.0
    Updating miniz_oxide v0.8.2 -> v0.8.5
    Updating native-tls v0.2.12 -> v0.2.14
    Updating newtype-uuid v1.1.3 -> v1.2.1
    Updating nybbles v0.3.3 -> v0.3.4
    Updating once_cell v1.20.2 -> v1.20.3
    Updating op-alloy-consensus v0.9.0 -> v0.9.6 (available: v0.10.7)
    Updating op-alloy-rpc-types v0.9.0 -> v0.9.6 (available: v0.10.7)
    Updating openssl v0.10.68 -> v0.10.71
    Updating openssl-probe v0.1.5 -> v0.1.6
    Updating openssl-sys v0.9.104 -> v0.9.106
    Updating outref v0.5.1 -> v0.5.2
    Updating parity-scale-codec v3.6.12 -> v3.7.4
    Updating parity-scale-codec-derive v3.6.12 -> v3.7.4
    Updating pem v3.0.4 -> v3.0.5
    Updating phf v0.11.2 -> v0.11.3
    Updating phf_codegen v0.11.2 -> v0.11.3
    Removing phf_generator v0.10.0
    Removing phf_generator v0.11.2
      Adding phf_generator v0.11.3
    Updating phf_macros v0.11.2 -> v0.11.3
    Removing phf_shared v0.10.0
    Removing phf_shared v0.11.2
      Adding phf_shared v0.11.3
    Updating pin-project v1.1.7 -> v1.1.9
    Updating pin-project-internal v1.1.7 -> v1.1.9
    Updating pin-project-lite v0.2.15 -> v0.2.16
    Updating portable-atomic v1.10.0 -> v1.11.0
    Updating prettyplease v0.2.25 -> v0.2.29
    Updating proc-macro2 v1.0.92 -> v1.0.93
    Updating process-wrap v8.0.2 -> v8.2.0
    Updating prodash v28.0.0 -> v29.0.0
    Updating project-origins v1.4.0 -> v1.4.1
    Updating proptest v1.5.0 -> v1.6.0
    Updating prost v0.13.4 -> v0.13.5
    Updating prost-derive v0.13.4 -> v0.13.5
    Updating prost-types v0.13.4 -> v0.13.5
    Updating quinn-udp v0.5.9 -> v0.5.10
    Updating redox_syscall v0.5.8 -> v0.5.9
    Updating revm v19.0.0 -> v19.5.0
    Updating revm-interpreter v15.0.0 -> v15.2.0
    Updating revm-precompile v16.0.0 -> v16.1.0
    Updating revm-primitives v15.1.0 -> v15.2.0
    Updating ring v0.17.8 -> v0.17.11
    Updating ruint v1.12.4 -> v1.13.1
    Updating rustc-hash v2.1.0 -> v2.1.1
    Updating rustix v0.38.42 -> v0.38.44
    Updating rustls v0.23.20 -> v0.23.23
    Updating rustls-pki-types v1.10.1 -> v1.11.0
    Updating ryu v1.0.18 -> v1.0.19
    Updating scc v2.3.0 -> v2.3.3
    Updating schemars v0.8.21 -> v0.8.22
    Updating schemars_derive v0.8.21 -> v0.8.22
    Updating sdd v3.0.5 -> v3.0.7
    Updating security-framework v3.1.0 -> v3.2.0
    Updating security-framework-sys v2.13.0 -> v2.14.0
    Updating semver v1.0.24 -> v1.0.25
    Updating serde v1.0.217 -> v1.0.218
    Updating serde_derive v1.0.217 -> v1.0.218
    Updating serde_json v1.0.134 -> v1.0.139
    Updating similar v2.6.0 -> v2.7.0
    Updating similar-asserts v1.6.0 -> v1.7.0
    Updating simple_asn1 v0.6.2 -> v0.6.3
    Updating siphasher v0.3.11 -> v1.0.1
    Updating smallvec v1.13.2 -> v1.14.0
    Updating string_cache v0.8.7 -> v0.8.8
    Updating string_cache_codegen v0.5.2 -> v0.5.4
    Updating strip-ansi-escapes v0.2.0 -> v0.2.1
      Adding strum v0.27.1
      Adding strum_macros v0.27.1
    Updating svm-rs v0.5.9 -> v0.5.11
    Updating svm-rs-builds v0.5.9 -> v0.5.11
    Updating syn v2.0.94 -> v2.0.98
    Updating syn-solidity v0.8.18 -> v0.8.22
    Updating tempfile v3.15.0 -> v3.17.1
    Updating thiserror v2.0.9 -> v2.0.11
    Updating thiserror-impl v2.0.9 -> v2.0.11
    Updating tokio v1.42.0 -> v1.43.0
    Updating tokio-macros v2.4.0 -> v2.5.0
    Updating tokio-rustls v0.26.1 -> v0.26.2
    Updating toml v0.8.19 -> v0.8.20
    Updating toml_edit v0.22.22 -> v0.22.24
    Updating typenum v1.17.0 -> v1.18.0
    Updating unicode-ident v1.0.14 -> v1.0.17
    Updating uuid v1.11.0 -> v1.15.1
    Updating valuable v0.1.0 -> v0.1.1
    Updating vte v0.11.1 -> v0.14.1
    Removing vte_generate_state_changes v0.1.2
    Updating wait-timeout v0.2.0 -> v0.2.1
      Adding wasi v0.13.3+wasi-0.2.2
    Updating wasm-bindgen v0.2.99 -> v0.2.100
    Updating wasm-bindgen-backend v0.2.99 -> v0.2.100
    Updating wasm-bindgen-futures v0.4.49 -> v0.4.50
    Updating wasm-bindgen-macro v0.2.99 -> v0.2.100
    Updating wasm-bindgen-macro-support v0.2.99 -> v0.2.100
    Updating wasm-bindgen-shared v0.2.99 -> v0.2.100
    Updating watchexec-signals v4.0.0 -> v4.0.1
    Updating web-sys v0.3.76 -> v0.3.77
    Updating webpki-roots v0.26.7 -> v0.26.8
    Updating windows v0.56.0 -> v0.59.0
    Updating windows-core v0.56.0 -> v0.59.0
    Updating windows-implement v0.56.0 -> v0.59.0
    Updating windows-interface v0.56.0 -> v0.59.0
      Adding windows-link v0.1.0
    Updating windows-result v0.1.2 -> v0.3.1
      Adding windows-strings v0.3.1
      Adding windows-targets v0.53.0
      Adding windows_aarch64_gnullvm v0.53.0
      Adding windows_aarch64_msvc v0.53.0
      Adding windows_i686_gnu v0.53.0
      Adding windows_i686_gnullvm v0.53.0
      Adding windows_i686_msvc v0.53.0
      Adding windows_x86_64_gnu v0.53.0
      Adding windows_x86_64_gnullvm v0.53.0
      Adding windows_x86_64_msvc v0.53.0
    Removing winnow v0.6.22
      Adding winnow v0.6.26
      Adding winnow v0.7.3
      Adding wit-bindgen-rt v0.33.0
    Updating zerofrom v0.1.5 -> v0.1.6
    Updating zerofrom-derive v0.1.5 -> v0.1.6
    Updating zip v2.2.2 -> v2.2.3
note: pass `--verbose` to see 44 unchanged dependencies behind latest
     Locking 54 packages to latest compatible versions
    Updating alloy-chains v0.1.63 -> v0.1.64
    Updating anyhow v1.0.96 -> v1.0.97
    Updating async-trait v0.1.86 -> v0.1.87
    Updating aws-config v1.5.17 -> v1.5.18
    Updating aws-sdk-kms v1.61.0 -> v1.62.0
    Updating aws-sdk-sso v1.60.0 -> v1.61.0
    Updating aws-sdk-ssooidc v1.61.0 -> v1.62.0
    Updating aws-sdk-sts v1.61.0 -> v1.62.0
      Adding aws-smithy-http v0.61.1
    Updating bon v3.3.2 -> v3.4.0
    Updating bon-macros v3.3.2 -> v3.4.0
    Updating byte-slice-cast v1.2.2 -> v1.2.3
    Updating bytemuck v1.21.0 -> v1.22.0
    Updating bytes v1.10.0 -> v1.10.1
    Updating dyn-clone v1.0.18 -> v1.0.19
    Updating either v1.14.0 -> v1.15.0
    Updating fd-lock v4.0.2 -> v4.0.3
    Updating hermit-abi v0.4.0 -> v0.5.0
    Updating httparse v1.10.0 -> v1.10.1
    Updating indoc v2.0.5 -> v2.0.6
    Updating interprocess v2.2.2 -> v2.2.3
    Updating is-terminal v0.4.15 -> v0.4.16
    Updating itoa v1.0.14 -> v1.0.15
    Updating jiff-tzdb v0.1.2 -> v0.1.3
      Adding linux-raw-sys v0.9.2
    Updating mdbook v0.4.45 -> v0.4.46
    Updating pin-project v1.1.9 -> v1.1.10
    Updating pin-project-internal v1.1.9 -> v1.1.10
    Updating pkg-config v0.3.31 -> v0.3.32
    Updating prettyplease v0.2.29 -> v0.2.30
    Updating proc-macro-crate v3.2.0 -> v3.3.0
    Updating proc-macro2 v1.0.93 -> v1.0.94
    Updating quote v1.0.38 -> v1.0.39
    Updating redox_syscall v0.5.9 -> v0.5.10
    Updating ring v0.17.11 -> v0.17.13
      Adding rustix v1.0.1
    Updating rustversion v1.0.19 -> v1.0.20
    Updating ryu v1.0.19 -> v1.0.20
    Updating semver v1.0.25 -> v1.0.26
    Updating serde_json v1.0.139 -> v1.0.140
    Updating serde_path_to_error v0.1.16 -> v0.1.17
    Updating serde_repr v0.1.19 -> v0.1.20
    Updating syn v2.0.98 -> v2.0.99
    Updating tempfile v3.17.1 -> v3.18.0
    Updating terminal_size v0.4.1 -> v0.4.2
    Updating textwrap v0.16.1 -> v0.16.2
    Updating thiserror v2.0.11 -> v2.0.12
    Updating thiserror-impl v2.0.11 -> v2.0.12
    Updating time v0.3.37 -> v0.3.39
    Updating time-core v0.1.2 -> v0.1.3
    Updating time-macros v0.2.19 -> v0.2.20
    Updating tinyvec v1.8.1 -> v1.9.0
    Updating tokio v1.43.0 -> v1.44.0
    Updating unicode-ident v1.0.17 -> v1.0.18
note: pass `--verbose` to see 46 unchanged dependencies behind latest
@RainbowScientist5 RainbowScientist5 merged commit 28d8a14 into RainbowScientist-Playground:master Mar 15, 2025
GloWE3 added a commit that referenced this pull request Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants