Skip to content

Example Scripts Folder #54

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

Merged
merged 2 commits into from
Jun 7, 2022
Merged

Example Scripts Folder #54

merged 2 commits into from
Jun 7, 2022

Conversation

artliou-scale
Copy link
Contributor

@artliou-scale artliou-scale requested review from fatihkurtoglu and a team May 12, 2022 22:17
@artliou-scale artliou-scale force-pushed the maint/examples_folder branch 2 times, most recently from a25a970 to 2e63db2 Compare May 12, 2022 23:08
Comment on lines 1 to 7
# Script that takes in an array of batch names (split by comma) and
# applies a bulk action to cancel all tasks in each batch.
# By default, this script makes 50 concurrent API calls.

# Example: python cancel_batch.py --api_key "SCALE_API_KEY" --batches "batch1,batch2" --clear "True"

import argparse
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor, as_completed
import sys

import scaleapi
from scaleapi.exceptions import ScaleException, ScaleUnauthorized
Copy link
Contributor

Choose a reason for hiding this comment

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

I think our code linter wants your imports at the very top of the file and then your script explanation below

@artliou-scale artliou-scale force-pushed the maint/examples_folder branch 2 times, most recently from 00d84ef to 3378bb9 Compare May 24, 2022 17:24
@artliou-scale artliou-scale force-pushed the maint/examples_folder branch 2 times, most recently from daecff3 to 0a87e9a Compare June 6, 2022 22:52
@artliou-scale artliou-scale force-pushed the maint/examples_folder branch from 0a87e9a to 2d66f64 Compare June 6, 2022 23:01
@artliou-scale artliou-scale requested a review from shaun-scale June 6, 2022 23:03
Copy link
Contributor

@fatihkurtoglu fatihkurtoglu left a comment

Choose a reason for hiding this comment

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

Lgtm! Do you think we should have an Examples section in README to list and link to example scripts? I think we may have more examples going forward and having a list would be helpful.

@artliou-scale
Copy link
Contributor Author

Lgtm! Do you think we should have an Examples section in README to list and link to example scripts? I think we may have more examples going forward and having a list would be helpful.

Yeah, let me update README in this PR too.

@artliou-scale artliou-scale force-pushed the maint/examples_folder branch from e0ff19c to 00b515d Compare June 7, 2022 21:44
@artliou-scale artliou-scale force-pushed the maint/examples_folder branch from 00b515d to f599c4b Compare June 7, 2022 21:51
@artliou-scale artliou-scale merged commit 4c46e1a into master Jun 7, 2022
@artliou-scale artliou-scale deleted the maint/examples_folder branch June 7, 2022 22:09
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.

3 participants