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

Convert arg strings to enum values #644

Merged
merged 8 commits into from
Oct 2, 2024
Merged

Convert arg strings to enum values #644

merged 8 commits into from
Oct 2, 2024

Conversation

stevemessick
Copy link
Contributor

@stevemessick stevemessick commented Sep 28, 2024

Fixes #641 as a side effect.

@@ -298,7 +306,7 @@ class KaggleApi(KaggleApi):
config = os.path.join(config_dir, config_file)
config_values = {}
already_printed_version_warning = False
args = {} # DEBUG Add --local to use localhost
args = {'--local'} # DEBUG Add --local to use localhost
Copy link
Contributor

Choose a reason for hiding this comment

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

Revert?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a bit tedious to keep changing it during development. DEBUG is like TODO in that it won't be in the release. I'd prefer to leave it like this for now and change it prior to release.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you clarify? Is there some automated tool that strips this out? I'm fine with it if it's automated, but not if it's a manual step that someone has to do prior to release, because e.g. someone else might do the release and not know that this needs to be done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted.

kaggle/api/kaggle_api_extended.py Show resolved Hide resolved
kaggle/api/kaggle_api_extended.py Outdated Show resolved Hide resolved
kaggle/api/kaggle_api_extended.py Outdated Show resolved Hide resolved
kaggle/api/kaggle_api_extended.py Outdated Show resolved Hide resolved
kaggle/api/kaggle_api_extended.py Show resolved Hide resolved
kagglesdk/competitions/types/competition_enums.py Outdated Show resolved Hide resolved
src/kaggle/api/kaggle_api_extended.py Outdated Show resolved Hide resolved
kaggle/api/kaggle_api_extended.py Outdated Show resolved Hide resolved
kagglesdk/kaggle_http_client.py Outdated Show resolved Hide resolved
@stevemessick stevemessick requested a review from jplotts October 1, 2024 18:37
Copy link
Contributor

@jplotts jplotts left a comment

Choose a reason for hiding this comment

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

Generally it is LGTM, but I can't approve unreleasable and/or untested changes into main. While we don't anticipate anything, priorities and ownerships can change quickly, and work that an engineer planned to do "real soon" gets delayed. It might be worth a quick sync to figure out a strategy that lets you keep moving quickly while preserving our ability to release.

@@ -298,7 +306,7 @@ class KaggleApi(KaggleApi):
config = os.path.join(config_dir, config_file)
config_values = {}
already_printed_version_warning = False
args = {} # DEBUG Add --local to use localhost
args = {'--local'} # DEBUG Add --local to use localhost
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you clarify? Is there some automated tool that strips this out? I'm fine with it if it's automated, but not if it's a manual step that someone has to do prior to release, because e.g. someone else might do the release and not know that this needs to be done.

kaggle/api/kaggle_api_extended.py Outdated Show resolved Hide resolved
0) # Assuming there should be some competitions
competitions = api.competitions_list(group='general')
self.assertGreater(len(competitions), 0)
self.assertLess(len(competitions), 20)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit - I think this should be assertLessEqual? Assuming the page size is 20, it should be possible in the future to get 20, depending on how many are active.

@stevemessick
Copy link
Contributor Author

Potential release blockers have been deleted. PTAL @jplotts and thanks for the review.

Copy link
Contributor

@jplotts jplotts left a comment

Choose a reason for hiding this comment

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

Thanks!

@stevemessick stevemessick merged commit 3a3c549 into main Oct 2, 2024
2 checks passed
@stevemessick stevemessick deleted the string-enums branch October 2, 2024 16:04
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.

How to get the past competitions?
2 participants