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

Refactor bootstrap #2862

Merged
merged 6 commits into from
Dec 18, 2024
Merged

Refactor bootstrap #2862

merged 6 commits into from
Dec 18, 2024

Conversation

ouziel-slama
Copy link
Contributor

@ouziel-slama ouziel-slama commented Dec 17, 2024

  • Double-check the spelling and grammar of all strings, code comments, etc.
  • Double-check that all code is deterministic that needs to be
  • Add tests to cover any new or revised logic
  • Ensure that the test suite passes
  • Update the project release notes
  • Update the project documentation, as appropriate, with a corresponding Pull Request in the Documentation repository

@ouziel-slama ouziel-slama marked this pull request as draft December 17, 2024 19:06
with open(zst_filepath, "rb") as input_file:
pyzstd.decompress_stream(input_file, output_file, read_size=16 * 1024)
os.remove(zst_filepath)
os.chmod(filepath, 0o660)

Check warning

Code scanning / Bandit

Chmod setting a permissive mask 0o660 on file (filepath). Warning

Chmod setting a permissive mask 0o660 on file (filepath).
filepath = os.path.join(data_dir, filename)
with io.open(filepath, "wb") as output_file:
pyzstd.decompress_stream(response, output_file, read_size=16 * 1024)
os.chmod(filepath, 0o660)

Check warning

Code scanning / Bandit

Chmod setting a permissive mask 0o660 on file (filepath). Warning

Chmod setting a permissive mask 0o660 on file (filepath).
# download and decompress .tar.zst file
print(f"Downloading and decompressing {zst_url}...")
start_time = time.time()
response = urllib.request.urlopen(zst_url) # nosec B310 # noqa: S310

Check warning

Code scanning / pylint

Consider using 'with' for resource-allocating operations. Warning

Consider using 'with' for resource-allocating operations.

confirmation_message = colored("Continue? (y/N): ", "magenta")
if input(confirmation_message).lower() != "y":
exit()

Check warning

Code scanning / pylint

Consider using 'sys.exit' instead. Warning

Consider using 'sys.exit' instead.
filepath = os.path.join(os.path.dirname(zst_filepath), filename)
with io.open(filepath, "wb") as output_file:
with open(zst_filepath, "rb") as input_file:
pyzstd.decompress_stream(input_file, output_file, read_size=16 * 1024)

Check warning

Code scanning / pylint

Module 'pyzstd' has no 'decompress_stream' member. Warning

Module 'pyzstd' has no 'decompress_stream' member.
filename = zst_filename.replace(".latest.zst", "")
filepath = os.path.join(data_dir, filename)
with io.open(filepath, "wb") as output_file:
pyzstd.decompress_stream(response, output_file, read_size=16 * 1024)

Check warning

Code scanning / pylint

Module 'pyzstd' has no 'decompress_stream' member. Warning

Module 'pyzstd' has no 'decompress_stream' member.
@ouziel-slama ouziel-slama changed the title refactor bootstrap Refactor bootstrap Dec 18, 2024
@ouziel-slama ouziel-slama marked this pull request as ready for review December 18, 2024 10:08
@ouziel-slama ouziel-slama mentioned this pull request Dec 18, 2024
@ouziel-slama ouziel-slama merged commit f310c3d into develop Dec 18, 2024
19 checks passed
@ouziel-slama ouziel-slama deleted the bootstrap branch December 18, 2024 14:01
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