Commit Graph

19 Commits

Author SHA1 Message Date
Marc Wrobel
56cc29b49d Make releasedata.Product usable in 'with' expression (#294)
This way the writing of the JSON file is handled automatically if the update does not fail.
It pave the way to further global improvements, such as a better error handling.
2024-02-04 14:48:05 +01:00
Marc Wrobel
b339c81ead Split endoflife.date and releasedata models in separate files (#276)
This makes the code easier to read.
2024-01-07 20:22:46 +01:00
Marc Wrobel
f6a8349c46 Centralize GitHub Workflow groups declaration (#272)
It may not be the best place for that (gha.py would have been better), but it's the shorter / faster way to do it for now.

Moreover it now uses logging for writing the group. The logger format has been updated for this to work. This was done to fix issues on GitHub Action logs, where groups were declared after the logs.
2023-12-31 17:00:11 +01:00
Marc Wrobel
f49e3dff15 Enable flake8-annotations linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-annotations-ann.
2023-12-30 14:29:24 +01:00
Marc Wrobel
6002cbdb26 Enable isort linting rules (#267)
See https://docs.astral.sh/ruff/rules/#isort-i.
2023-12-30 14:29:24 +01:00
Marc Wrobel
c20b65124d [cos] Refactor script (#219)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.
2023-12-10 16:54:44 +01:00
Marc Wrobel
7cf62c2355 Refactor HTTP common code (#207)
- move to common/http.py,
- make fetch_url return a Response.
2023-12-02 22:52:12 +01:00
Marc Wrobel
0d17306872 Simplify date parsing (#195)
Create common functions parse_date, parse_month_year_date and parse_datetime.

Those functions support trying multiple formats, and come with default formats lists that support most of the date format encountered so far.

Notable change: year-month dates are now set to the end of month (impacted couchbase-server and ibm-aix).
2023-11-26 21:01:35 +01:00
Marc Wrobel
79f7e13dd9 [cos] Make HTTP requests in parallel (#187)
Its cuts the script execution time roughly by two during my tests.
2023-11-26 14:00:42 +01:00
Marc Wrobel
ca689dc373 Support parallel URL fetching via endoflife.fetch_urls (#184)
Move the parallel URL fetching from firefox.py to endoflife.py to make available parallel URL fetching for all scripts.

Also a a fix found on https://stackoverflow.com/a/44511691/374236 to avoid ChunkedEncodingError.
2023-11-26 11:34:18 +01:00
Marc Wrobel
600e77e212 Sort versions by date then version for all products (#179) 2023-11-15 22:30:31 +01:00
Marc Wrobel
86f1f1386a [cos] Fix date parsing 2023-09-11 23:00:51 +02:00
Marc Wrobel
208ab8e2f8 Apply various minor refactorings
Improve readability and fix a few Python warnings (line too long, exception too broad...) through various minor refactorings.
2023-06-11 12:45:59 +02:00
Marc Wrobel
6ba7828f96 Refactor product releases writing
Create a common function to write resulting JSON files to the releases directory.
It makes this task simpler to read and maintain, while making it modifiable at a central point in the future.
One example of such modification could be the sorting of the versions in a uniform way for all the scripts.
2023-06-11 12:45:59 +02:00
Marc Wrobel
a16d9090d3 Refactor HTTP URL fetching scripts
This creates a common function to fetch HTTP URLs, with enhanced capabilities (retry, use of a known User-Agent).
It makes scripts that need those capabilities simpler, while improving other scripts.

This commit also fixes some scripts that did not log properly (cos.py, eks.py, haproxy.py, palo-alto-networks.py, rhel.py, ros.py, unrealircd.py).
2023-06-11 12:45:59 +02:00
Nemo
6ec64a5c8d [cos] Workaround for broken table for cos-105 2023-04-28 07:36:14 +00:00
Martin Petkov
267cf16568 Automatically find COS milestones in the web page (#89) 2023-04-04 18:17:23 +00:00
Nemo
b5cc28f87e [cos] Retry requests on failure
Google Docs website returns a lot of SSL errors, so retry
2022-12-17 16:25:25 +05:30
Nemo
6a3d2f72be COS automation (#40) 2022-12-15 12:08:58 +05:30