Comments (6)
So I think the custom as_dict
for this takes precedence over the new general for the Enums
So something like this should work.
from monty.serialization import dumpfn
from enum import Enum
class Test(Enum):
a = "a"
b = "b"
t = Test.a
dumpfn(t, "test.json")
So I think if we just remove the custom as_dict
and from_dict
for that class then things should work. But we will have a see about the consequences.
from emmet.
Looks like I ran into something similar, resolved on monty's side:
materialsvirtuallab/monty#602
from emmet.
Oh that was smart! Thanks!! I'll check if is resolved with the monty update.
from emmet.
Looks like your PR didn't fix this one btw, @jmmshn. I'll have to dig into it later.
from emmet.
Thanks for the pointer, @jmmshn! Removing the .as_dict()
method in emmet.core.utils.ValueEnum
results in an AttributeError
:
AttributeError: 'CrystalSystem' object has no attribute 'as_dict'
I'll dig into this later in the week. I think I know where to look now. 👍
from emmet.
@munrojm can you please re-open this? It won't let me do so. It needs to be reopened due to #974.
from emmet.
Related Issues (20)
- `task_type` incorrectly identifies NSCF Line calcs as Uniform calcs
- emmet-core requirement for openbabel not declared HOT 1
- Changing Elasticity builder to identify deformation calcs *not* using calc_type
- [Idea]: User-friendly access to properties HOT 7
- Bug when parsing LDA pseudopotential
- [Feature Request]: Add missing `py.typed` file
- [Feature Request]: Better handling of parsed trajectory in VASP calculations HOT 4
- Potential issue with change in monty deserialization HOT 2
- Pydantic 2.5.0 breaks `from_vasp_files` HOT 1
- [conda package] missing dependence on `custodian` HOT 2
- Serialzation issues with ValueEnum HOT 1
- Bug: Q-Chem's `TaskDoc.from_directory` does not work with a custom directory
- Bug: Q-Chem's `TaskDoc.from_directory` does not properly parse enthalpy or entropy (or frequency modes)
- Q-Chem Bug: There should not be a check on supported basis sets and functionals HOT 15
- Bug risk in CLI
- Bug: Information is lost on Pydantic `.model_dump()` in `TaskDoc` HOT 1
- Bug: Wrong `run_type` report on r2SCAN run HOT 3
- Changing how `task_types` are determined HOT 4
- Q-Chem data is not always valid
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 emmet.