Philipp Wolfer
866ef71dce
Skip locale test if locales are not built, build locales in CI tests
2023-06-09 09:19:07 +02:00
Philipp Wolfer
79cbc53f4d
i18n: basic tests for working locales
2023-06-09 08:59:16 +02:00
Laurent Monin
8ed7d43435
Merge pull request #2229 from zas/rating_submit_error
...
Display a message when rating submission fails due to server error
2023-06-08 16:43:34 +02:00
Laurent Monin
de81416427
Merge pull request #2228 from phw/PICARD-2653-update-alias-locales
...
PICARD-2653: Update locale list
2023-06-08 16:39:05 +02:00
Laurent Monin
ea09604ce9
Display a message when rating submission fails due to server error
...
- a message is written to status bar and history, translatable
- another message is sent via log.error()
2023-06-08 14:43:23 +02:00
Philipp Wolfer
df55462824
PICARD-2653: Update locale list
...
Add the new additions from MB server code (see MBS-13102)
2023-06-08 13:02:12 +02:00
Philipp Wolfer
ecafcbe79d
Update calculation of patch versions for Windows store
...
For Windows store we combine the patch version with the build number to
ensure continuously growing version numbers for upgrades.
Reduce the version numbers to be multiplied to 1000 to allow for two
digit patch version numbers.
2023-06-07 08:58:16 +02:00
Laurent Monin
88c8dbced8
PICARD-2651: do not propagate history logger either
2023-06-06 07:36:11 +02:00
Laurent Monin
5fb2ad4017
Merge pull request #2224 from zas/update_headers
...
Update copyright headers
2023-06-04 11:27:54 +02:00
Laurent Monin
2f81bf5992
Update copyright headers
2023-06-04 11:08:21 +02:00
Laurent Monin
e51b40b59d
Merge pull request #2223 from zas/fix_header_improv
...
Fix header help script improvements
2023-06-04 11:02:25 +02:00
Laurent Monin
afdcc16b40
Merge pull request #2222 from zas/PICARD-2651
...
PICARD-2651: fix duplicate messages on console
2023-06-04 11:01:42 +02:00
Philipp Wolfer
889a0cdf15
Merge pull request #2221 from zas/webservice_tidyup2
...
Webservice tidy up (pass 2)
2023-06-04 10:34:32 +02:00
Laurent Monin
f9cd8e0d4c
Add fix-header: nolicense
2023-06-04 10:34:01 +02:00
Laurent Monin
40a16cf147
fix-header: add alias for bob
2023-06-04 10:29:41 +02:00
Laurent Monin
9b87499999
fix-header: add support for nolicense to avoid adding our license
...
It also adds support for multiple words in fix-header: line
2023-06-04 10:29:15 +02:00
Laurent Monin
a45a4f0ee9
match -> matched
2023-06-04 10:26:52 +02:00
Laurent Monin
700cfb166e
fix-header: improve aliases matching
2023-06-04 10:26:03 +02:00
Laurent Monin
9cddc64d71
fix-header: replace print() with logging.*()
2023-06-04 10:24:48 +02:00
Laurent Monin
3a845fc53f
PICARD-2651: fix duplicate messages on console
...
Set logging.propagate to False for `main_logger`
2023-06-03 23:22:53 +02:00
Laurent Monin
76154e0b78
Introduce WSRequest.has_auth and simplify _update_authorization_header
...
Add matching tests
2023-06-03 19:41:17 +02:00
Laurent Monin
428a45ef75
WSRequest: move properties initialization to class level if it makes sense
2023-06-03 19:26:32 +02:00
Laurent Monin
37ce367fce
WSRequest: drop (now) useless _init_headers() method
2023-06-03 19:17:13 +02:00
Laurent Monin
bdd31ab5a4
Complete tests for WSRequest
...
- 100% coverage of the class
2023-06-03 17:08:18 +02:00
Laurent Monin
8d1e304fbe
Add minimal testing for WSRequest
2023-06-03 15:05:12 +02:00
Laurent Monin
91a0618a48
qurl -> url, and convert to Qurl is passed as a string
2023-06-03 14:48:59 +02:00
Laurent Monin
eb5b11e227
Drop unused WSRequest.queryargs
...
Parent class methods and properties can achieve the same, so no point in keeping it
2023-06-03 14:35:28 +02:00
Laurent Monin
3286d5dd7b
Drop WSRequest.qurl as we can use parent-class url() method
2023-06-03 14:32:08 +02:00
Laurent Monin
fa55b00380
Set WSRequest.qurl after parent class init and get it from url()
2023-06-03 14:23:14 +02:00
Laurent Monin
7317da9520
WSRequest: drop host, port, path, queryargs parameters, replaced by qurl
...
- build qurl in get(), put(), post(), ... methods instead
2023-06-03 14:23:14 +02:00
Laurent Monin
8bb5457f4f
Simplify tests, pass QUrl to WSRequest
2023-06-03 14:23:14 +02:00
Laurent Monin
37a22223ec
qurl_port() isn't needed anymore, merge to WSRequest.port property
2023-06-03 14:23:14 +02:00
Laurent Monin
55db25ae04
_handle_redirect(): use WSRequest.qurl directly, simplify code
2023-06-03 14:23:14 +02:00
Laurent Monin
0ec5203e72
_handle_redirect(): directly use WSRequest property qurl and method get_host_key()
2023-06-03 14:23:14 +02:00
Laurent Monin
d9429cd70a
WSRequest: host, port, path, queryargs are now properties deduced from WSRequest.qurl
2023-06-03 14:23:14 +02:00
Laurent Monin
f9ee0d37e4
WSRequest: add qurl parameter, to pass a QUrl directly
...
In this case, it replaces host, port, path and queryargs
2023-06-03 13:17:07 +02:00
Laurent Monin
c553dc2947
_handle_redirect(): url -> source_qurl, redirect -> redirect_qurl
...
Use qurl suffix to denote those are QUrl objects, not strings.
2023-06-03 12:41:17 +02:00
Laurent Monin
db12d7fb90
Redirect handling: use WSRequest directly, instead of using get().
...
- remove useless intermediate variables
2023-06-03 12:24:25 +02:00
Laurent Monin
e7e80aa1ba
Merge pull request #2220 from zas/webservice_tidyup
...
Enforce keywords arguments only for WSRequest and drop WS*Request sub…
2023-06-03 12:04:44 +02:00
Laurent Monin
9e7b103a43
download(): call WSRequest() directly
...
parse_response_type=None is the default, so removed
2023-06-03 11:28:28 +02:00
Laurent Monin
3d6554a958
Replace assert with if / raise AssertionError
...
- check path & handler aren't None either
- use a generic dummy_handler method for tests
2023-06-03 11:06:29 +02:00
Laurent Monin
3d95051ecf
Enforce keywords arguments only for WSRequest and drop WS*Request subclasses
...
- using only keyword arguments will ease future changes
- order of arguments do not matter anymore
- this class isn't used directly for now, I don't think any plugin uses it
- subclasses aren't strictly needed
- since methods have a lot of parameters, making them obvious is much easier to read
- we can pass a dict (**kwargs)
- note the use of * in __init__() enforcing keyword args only.
- use few asserts as safety for "mandatory" arguments
2023-06-02 22:44:49 +02:00
Philipp Wolfer
0aa81d009e
Merge pull request #2219 from zas/mbjson_tidy3
...
Tidy up mbjson (pass 3)
2023-06-02 18:02:14 +02:00
Laurent Monin
ee76bf9e51
Improve coverage of artist_to_metadata(), checking for ended/endarea/enddate
...
- drop redundant test
2023-06-02 15:47:16 +02:00
Laurent Monin
a962f9176e
Improve coverage of media_formats_from_node() and medium_to_metadata()
...
- use a multi-media release (this case wasn't tested at all)
- fuse old and new tests
- drop media.json test file as it was only used there
2023-06-02 15:26:53 +02:00
Philipp Wolfer
e9cb996739
Translated using Weblate (German)
...
Currently translated at 100.0% (1594 of 1594 strings)
Co-authored-by: Philipp Wolfer <ph.wolfer@gmail.com >
Translate-URL: https://translations.metabrainz.org/projects/picard/app/de/
Translation: Picard/app
2023-06-02 13:26:27 +00:00
Laurent Monin
2060e3bc82
Add tests for _relations_to_metadata_target_type_url()
...
- 100% coverage of this method
2023-06-02 11:40:00 +02:00
Laurent Monin
b83567d204
Remove unused code
...
- move test in _parse_attributes()
- drop _REPLACE_MAP and _transform_attribute() (only used once)
2023-06-02 11:02:33 +02:00
Laurent Monin
2ae3b54614
Basic tests for _parse_attributes()
2023-06-02 10:59:18 +02:00
Laurent Monin
c82ef8b0f1
Extensively test _locales_from_aliases()
...
- use a stripped down version of aliases (unused fields were removed)
- 100% coverage
- correctness of results has to be reviewed
2023-06-02 00:45:40 +02:00