Skip to content

Conversation

@miquelbeltran
Copy link
Contributor

@miquelbeltran miquelbeltran commented May 2, 2025

Description 📝

Purpose:

Adds GitHub CI jobs to run on each PR, as well as other useful repo templates. Similar to what we do in the other projects.

Approach:

Copied and adapted ci jobs and templates from raygun4node.

CI job runs with all the currently stable python versions.

Type of change

  • fix: Bug fix (non-breaking change which fixes an issue)
  • feat: New feature (non-breaking change which adds functionality)
  • chore: Chore task, release or small impact change
  • ci: CI configuration change
  • Other type of change (specify): code format
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Updates

  • Adds issue templates (copied from other Raygun projects)
  • Adds PR template
  • Setup monthly dependabot
  • Setup PR title job
  • Setup PR job for code formatting, static code analysis and unit tests.
  • Formatted code according to code formatter.
  • Unit test use environment variable RAYGUN_API_KEY instead of hardcoded api key (this needs to be added to the project settings secrets)

Not in this PR:

  • Fix static code analysis issues: I will do this in a new PR as it is a large change.
  • Fix failing unit test (18 out of 77 tests fail): Needs the RAYGUN_API_KEY

Related issues

  • None

Test plan 🧪

  • Run CI jobs and formatter locally

Author to check 👓

  • Project and all contained modules builds successfully
  • Self-/dev-tested
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

Reviewer to check ✔️

  • Project and all contained modules builds successfully
  • Change has been dev-/reviewer-tested, where possible
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR primarily adds GitHub CI workflows for formatting, static analysis, and testing along with minor code reformatting changes across the codebase.

  • Added CI workflow configurations, issue templates, and dependabot updates.
  • Reformatted code to consistently use double quotes and adjusted whitespace/line-breaks for clarity.
  • Updated various tests and middleware files with style improvements without changing core logic.

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

File Description
python3/tests/*.py Updated tests formatting to use consistent quoting and style.
python3/raygun4py/**/*.py Reformatted code to use double quotes and standardized code style.
.github/workflows/.yml & .github/ISSUE_TEMPLATE/.md Added CI workflows, issue templates, and dependabot configuration.
Comments suppressed due to low confidence (1)

python3/raygun4py/utilities.py:25

  • Since you're iterating over each 'filter_key' in 'filtered_keys', consider checking for an exact match of the key (or moving the check outside the loop) to improve clarity and efficiency.
if key in filtered_keys:

@sumitramanga sumitramanga requested a review from TheRealAgentK May 5, 2025 02:05
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

Choose a reason for hiding this comment

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

Given 3.14 is coming not too far in the future - is there a way we can build against early 3.14 versions, too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems that specifying the exact version 3.14.0-alpha.7 works. I tried first with 3.14 and it didn't.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point, we don't want to put something out that's not released/not ina stable working state :)

@TheRealAgentK
Copy link

I think the PR itself is fine, it needs a new RG app api key for CI build purposes and we need to set up the secret and then builds should hopefully pass.

@miquelbeltran can you create and do that?

TheRealAgentK
TheRealAgentK previously approved these changes May 5, 2025
@miquelbeltran
Copy link
Contributor Author

@TheRealAgentK I don't have permissions to access the repo settings and create a secret env variable. I will ask internally.

@miquelbeltran
Copy link
Contributor Author

The API key setup is now done, and the PR is ready for a final review

Copy link
Contributor

@sumitramanga sumitramanga left a comment

Choose a reason for hiding this comment

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

Recent changes looks good 💯

@miquelbeltran miquelbeltran merged commit 3cb3a12 into master May 8, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants