Laurent Monin
9eda85bf3a
Merge pull request #2389 from zas/collections_cleanup
...
Collections cleanup
2024-04-04 17:45:22 +02:00
Laurent Monin
68367947f4
Simplify Collection constructor and get_user_collection()
2024-04-04 14:44:21 +02:00
Laurent Monin
e042c47fb3
Collection.pending -> Collection.pending_releases
2024-04-04 13:59:32 +02:00
Laurent Monin
3212d62d6a
Use releases consistently for Collection releases
...
`ids` was used in some parts of code, but field in Collection is actually `releases`
2024-04-04 13:57:50 +02:00
Laurent Monin
742c0cf943
Cosmetic change in debug output
2024-04-04 13:29:28 +02:00
Laurent Monin
9c0697cd89
Get rid of COLLECTION_ADD/COLLECTION_REMOVE, pass appropriate methods instead
2024-04-04 13:25:08 +02:00
Laurent Monin
c162fc0e23
Collection._finished(): directly pass success handler
2024-04-04 13:18:02 +02:00
Laurent Monin
f94fb244ab
Collection._finished(): explode it in smaller bits
2024-04-04 13:12:31 +02:00
Laurent Monin
a2d2161efe
Fix "dictionary changed size during iteration" in upgrade hooks loop
...
Introduced by 92b09036e9
2024-04-03 18:53:56 +02:00
Laurent Monin
2daf6f2dc6
Merge pull request #2387 from zas/rg_release_versions
...
Refactor ReleaseGroup._parse_versions()
2024-04-03 15:16:41 +02:00
Laurent Monin
6d9100739d
Add extra tests for prepare_releases_for_versions()
2024-04-03 14:01:34 +02:00
Laurent Monin
5c1bdb5204
Regroup constants at top of the file
2024-04-03 11:38:36 +02:00
Laurent Monin
15891c319a
max_tracks -> VERSIONS_MAX_TRACKS
2024-04-03 11:36:56 +02:00
Laurent Monin
97a8d5213b
Avoid re-using releases, not strictly needed anyway
2024-04-03 11:33:34 +02:00
Laurent Monin
01b8e655fb
ReleaseGroup._parse_versions(): return asap if nothing to do
2024-04-03 11:25:29 +02:00
Laurent Monin
41c47ce8c8
ReleaseGroup.version_headings: define once only, only change with language
2024-04-03 11:24:01 +02:00
Laurent Monin
e29a702453
Move constants to module level
2024-04-03 11:20:44 +02:00
Laurent Monin
7fc47aeab7
releases_to_versions() -> prepare_releases_for_versions()
2024-04-03 11:15:42 +02:00
Laurent Monin
70e8b1d5a7
releases_to_versions(): make it a generator
2024-04-03 11:09:37 +02:00
Laurent Monin
ddb6e74b54
Move code from ReleaseGroup._parse_versions() to releases_to_versions()
2024-04-03 11:08:36 +02:00
Laurent Monin
fccbef14c2
Merge pull request #2384 from zas/option_class_improv
...
Option class improvement
2024-04-02 19:58:26 +02:00
Laurent Monin
f28dec2469
Move cluster & file comparison weights at module level
...
- it reduces the size of Cluster and File objects
- those are constant
2024-04-02 19:51:02 +02:00
Philipp Wolfer
c333208788
PICARD-2850: Use old filename if naming script evaluates to empty filename
...
This is a variation of previously fixed PICARD-2219, but for the case
where only the basename results in an empty name.
2024-04-02 19:49:30 +02:00
Philipp Wolfer
c2aaad5eb7
PICARD-2850: Extend file naming examples with additional variables
...
This includes technical file variables and additional tags that would
be set for the selected recordings.
2024-04-02 19:49:30 +02:00
Laurent Monin
c166041531
Move FILE_INFO_TAGS from class File to module picard.util.tags
...
It reduces the size of objects, and it doesn't seem we ever needed to change it.
2024-04-02 18:25:33 +02:00
dependabot[bot]
0faaca2e16
Bump softprops/action-gh-release from 1 to 2
...
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release ) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases )
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md )
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2 )
---
updated-dependencies:
- dependency-name: softprops/action-gh-release
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-02 18:07:27 +02:00
Laurent Monin
e4fd0d4ce1
Metadata options: Don't use array indexes, use Option.get_default()
...
Relying on indexes here doesn't make much sense, order in the array may change.
2024-04-02 18:05:45 +02:00
Laurent Monin
2364f9f979
Add Option.get_default() method and matching tests
2024-04-02 18:03:06 +02:00
Laurent Monin
7902ab9de3
Add more tests for Option
2024-04-02 17:59:13 +02:00
Laurent Monin
76ba028a5f
Option.__init__(): just raise OptionError in case of double declaration
2024-04-02 17:58:53 +02:00
Laurent Monin
8fdba9a38e
Add new Exception OptionError
2024-04-02 17:25:49 +02:00
ankhedonic
53f2852326
Translated using Weblate (Polish)
...
Currently translated at 56.1% (661 of 1177 strings)
Co-authored-by: ankhedonic <ankhedonic@gmail.com >
Translate-URL: https://translations.metabrainz.org/projects/picard/3/app/pl/
Translation: Picard/App
2024-04-02 10:28:57 +00:00
Laurent Monin
a124383614
Merge pull request #2381 from zas/version_str_vs_to_string
...
Replace `Version.to_string()` with `str(v)` and introduce `Version.short_str()` as a separate method
2024-04-01 14:47:29 +02:00
Laurent Monin
8af9db4d94
Remove now unused Version.to_string()
...
- `v.to_string(short=False)` was replaced by `str(v)`
- `v.to_string(short=True)` was replaced by `v.short_str()`
2024-04-01 12:13:11 +02:00
Laurent Monin
e5b28f21a5
Replace Version.to_string(short=True) by Version.short_str()
2024-04-01 12:10:05 +02:00
Laurent Monin
7c834fef9e
Split code between __str__() and short_str(), keeping to_string() for now
2024-04-01 12:07:20 +02:00
Laurent Monin
c86c364a37
Version has __str__() method calls to_string(), so make use of it
2024-04-01 12:06:18 +02:00
Laurent Monin
82e0bbdd8c
Merge pull request #2379 from zas/simplify_upgrade_config
...
Simplify config upgrade code
2024-03-31 23:10:30 +02:00
Laurent Monin
92b09036e9
autodetect_upgrade_hooks(): returns a dict sorted by version and test that
2024-03-31 17:08:41 +02:00
Laurent Monin
5770c2ccc0
Move check for future version upgrade hook to autodetect_upgrade_hooks()
2024-03-31 16:37:36 +02:00
Laurent Monin
de381708d1
autodetect_upgrade_hooks(): throw new UpgradeHooksAutodetectError exception
2024-03-31 16:01:51 +02:00
salo.rock
9f932d46d9
Translated using Weblate (Italian)
...
Currently translated at 100.0% (1177 of 1177 strings)
Co-authored-by: salo.rock <salo.rock@users.noreply.translations.metabrainz.org >
Translate-URL: https://translations.metabrainz.org/projects/picard/3/app/it/
Translation: Picard/App
2024-03-31 10:28:57 +00:00
Laurent Monin
e87333eb03
Handle another tricky case where 2 methods can be defined for same version
...
That's because we support small variations in string version (like a/alpha).
So, check if the loop tries to set the same dict key twice and raises an exception in this case.
2024-03-31 00:33:16 +01:00
Laurent Monin
f4967de687
Merge remote-tracking branch 'upstream/master' into simplify_upgrade_config
2024-03-31 00:11:58 +01:00
Laurent Monin
9c91debbed
Merge pull request #2380 from zas/stricter_version_from_string
...
Make `Version.from_string()` stricter, matching from start of string
2024-03-31 00:11:32 +01:00
Laurent Monin
4202e2ac35
Make Version.from_string() stricter, matching from start of string
2024-03-31 00:07:02 +01:00
Laurent Monin
7e0b89ccd5
Add a tricky case for upgrade hooks autodetection
...
This case is happening because we only match end of string when it comes to version detection
2024-03-31 00:03:47 +01:00
Laurent Monin
9852b8b1cc
Add tests for upgrade hooks autodetection
2024-03-30 23:59:44 +01:00
Laurent Monin
005837e891
Make Version.from_string() stricter, matching from start of string
2024-03-30 21:21:16 +01:00
Laurent Monin
c422bae446
Merge remote-tracking branch 'upstream/master' into simplify_upgrade_config
...
# Conflicts:
# picard/config_upgrade.py
# test/test_config_upgrade.py
2024-03-30 18:35:30 +01:00