Commit Graph

589 Commits

Author SHA1 Message Date
Claudio Ortolina 1b7e940932 Merge pull request #9 from cloud8421/cloud8421/fix-cache-key-to-include-tool-versions
Include OTP and Elixir version in cache keys
2024-12-19 20:37:49 +00:00
Claudio Ortolina 7b2d641190 Include OTP and Elixir version in cache keys 2024-12-19 20:32:30 +00:00
Claudio Ortolina 9dce1cacb9 Where possible, use built-in JSON instead of Jason
Note that it's not possible to replace any call where we encode and
pretty print, as JSON doesn't have such functionality.
2024-12-19 20:18:09 +00:00
Claudio Ortolina aaad2561ec Update to OTP 27.2 2024-12-19 19:59:32 +00:00
Claudio Ortolina 45df749200 No need to create a range when total_pages is 0
Fixes:

warning: Range.new/2 and first..last default to a step of -1 when last < first.
Use Range.new(first, last, -1) or first..last//-1, or pass 1 if that was your intention
2024-12-19 19:07:08 +00:00
Claudio Ortolina 129e9e680f Update to Elixir 1.18 2024-12-19 19:04:35 +00:00
Claudio Ortolina e363328c12 Ignore Lexical build folder 2024-12-19 19:04:34 +00:00
Claudio Ortolina 832e835252 Add function to get embeddings for arbitrary string 2024-12-18 22:20:41 +00:00
Claudio Ortolina d76c108896 Rename file to match module name 2024-12-18 21:58:07 +00:00
Claudio Ortolina 676a9ba681 Add missing instructions for OPENAI_KEY environment variable 2024-12-18 16:44:17 +00:00
Claudio Ortolina 6bef3bed05 Add total for collection and wishlist albums in artist view 2024-12-18 11:33:48 +00:00
Claudio Ortolina a3306c84c3 Increase album grid density in artist view 2024-12-18 11:27:07 +00:00
Claudio Ortolina 53b89dc329 Extract Artists context 2024-12-18 11:12:06 +00:00
Claudio Ortolina 76605a1114 Add function to get similar artists 2024-12-17 20:44:31 +00:00
Claudio Ortolina c60108292a Scroll to top when paginating on small viewports 2024-12-16 18:03:26 +00:00
Claudio Ortolina 637434b50d Underscore unused variable 2024-12-15 19:02:58 +03:00
Claudio Ortolina 019d2fb7f2 Reduce size of test data in stats test
Test is equally effective and a few times faster.
2024-12-15 18:57:48 +03:00
Claudio Ortolina e4fe4e7f4b Cache images for 24 hours 2024-12-15 12:09:29 +03:00
Claudio Ortolina 6660d195e4 Decrease visible records per page
After months of usage, I rarely paginate the list, so it's not necessary
to load 100 at a time. 20 is enough.

By matching 20 records with a 20 pool size, we should keep the repo
queue time to a minimum.
2024-12-15 11:15:46 +03:00
Claudio Ortolina 35435e11c0 Performance tuning
To decrease the repo queue time, we increase the pool size to 10, and
increas RAM accordingly.
2024-12-15 10:59:24 +03:00
Claudio Ortolina 6efe026629 Try and run deploy explicitly on ubuntu-24.04
This addresses an annotation by GitHub:

ubuntu-latest pipelines will use ubuntu-24.04 soon.
For more details, see https://github.com/actions/runner-images/issues/10636
2024-12-15 10:46:57 +03:00
Claudio Ortolina 3fbd6ba1bf Use release and release group fixtures with names everywhere 2024-12-14 23:52:09 +03:00
Claudio Ortolina 4ede4e3736 Add test for importing a record from scrobble activity 2024-12-14 23:41:39 +03:00
Claudio Ortolina a19d42ae30 Add more fixtures for release groups and releases 2024-12-14 23:24:21 +03:00
Claudio Ortolina 632f5c4661 Include album names in mb fixtures 2024-12-14 23:19:14 +03:00
Claudio Ortolina c705517415 Restore import functionality from stats
Accidentally removed in 135d1c2.
2024-12-14 17:23:59 +03:00
Claudio Ortolina 2fbe9db016 Refactor test to extract data dependencies 2024-12-14 17:16:55 +03:00
Claudio Ortolina 04d60b09a4 Extract search component 2024-12-13 23:22:21 +03:00
Claudio Ortolina 7d2860649e Update dependencies
decimal 2.2.0 => 2.3.0
phoenix_live_view 1.0.0 => 1.0.1
2024-12-13 23:04:14 +03:00
Claudio Ortolina a4f4407241 Center-ish counters in stats page 2024-12-13 22:41:42 +03:00
Claudio Ortolina f7045a9f14 Extend testing of artist page 2024-12-13 22:25:06 +03:00
Claudio Ortolina ed86ef7b5a Enable new actions menu on wishlist detail page 2024-12-12 20:23:48 +03:00
Claudio Ortolina c3f973b1e1 Move record actions into menu 2024-12-12 20:14:02 +03:00
Claudio Ortolina 91b81de0f8 Remove duplication around MusicBrainz URL generation 2024-12-11 23:54:21 +03:00
Claudio Ortolina 3409ba6d6b Fix typings on config modules 2024-12-11 23:53:29 +03:00
Claudio Ortolina 21439a580f TODO: make artist records a stream 2024-12-11 23:24:38 +03:00
Claudio Ortolina 3c85f9e974 Extract OpenAI.Completion struct 2024-12-11 23:24:16 +03:00
Claudio Ortolina 8d7fe4d660 Extract record list component 2024-12-11 22:47:23 +03:00
Claudio Ortolina 3dde44a58f Update dependencies
phoenix 1.7.17 => 1.7.18
2024-12-11 11:36:45 +03:00
Claudio Ortolina 693b350db2 Add papertrail for copied code 2024-12-10 19:24:48 +03:00
Claudio Ortolina 31b6100687 Shrink buttons on mobile 2024-12-10 18:48:49 +03:00
Claudio Ortolina 44a8650c6c Move API Key to configuration 2024-12-10 16:50:37 +03:00
Claudio Ortolina b68a7ac734 Can fetch genres from OpenAI 2024-12-10 16:45:29 +03:00
Claudio Ortolina 1cd38e5358 Increase response determinism
- Lower temperature
- Add explicit limit and ordering instructions
2024-12-10 16:30:51 +03:00
Claudio Ortolina 6326948dbf Return correct JSON 2024-12-10 16:24:19 +03:00
Claudio Ortolina 2476a17978 Add small experiment to test genre lookup 2024-12-10 16:18:11 +03:00
Claudio Ortolina 4a706dc77a No need to expose these functions 2024-12-10 15:24:43 +03:00
Claudio Ortolina c2ccb7dde2 Add LastFm.Feed.all_artists/0 and LastFm.Feed.all_albums/0 2024-12-10 14:57:28 +03:00
Claudio Ortolina a6e1e4e34a Renamte LastFm.Feed.all/0 to LastFm.Feed.all_tracks/0 2024-12-10 14:57:06 +03:00
Claudio Ortolina f48372f7b3 Use MapSets for performance
Not noticeable with current database size, but lays a good foundation
for larger libraries.

For example, given a list of 300 artist IDs, checking if an ID is in the
list takes between 30 and 40 ms (for an ID towards the end of the list),
while the MapSet version takes consistently between 15 and 20 ms.
2024-12-10 14:21:57 +03:00