-
Notifications
You must be signed in to change notification settings - Fork 4
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
clearer alternative to loading_fn
#40
Labels
enhancement
New feature or request
good first issue
Good for newcomers
sweep
Assigns Sweep to an issue or pull request.
Comments
mivanit
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Jul 24, 2023
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Merged
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Merged
mivanit
added a commit
that referenced
this issue
Jun 21, 2024
mivanit
added a commit
that referenced
this issue
Jun 21, 2024
- add support and CI checks for python `>=3.8` (Previously only `3.10, 3.11` were supported) - this mostly consisted of messing with a lot of type annotations and adding `from __future__ import annotations` in a number of places - added `validate_type` function - make `SerializableDatclass` actually do type validation - improvements to `SerializableDataclass` and related functions - much better docs and comments - move `SerializableField` and `serializable_field` to their own file - resolve #40 by adding `deserialize_fn` to `SerializableField` - moved `array_safe_eq` and `dc_eq` to `muutils.json_serialize.util` - added `array_b64_meta` mode to `muutils.json_serialize.array`, works pretty much the same as existing `array_hex_meta` but should take less space - added `ErrorMode` enum - special `.process()` method which takes a message (and optionally classes for warnings and errors, and an `except_from` parameter) and decides whether to throw warning, exception, or do nothing - switched error mode handling to this across the package - switch to ruff for formatting and linting - add cli interface to `muutils.sys_info` - added `sanitize_name` function with `sanitize_fname` and `sanitize_identifier` as special cases - see `muutils.misc` - big changes and improvements to CI/makefile - `uv` now used to install deps in CI, separate job for checking `poetry.lock` consistency - makefile recipes reworked, and major changes to internals. `make help` for more info - added many comments to the makefile - many other small fixes and changes, including a large number of new tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
good first issue
Good for newcomers
sweep
Assigns Sweep to an issue or pull request.
serializeable_field()
currently takes aloading_fn
parameter, which, due to a dumb choice by me ages ago, takes directly the dict representing the whole object instead of the actual field we care about. this makes code a bit messy. It was originally to allow for extracting data from other fields in the object, but this is bad practice. Currently, the syntax looks like:Changing the behavior of the existing function would probably be a bad idea, so I think the best course of action is to create a new parameter, perhaps
deserialization_fn
, which allows us to doThis should be a change of just a few lines in
muutils.json_serialize.serializable_dataclass
The text was updated successfully, but these errors were encountered: