Skip to content

ENH: Ask in Builder before downloading a Google Font#7082

Merged
TEParsons merged 8 commits intopsychopy:devfrom
TEParsons:dev-enh-google-ask
Feb 7, 2025
Merged

ENH: Ask in Builder before downloading a Google Font#7082
TEParsons merged 8 commits intopsychopy:devfrom
TEParsons:dev-enh-google-ask

Conversation

@TEParsons
Copy link
Copy Markdown
Contributor

Currently, if a font isn't found, we download it from Google Fonts and print a warning. However, if the user doesn't have an internet connection, this leads to a ConnectionError on every run if they have a typo in a font name. In general it also just doesn't seem like a good idea to be making a call to requests in runtime.

This PR moves the Google Font checking out to Builder, allowing us to ask the user before connecting (upon clicking "Okay" on the Component dialog) rather than warning them after.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 51.11111% with 22 lines in your changes missing coverage. Please review.

Project coverage is 49.97%. Comparing base (589bea1) to head (687853d).
Report is 31 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7082      +/-   ##
==========================================
- Coverage   49.99%   49.97%   -0.03%     
==========================================
  Files         347      347              
  Lines       64062    64061       -1     
==========================================
- Hits        32028    32013      -15     
- Misses      32034    32048      +14     
Components Coverage Δ
app ∅ <ø> (∅)
boilerplate ∅ <ø> (∅)
library ∅ <ø> (∅)
vm-safe library ∅ <ø> (∅)

@TEParsons TEParsons merged commit e0a0b65 into psychopy:dev Feb 7, 2025
7 checks passed
@TEParsons TEParsons deleted the dev-enh-google-ask branch February 12, 2025 16:58
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.

1 participant