Commit Graph

79 Commits

Author SHA1 Message Date
Nemo
17a5b34816 [libreoffice] Add automation (#354) 2024-06-23 13:01:20 +02:00
Marc Wrobel
08d4ea469e Do not use wait_until='networkidle' by default with fetch_javascript_url (#340)
It does not work in all situation, especially with GitHub-rendered markdown files.
2024-04-02 23:17:51 +02:00
Marc Wrobel
812565e977 Rename support fields to align with eol fields (#338)
Companion PR of https://github.com/endoflife-date/endoflife.date/pull/4931.
2024-04-02 21:41:18 +02:00
Marc Wrobel
0accf350b2 Natively support the %m/%Y and %m-%Y date formats 2024-03-15 23:35:54 +01:00
Marc Wrobel
2f35f1a8c5 [release_table] Allow clicking on page after the JavaScript rendering (#329)
This allows more elements to be rendered before parsing the page.
2024-03-08 23:57:48 +01:00
Marc Wrobel
725ed07ab1 [release_table] Ignore future releases by default (#325) 2024-03-03 17:00:27 +01:00
Marc Wrobel
f6b1e3abed Natively support the %Y/%m/%d date format
For parsing dates such as 2020/01/25, as seen on https://github.com/envoyproxy/envoy/blob/main/RELEASES.md#major-release-schedule.
2024-02-23 23:38:44 +01:00
Marc Wrobel
8fff6e9cbe Natively support the %Y-%b-%d date format
For parsing dates such as 2020-Jan-01, as seen on https://www.electronjs.org/docs/latest/tutorial/electron-timelines.
2024-02-23 23:22:22 +01:00
Marc Wrobel
d1a4918534 Fix report.py 2024-02-22 21:32:00 +01:00
Marc Wrobel
2d5145444b [apple] Adapt script for single-product usage (#317)
Make the Apple script compatible with the way update.py now works, which is 'product' oriented, meaning the script will be called once for each product.

To minimize the impacts the responses are now cached to avoid rate-limiting by support.apple.com.

Version patterns have also been moved to product's auto configuration to make future changes simpler.
2024-02-21 00:21:07 +01:00
Marc Wrobel
c968456d3d [release_table] Improve script for Debian (#315)
- add an 'ignore_empty_releases' to exclude empty releases (which are future releases for Debian),
- improve logging,
- add the 'YYYY-mm' month_year date format.
2024-02-19 22:45:01 +01:00
Marc Wrobel
b10eb19e32 Raise error when a script did not perform any update in a product (#311) (#311)
This is better than just checkin if both the releases and versions list are empty.
2024-02-17 11:13:53 +01:00
Marc Wrobel
9cf243a10e Fix scripts requiring rendering pages with javascript (#310)
Replace request_html by playwright, as request_html, as it is [not maintained anymore](https://pypi.org/project/requests-html/) and scripts using it, such as artifactory.py, started to fail.
2024-02-16 23:13:42 +01:00
Marc Wrobel
1175756d11 Fix releasedata.py (#308)
Release data were not loaded in the `ProductData#__enter__` method. Data would be lost for auto configuration declaring an auto method updating releases followed by an auto method updating versions.

Also raise an error when product data are completely empty after the update, preventing the product data to be updated at all. This does not catch all types of errors (what if the second script silently fails completely ?), but that's a start.
2024-02-16 21:06:41 +01:00
Marc Wrobel
a801200c11 [release_table] Improve script (#305)
- Add strict typing to the fields. This makes the script fail if some column does not have the expected type (for example because of a change in the HTML page).
- Support regex and templating for all fields (not only the releaseCycle). This make it possible to extract only the necessary information without having to do some sort of 'magic' cleanup (replacements in dates have been reverted).
- Do not inject 'releaseCycle' anymore in the JSON (there is already the name).
2024-02-15 00:12:50 +01:00
Marc Wrobel
c94b4ed8bc Support more special date formats (#304)
Add a few replacement to support dates containing th/st/rd or and ending *.
2024-02-13 22:30:28 +01:00
Marc Wrobel
dedc826a95 Add the new release_table method (#300)
Add a new release_table to automate the retrieval of release-level information such as releaseDate, support or eol fields.
2024-02-11 21:46:22 +01:00
Marc Wrobel
b6f14c8d61 Support release-level data (#297)
Support retrieving and updating generic release-level data, such as support and eol dates. The JSON format has been changed accordingly to add a new top-level `releases` key.

The `aws-lambda.py` script has been updated to make use of this new feature.
2024-02-11 16:57:59 +01:00
Marc Wrobel
a0ba2d687e Improve scripts execution orchestration (#299)
Until now products could declare multiple auto-update methods, but they all had to be of the same kind.
For example if you used the git auto-update method, you could not use an additional github_releases or custom auto-update method.
This is an issue as it prevents us to extend the auto-update process, for example by having a product using the 'git' auto-update method to retrieve all the versions, and a custom script to retrieve support and EOL dates.

This improve the scripts execution orchestration to be able to support auto configurations using a mix of methods, meaning:

- multiple kind of methods, such as git and github_release,
- or multiple custom methods.

A side-effect of those changes is that now a failure in a generic script does not cancel the update of subsequent products.

Another side-effect, unwanted this time, is that now custom scripts managing multiple products, such as apple.py, are now executed multiple times instead of once.
2024-02-11 15:28:26 +01:00
Marc Wrobel
8f459f2bc3 Update to support new auto structure (#298)
See https://github.com/endoflife-date/endoflife.date/pull/4570.
2024-02-07 23:27:57 +01:00
Marc Wrobel
4bd2c3dfb8 Process product in alphabetic order for a given method (#296) 2024-02-04 18:14:48 +01:00
Marc Wrobel
dc3f4e0653 [firefox][unity] Add support for cumulative updates and use it in a few scripts (#295)
Generic support for cumulative updates has been added to speed up execution time of some scripts that were very long (in comparison with the vast majority of products), usually because they were involving a lot of HTTP requests.

This feature was developed particularily for the firefox.py and unity.py scripts, which was often very long to execute (a minute or moreaccording to GHA summaries). Those scripts has been updated to make use of this new feature.
2024-02-04 18:05:18 +01:00
Marc Wrobel
0e0e227875 Order scripts by execution duration in GHA summary (#293) 2024-02-04 15:02:08 +01:00
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
8f6efad2cc Simplify endoflife.list_products usage (#292)
Make endoflife.list_products return product instead of just the product name, to avoid having to reload the product a second time to get more information.
2024-02-03 00:26:23 +01:00
Marc Wrobel
651666f594 Remove releasedata.py's Product.has_version method
This method is hardly used, so using Product.get_version instead is a better choice.
2024-01-29 22:38:54 +01:00
Marc Wrobel
42165ea287 Preserve all version fields (#286)
Up to now extra version fields were ignored: only name and date fields were accepted. This changes that by retaining the full JSON data when reading the file, making it possible in the future to support custom fields.

This also fixes a bug with versions having released on the same date: they was not ordered as expected (reverse order).
2024-01-28 23:46:41 +01:00
Marc Wrobel
d72008ae9c Update user-agent (#283)
Update user-agent to the latest Firefox ESR.
2024-01-24 22:58:56 +01:00
Marc Wrobel
1221872660 Support exclusions in auto configurations (#282)
Support a new regex_exclude option to describe versions that must be excluded from the list of retrieved versions.

This will be useful for products such as KDE Plasma, for which beta releases are designated by the use of minor or patch version >= 80.
2024-01-20 18:27:57 +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
d01d8ed04b Simplify product listing (#275)
Small refactoring to simplify product listing by reusing ProductFrontmatter.
2024-01-07 16:50:27 +01:00
Marc Wrobel
74678a75c3 Update release-data JSON file format (#274)
This makes the format open for extension, such as adding release cycle level data (such as EOL dates).

Version data is still accessible by the version's name. While this repeats the version name, it's also much more convenient for users of those data.

A few other things have also been updated in the process:

- verbosity of the diff has been increased in update.py to make workflow summaries more readable,
- dates without timezone are now set to UTC by default (this was already supposed, so no impact expected here).
2024-01-02 11:42:10 +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
7a97c87b3b Refactor latest.py and update.py (#270)
- create new gha.py module,
- improve GitHub workflow commands (GITHUB_OUTPUT, GITHUB_STEP_SUMMARY) interactions,
- improve logging,
- split update.py into smaller functions.
2023-12-31 00:45:30 +01:00
Marc Wrobel
47e29992ae Enable flake8-use-pathlib linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth.
2023-12-30 14:29:24 +01:00
Marc Wrobel
7458563fec Enable flake8-simplify linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-simplify-sim.
2023-12-30 14:29:24 +01:00
Marc Wrobel
801859d78a Enable flake8-return linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-raise-rse.
2023-12-30 14:29:24 +01:00
Marc Wrobel
298ad1a754 Enable flake8-errmsg linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-errmsg-em.
2023-12-30 14:29:24 +01:00
Marc Wrobel
798c298c59 Enable flake8-datetimez linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz.
2023-12-30 14:29:24 +01:00
Marc Wrobel
1bb97fe2b4 Enable flake8-commas linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-commas-com.
2023-12-30 14:29:24 +01:00
Marc Wrobel
b32cb09494 Fix a few Intellij IDEA warnings 2023-12-30 14:29:24 +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
0e8fe135e4 Enable flake8-bugbear linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-bugbear-b.
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
1add3a71d1 Minor refactoring (#262)
- Move frontmatter-related operation from Product to ProductFrontmatter. This makes more senses, as we are manipulating different files / kind of data.
- Use Product directly to load old versions.
2023-12-26 17:33:45 +01:00
Marc Wrobel
c9aca50729 Drop regexes lib (#258)
This was needed until #227 as the Ruby script did not support multiple regexes.

Now that all regexes has been split / simplified in https://github.com/endoflife-date/endoflife.date/pull/4317 and https://github.com/endoflife-date/endoflife.date/pull/4383 the regexes lib is not needed anymore.
2023-12-26 17:33:05 +01:00
Marc Wrobel
a6eebd1dc1 [aws-lambda] Improve script (#259)
- make the script more resilient to changes in the page by using column names,
- use the product release releaseDate as the date, else the date the version was first found, else the current date (previously the date the version was first found was not used),
- move some code to the Product class.
2023-12-18 00:02:38 +01:00
Marc Wrobel
6453bca256 Remove unused write_releases method
This method is unused now that all scripts are using the Product class.
2023-12-15 14:19:30 +01:00
Marc Wrobel
dfb113d589 [git] Refactor script (#227)
Make the script more readable, mostly by:

- using the Product and AutoConfig classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.

Note that this also changed the module used for regexes in endoflife.py. The regex module is now used because the Python re module does not support identically named groups (as used in the mariadb product). The regex module being backwards-compatible with the standard re module, this should not be an issue.
2023-12-10 22:07:35 +01:00
Marc Wrobel
9e0f4a437a [github_releases] Refactor script (#226)
Make the script more readable, mostly by:

- using the Product and AutoConfig classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.
2023-12-10 21:47:49 +01:00