-
Notifications
You must be signed in to change notification settings - Fork 32
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
Removing the requirement to use a task_id
#834
Comments
Good point @arosen93 . Maybe we could implement this in This would require us to manually create |
That seems like a logical approach to me! |
Motivation for not defaulting to from maggma.stores import JSONStore
with JSONStore("test.json", read_only=False) as store:
store.update({"test": "hi"}) doesn't work and from maggma.stores import JSONStore
with JSONStore("test.json", read_only=False) as store:
store.update({"task_id": "hello", "test": "hi"}) does work and yields a file that contains
with no |
I'm not sure I understand your point in this example. Is the recommended behavior still to default to an automatically generated |
Apologies for not being clear. I was knee deep in debugging and being too brief. Yes, I would recommend having an automatically generated |
As I discussed with @munrojm, there are instances in maggma where the user has to supply a "task_id" where it is arguably not necessary.
Consider this example:
You get back the following traceback:
If the user supplies, say,
d = {"task_id": 1, "test": "hi"}
it works and you get:But this is awkward. If it's already going to assign an
_id
to the entry, there should not be a need to have the user pass atask_id
. If notask_id
is specified, it should fallback to using the automatically generated_id
.The text was updated successfully, but these errors were encountered: