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

Feature: Realtime updates of glosario's yml glossary #13

Open
fjohnson opened this issue Jun 13, 2021 · 2 comments
Open

Feature: Realtime updates of glosario's yml glossary #13

fjohnson opened this issue Jun 13, 2021 · 2 comments

Comments

@fjohnson
Copy link

Currently this project fetches a copy of carpentries/glosario's glossary.yml every day and includes it within this repo via a GitHub Action. One issue with this is after installation of glosario-py, the glossary.yml file is never updated again.

Instead, we could add code that calculates a hash of carpentries/glosario glossary.yml and the local copy, upon start up/import. If there is a difference we download the updated copy. If write permissions for downloading the update are a problem, we can cache the updated YAML file in memory and get the library to use that instead of what's on disk.

@brownsarahm
Copy link

There definitely needs to be a way to update the glossary.yml; when installed via pip, the version downloaded is not even the current version from this repository.

A manually triggered update would be a good start, but ideally one that does not require the user to navigate their install paths. Eg, I'd like to use glosario while teaching with participatory live coding. It would be okay to have learners run a command that re-downloads and updates the file, but not that they navigate all of their (very different) installs.

@fjohnson
Copy link
Author

fjohnson commented Jun 25, 2021

Sure, I'd love to help. What do you think of my proposal? The YAML file would be updated on each user's machine each time glosario is imported. I was under the impression that we could get the hash of any file from a repository by asking git - that way it wouldn't need to be downloaded each time-, but now I'm not so sure, I'll have to dig a bit deeper. Optionally the carpentries/glosario (note: not carpentries/glosario-py) repository could also store the hash of the YAML file. But given that a hash cannot be attained to verify whether an update is required, the YAML file is small enough to be downloaded anew on every import: at 214KB that's realistically like importing a minified jQuery twice.

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

No branches or pull requests

2 participants