roedoejet / g2p

Grapheme-to-Phoneme transductions that preserve input and output indices, and support cross-lingual g2p!
https://g2p-studio.herokuapp.com
Other
119 stars 26 forks source link

Urgent: Heroku does not like dynamic versioning #361

Closed dhdaines closed 3 months ago

dhdaines commented 3 months ago

For whatever reason, Heroku expects to be able to run your app in-place without installing it in any way. This is not a great idea when your "app" is really a library which also happens to contain an app, but whatever.

Luckily it provides you with hooks (not sure where these are documented but the code says "people rely on this") so we can run pip install -e . to fix that... and under certain circumstances (Heroku still believes python setup.py develop is a current practice it seems?) it will even do this for you.

Except of course that even though Heroku uses git to deploy, it in no way gives you access to the git repository itself! NO HISTORY FOR YOU! And thus no version information... So we have to use the same technique as in GitHub CI to ensure not only that g2p/_version.py gets created, but that the build doesn't crash.

github-actions[bot] commented 3 months ago
CLI load time: 0:00.05
PR head 38d5290ea7352d7a01ddc4ed5f92d8d456d68b2d
Imports that take more than 0.1 s:
import time: self [us] | cumulative | imported package
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.72%. Comparing base (6333947) to head (38d5290).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #361 +/- ## ======================================= Coverage 93.72% 93.72% ======================================= Files 17 17 Lines 2341 2341 Branches 520 520 ======================================= Hits 2194 2194 Misses 83 83 Partials 64 64 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dhdaines commented 3 months ago

UGH. I cannot merge this because it needs approval. Remind me not to do things on Friday evening.