-
Notifications
You must be signed in to change notification settings - Fork 542
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
[skip ci] build only required modules #6900
base: main
Are you sure you want to change the base?
Conversation
to_delete = json.loads(sys.argv[1]) | ||
|
||
for module in to_delete: | ||
apk_name = f"tachiyomi-{module}-v1.4.*.apk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apk_name = f"tachiyomi-{module}-v1.4.*.apk" | |
apk_name = f"tachiyomi-{module}-v*.*.*.apk" |
import json | ||
import sys | ||
from pathlib import Path | ||
from typing import List, Tuple, Dict, Any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List, Tuple, and Dict can be replaced with list, tuple, and dict since Python 3.9, which is oldest version that is still supported.
|
||
return list(modules), list(deleted) | ||
|
||
def chunker(iterable: List[str], size: int) -> Dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should replicate the signature of itertools.batched
, the docs contain an implementation that can be used for Python <3.12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further down you would use something like (can probably be formatted better):
chunked = {"chunk": [{"num": i, "modules": list(batch)} for i, batch in enumerate(batched(modules, int(os.getenv("CI_CHUNK_SIZE", 65))))]}
needs (more) testing and review