Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(python): HAR consistency and overall cleanup #540

Merged
merged 6 commits into from
Aug 15, 2022

Conversation

erunion
Copy link
Member

@erunion erunion commented Aug 12, 2022

🚥 Fix RM-5025, #415, #416

🧰 Changes

  • Overhauling our HAR creator field that we're setting so it's more consistent with the other SDKs.
  • Incorporating Pylint into our linting flow and resolving some issues it uncovered.
  • Setting up CI to run tests against all currently supported versions of Python.
  • Setting up a Makefile in the run dependency installation, linting, and test commands.

HAR changes

Before After
creator.name readme_metrics.PayloadBuilder readme-metrics (python)
creator.version 2.0.1 2.0.1
creator.comment 3.8.9 (default, Apr 13 2022, 08:48:06)
[Clang 13.1.6 (clang-1316.0.21.2.5)]
arm64-darwin21.3.0/3.8.9

🧬 QA & Testing

All existing tests are/should be still passing.

@erunion erunion added enhancement New feature or request refactor Issues about tackling technical debt area:python labels Aug 12, 2022
@erunion erunion marked this pull request as ready for review August 13, 2022 00:33
@erunion erunion requested review from domharrington, gratcliff and a team August 13, 2022 00:33
return f"[REDACTED {len(v)}]"
else:
return "[REDACTED]"
def redact_dict(self, mapping: Mapping):
Copy link
Member Author

Choose a reason for hiding this comment

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

Made this a public member because we call it in some unit tests.

Comment on lines -49 to -50
finally:
return response
Copy link
Member Author

Choose a reason for hiding this comment

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

# connected to the middleware somehow


class MockServer:
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed this because it wasn't being used and we have better server integration tests elsewhere.

@@ -1,6 +1,7 @@
black==22.3.0
Django==3.2.14
Flask==2.0.1
pylint==2.14.5
Copy link
Member

Choose a reason for hiding this comment

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

Is there any concept of devDependencies in pip, or is everything just bundled together?

@erunion erunion merged commit 455f08e into main Aug 15, 2022
@erunion erunion deleted the feat/python-har-cleanup branch August 15, 2022 15:46
@erunion erunion added python Issues related to our Python SDK and removed area:python labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Issues related to our Python SDK refactor Issues about tackling technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants