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

Select models and fields via settings #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevelacey
Copy link

@stevelacey stevelacey commented Jan 21, 2025

Select models and fields via settings, allowing for more granular filtering of what is or isn't included in cleanup.

CLEANUP = {
    # "core.achievement": {"frame", "image", "obscure_image"},
    "core.achievementupload": {"achievement_csv"},
    "core.bitstreamversion": {"asset_file"},
    "core.cerberusversion": {"asset_file"},
    "core.feedpost": {"image"},
    # "core.machine": {"backglass_art", "logo", "template_file"},
    "core.recording": {"file"},
    "core.scoredetectorversion": {"asset_file"},
    "core.scoreimage": {"image"},
    # "core.session": {"log_file"},
    "core.slideshowimage": {"image"},
    # "core.spike2firmwareversion": {"asset_file"},
    "core.userprofile": {"profile_picture"},
}

Note I didn't do anything different for select_mode given it got confusing fast, maybe it's easier to consider this as a layer on top of whatever app config has been selected, it's essentially select mode but more granular.

Mostly I've based the setting syntax off of what FIELDS stores anyway, given it's quite similar to how other packages like cacheops are configured.

Might be nice to fnmatch the model same as cacheops so you can do "core.*" but I didn't bother at this point.

This resolves #113.

@stevelacey stevelacey force-pushed the cleanup-settings branch 4 times, most recently from 41e63e3 to 3b36485 Compare January 21, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select or ignore specific model fields
1 participant