Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add stat object that stores transformation information #117

Merged
merged 5 commits into from
Feb 5, 2025
Merged

Conversation

GoodBoyDigital
Copy link
Member

Added some stats and a few other bits!

  1. add stats object to assets

    • All assets not have a little stat object that stores transformation information. Currently this is transform time, transform date, success and error (if success is false).
  2. expose root asset

    • Added a rootAsset to AssetPack so devs who are feeling adventurous can gain access to the underlying assets
  3. tweak how we use the cache

    • Whilst writing the test, i realised that when calling run on the same assetpack instance multiple times and in between runs, changing the assets in the input folder then things get broken!
    • The main reason for this was that the cache was written correctly between runs, but only read on the first run. I have adjusted the API so that now AssetWatcher now expects an AssetCache (with read and write functions) to be passed to it. Seemed to do the trick!

As a follow up I would like to create a generate stats function that makes a little report or data dump for users, but that can come later - this is good as a foundational PR!

- add stats object to assets
- tweak how we use the cache
@Zyie Zyie changed the title feat: Stats feat: add stat object that stores transformation information Feb 4, 2025
@Zyie Zyie added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label Feb 4, 2025
@Zyie Zyie added this pull request to the merge queue Feb 5, 2025
Merged via the queue into main with commit 89c8a54 Feb 5, 2025
7 checks passed
@Zyie Zyie deleted the feate/stats branch February 5, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants