Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(barcalendar): auto-populate current versions from Tutor (#414)
* fix: Update Elasticsearch support dates Add support date for Elasticsearch version 7.17. Did not include support dates for previous versions between 7.14 and 7.16 inclusive. * chore: Add auto pull version from tutor's config Add functions for automatically pulling version number from tutor's default config file and choosing which bars to bold and outline. This pulls the name and / or number for the current version of openedx, MongoDB, Elasticsearch, MySQL, and Redis. It does not pull the current version of Python, Django, Ubuntu, Node, or Ruby. To be clear, this commit doesn't add new bars to the calendar, it only automates how we choose which bars to bold and outline. For example, if we were to switch to Elasticsearch 8.x.x, we'll still need to manually add the release and EOL dates. * fix: Regex to match version name if suffix is word See here for original comment: #414 (comment) Version name might be something like "palm.master", in which case we don't just want to capture a version number. * refactor: Import yaml library for consistency Was previously importing a specific function but this was not consistent with style. See here for original comment: #414 (comment) * fix: Raise error if status code isn't 200 Before, if http request to tutor's defaults.yml returned status code != 200, function would return None and continue. No error would be raised. This fix now raises a RuntimError. See here for original comment: #414 (comment) * refactor: Remove f-string for single expressions f-string is unnecessary if the string is a single Python expression. Replaced f-string with just the expression where possible. See here for original comment: #414 (comment) * fix: Simplify regex for matching version name * fix: Use requests' built-in method to raise exc * refactor: Separate third-party imports from built-in Co-authored-by: Ned Batchelder <[email protected]> * fix: Raise error if version name/number not found Before, if version name or number wasn't found, will continue to run program and generate a bar calendar that doesn't have bolded bars. Want to instead raise an error. See here for original comment: #414 (comment) --------- Co-authored-by: Ned Batchelder <[email protected]>
- Loading branch information