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

Handling case-sensitivity in plugin name for activity #786

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

manasaV3
Copy link
Collaborator

@manasaV3 manasaV3 commented Dec 6, 2022

Relates to: #785

Summary

We transform the plugin name used for querying against data to lowercase to fix the issue. To ensure consistency, we also convert the plugin name to lowercase when we fetch and save the data.

@manasaV3 manasaV3 added the bug-fix Release Label: Used for categorizing bug fixes in automated CI release notes label Dec 6, 2022
@manasaV3 manasaV3 requested a review from klai95 December 6, 2022 20:30
@manasaV3 manasaV3 self-assigned this Dec 6, 2022
mock_df = pd.DataFrame({'MONTH': pd.to_datetime(date_list), 'NUM_DOWNLOADS_BY_MONTH': mock_installs})
empty_df = pd.DataFrame(columns=['MONTH', 'NUM_DOWNLOADS_BY_MONTH'])
mock_plugin_recent_installs = {'string-1': 25, 'foo': 10, 'bar': 30}
BASE = datetime.today().date().replace(day=1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for some context, what is the reason behind naming all variables in caps?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The python convention for marking a variable to be constant is to name it in uppercase. As all those variables should be treated as constants, I updated their name to reflect the convention.

ref: https://peps.python.org/pep-0008/#constants

@manasaV3 manasaV3 merged commit 244939d into main Dec 6, 2022
@manasaV3 manasaV3 deleted the activity-case-sensitive branch December 6, 2022 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Release Label: Used for categorizing bug fixes in automated CI release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants