Commit graph

73 commits

Author SHA1 Message Date
c99180b299 update database rake tasks 2025-12-21 02:56:31 -08:00
0c9d1d8e06 add element variant downloading for null element weapons 2025-12-16 21:15:39 -08:00
7e548109d6 improve wiki import suggestions
- strip _note suffix from null element weapon IDs
- look up weapon series by name to return UUID
2025-12-16 21:12:16 -08:00
9f2d9abdb5 add max_level to wiki import suggestions 2025-12-16 17:12:02 -08:00
244e3f51eb remove Standard series, shift IDs down 2025-12-15 17:47:23 -08:00
93e3526d1e fix comma-separated series parsing in batch import 2025-12-15 17:47:00 -08:00
579736e981 remove gacha_available from character parsers/importers 2025-12-15 16:53:44 -08:00
d613da4428 add job skill image downloader 2025-12-15 16:08:57 -08:00
df6d811736 parse gacha fields from wiki data for characters 2025-12-15 09:51:15 -08:00
f28e61b303 add Holiday to CHARACTER_SERIES enum 2025-12-15 09:50:53 -08:00
ee96bf3ce8 fix weapon proficiency parsing from wiki data 2025-12-14 21:50:25 -08:00
b141cd07c4 fix wiki field names for uncap parsing
- characters/summons use max_evo, weapons use evo_max
- characters: 5=FLB, 6=ULB
- summons: 4=FLB, 5=ULB, 6=trans
- keep 5star fallback for legacy character data
2025-12-14 21:13:59 -08:00
f083258552 fix wiki suggestion parsing: element case, stats fields, url extraction 2025-12-14 19:36:03 -08:00
57b5cd0d33 extract summon_id from wiki data in batch preview 2025-12-14 16:29:29 -08:00
9e72e828f7 fix wiki fetch: add user-agent header and proper error handling 2025-12-14 12:57:50 -08:00
4d75835c71 move WikiError into Granblue namespace to fix production autoloading 2025-12-14 12:41:07 -08:00
3601579a7b fix weapon importer to use series slug 2025-12-14 11:58:38 -08:00
e5d80bde23 add ArtifactDownloader for artifact images
downloads square (s) and wide (m) sizes from game CDN
2025-12-03 13:37:04 -08:00
d6d655297b add artifact seed data 2025-12-03 12:58:35 -08:00
301f323ee1 add rake tasks to populate gacha fields from wiki_raw 2025-12-02 07:26:19 -08:00
c1a5d62a12 add promotions parsing to weapon and summon parsers 2025-12-02 05:51:42 -08:00
7aa0521ca4 add promotions to weapon and summon importers 2025-12-02 05:51:30 -08:00
e0a82bc7a4 add season/series/gacha_available to importer and parser 2025-12-02 05:48:22 -08:00
033e50a1c8 add force option to base downloader 2025-12-02 05:26:41 -08:00
49e52fffb5 add rake tasks for gacha promotions migration and verification 2025-12-02 04:39:23 -08:00
dd0662e639 add auto_populate task for character season/series from name patterns 2025-12-02 04:27:57 -08:00
284ee441f1 add rake tasks for character season/series CSV export and import 2025-12-02 04:20:29 -08:00
f5760b1833 add batch_preview endpoint for entity import 2025-12-01 23:39:49 -08:00
be5be0c3fe fix blueprints: use correct association names instead of 'object' 2025-11-29 17:41:29 -08:00
07e5488e0b Add custom page size support via X-Per-Page header
- Add page_size helper method to read from X-Per-Page header
- Set min (1) and max (100) bounds for page sizes
- Update all paginated endpoints to use dynamic page size
- Maintain backward compatibility with default sizes
2025-09-17 05:44:14 -07:00
cec6132823 Update wiki namespace in parsers 2025-03-02 16:19:13 -08:00
311c218863 Adds a task for fetching data from wiki
Can be used to fetch one object or multiple
2025-03-02 16:17:32 -08:00
2de10d03f3 Fix path for Wiki object 2025-03-01 06:34:29 -08:00
e75578bea3 Refactor download_all_images task
This refactor focuses on implementing parallelization. This allows us to pass in a number of threads and download concurrently. This makes downloading lots of images a lot faster.
2025-03-01 05:43:57 -08:00
ffbc8d0c1e Add support for passing in a Logger 2025-03-01 05:43:05 -08:00
0d997d6ad5 Add new image sizes
* Weapons can now download the “raw”image size, which is the weapon art without a background
* Characters now download the “detail” image size, which is a horizontal crop of the character’s art
* Summons now download the “detail” image size, which is a horizontal crop of the summon’s art
* Summons also download “ls” and “m” instead of “party_main” and “party_sub”, as they match the aspect ratio of weapon sizes better, which should make our lives a lot easier.
2025-03-01 05:42:40 -08:00
5955ef2650 Add support for single sizes
You can now pass one of the sizes in to only download that size for the object.
2025-03-01 05:40:34 -08:00
4d3c1a800b
Update config files (#189)
* Update weapon series migration

This update fixes MigrateWeaponSeries from 20250218 such that it can be run on an empty database without throwing errors.

* Update .gitignore

Hide backups and logs directories, since we’ll be storing these in the project folder. Also hide mise’s .local directory.

* Change NewRelic log directory

Moved from log/ to logs/

* Add rake task for backing up/restoring prod db

* Rubocop fixes

* Fix error where :preview_state didn’t have an attribute

* Add supervisord ini

This uses my local paths, so we should try to abstract that away later.

* Ignore mise.toml
2025-02-27 23:13:57 -08:00
6db5faeb98
Add items from January/February 2025 (#184)
* Add new items

Items from:
- Unite and Fight (January 2025)
- Story Event (January 2025)
- Negima Collab (February 2025)
- January Flash Gala
- January Legend Festival
- February Flash Gala
- February character uncap

Data fixes for
- Chat Noir FLB (rarity was set to a bad value)
- End of year weapons (FLB date not set)

* Fix CSVs

* Fix data update rake task

* Add CSV require in BaseImporter
2025-02-24 16:09:30 -05:00
11db6674fc
fix migrator (#183)
- rename migration so it happens first
- postdeployment database migrator now migrates database and data migrations in chronological order
2025-02-18 01:47:23 -08:00
bb96593798
Update database_migrator.rb (#182)
Make database migrator run migrations in order
2025-02-18 01:12:15 -08:00
a042847aab
Migrate to Query Builder (#179)
* Moved queries into PartyQueryBuilder service

PartyQueryBuilder supersedes PartyQueryingConcern as it is also used for UsersController (and is our fix for profiles being broken)

* Implement PartyQueryBuilder in controllers

* Update summon_transformer.rb

This should fix the transformer so that we properly capture summons and subaura summons

* Update parties_controller_spec.rb

* Add NewRelic license key

* Add Sentry

Why not?
2025-02-12 23:43:02 -08:00
11d324efe9
Fix image embeds 3 (#176)
* Add default preview images

* Update application.rb

* Adds app assets path in API mode
* Cleans up file

* Create assets.rb

An initializer for font assets (for image generation)

* Updates to Canvas and Coordinator

* Update parties_controller.rb

* Adds retry header if generation is still in progress
* Streams S3 content instead of redirecting to prevent 302

* Update coordinator.rbs

* Create previews.rake

A rake task for generating images offline

* Add commands to build phase
2025-01-20 03:55:22 -08:00
ad2e2cc028
More embed image bandaids (#175)
* Only re-index search when records are updated

* Add logs and fixes

* Add preview_s3_key to Parties

* Add some extra packages to Nixfile

* Add logging around custom font use
2025-01-18 22:32:13 -08:00
7d164b540c
Adds documentation to some lib functions (#168)
* Add sigs and docs to transformers

* Add sigs and docs to downloaders

* Adds sigs and docs to importers
2025-01-18 03:09:29 -08:00
0d5d4d5f59
Jedmund/import (#167)
* Move app/helpers/granblue_wiki to lib/parsers/wiki

This clears up the namespace beginning with "Granblue"

* Removed some top-level Granblue libs

DataImporter and DownloadManager exist inside of the PostDeployment namespace now so these files are redundant

* Fix Downloaders namespace

Our namespace was singular Downloader, now it is plural Downloaders to match the folder name

* Fix import paths

* DownloadManager was moved to downloaders/
* import_data task now uses the PostDeployment version of DataImporter

* Update application.rb

Eager-Load/Autoload the lib/ folder

* Update cors.rb

Add Granblue website and Extension ID to CORS

* Add transformers

Transformers take raw data from Granblue Fantasy and transforms them into hensei-compatible JSON. Transformers heavily borrow from vazkii/hensei-transfer.

* Add ImportController and route

This adds the controller that handles creating a full party from transformed Granblue Fantasy data
2025-01-17 12:02:12 -08:00
6a60b605b6
Fix issue with migrations in Rails 8 (#165) 2025-01-16 00:34:13 -08:00
d75e4a8448
Downloader fixes (#162)
* Fix summon data

* Update logic for downloaders

These are responsible for downloading variants (01, 02, etc)

* Update puts statement

* Simplify ImageDownloader

* Simplify DownloadManager
2025-01-15 19:15:58 -08:00
fa386511e1
Some final post-deploy fixes (#161)
* Fix track_record error

* Add newlines

* Update PR templates
2025-01-15 18:06:20 -08:00
52f213d4cb
Update importer (#160)
* Importer now displays validation errors

This will help people debug errors before submitting their PR.

* Fix errors in the outstanding updates
2025-01-15 17:46:14 -08:00