Comments (4)
I had initially considered this, but the shortcoming is that it's only one-way -- you can only use this to store a custom object in ASDF. So you ultimately to have something "off the side" (i.e. not on objects) that can be used to unserialize the objects.
This is documented here: http://pyasdf.readthedocs.org/en/latest/pyasdf/extensions.html
While there's probably some room for improvement, I think it's superior to using a special member because it wraps the serialization/deserialization in a single class.
from asdf.
Ok, sounds good!
from asdf.
I think there's more that goes into storing arbitrary objects in ASDF too. For example you need support in the schema and the like. That could be declared in an object too, but I think in practice Mike's approach is better.
from asdf.
The other important point I forgot to mention is that doing things "off to the side" like this lets us handle objects we don't control, such as Numpy arrays. (i.e. we can support them in ASDF without submitting patches to Numpy).
from asdf.
Related Issues (20)
- asdf does not follow version conventions defined in standard HOT 4
- Add/check Python array API standard support
- Re-add pyyaml to devdeps testing when it gets cython 3 compatibility
- Recommendations on future usage of ASDF-in-FITS HOT 4
- 'Validator' object has no attribute 'ctx' HOT 2
- Move IntegerType to a Converter
- Remove internal use of legacy extension API
- Make `SerializationContext` "closable"
- Document different behavior for built-in tags now handled by converters
- Consider sorting extensions provided by a plugin
- Document that adding a converter that doesn't support a tag in an extension will result in the converter being ignored
- No longer warn but raise an exception for converters with more than 1 tag that don't implement select tag
- Python 3.12 compatibility HOT 2
- Unable to load reference cycles HOT 1
- Support MaskedQuantity HOT 1
- asdf.commands.diff will report that contents differ for any arrays including NaNs HOT 1
- Consider inspecting modules for class paths
- Saving views results in saving the base array HOT 10
- Add `AsdfFile.closed` to the api
- minor code smells in static code analysis HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asdf.