You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to better define the different meanings of "reset" to help explain reset_statepoint and update_statepoint. I've identified some places in the documentation with imprecise wordings.
Proposed change
I've copied the proposals here. See background for my reasoning.
In Jobs-->The Job State Point-->Modifying the State Point, reword to not say "reset" like so: "Job.reset_statepoint() will overwrite a job's existing statepoint file and change the job's directory name to be the newly determined hash while leaving other data files untouched."
In Modifying the State Point section of above, add examples to show the use of update_statepoint and reset_statepoint.
In The FlowProject-->The Project Status, reword to avoid the use of reset that is different from the function called reset: "We will remove the file that triggers our post condition label."
(1)
In Jobs-->The Job State Point-->Modifying the State Point we talk about reset_statepoint using the terminology of "resetting" as if it is self-evident:
The Job.update_statepoint() method provides safeguards against accidental overwriting of existing state point values, while Job.reset_statepoint() will simply reset the whole state point without further questions. (emphasis mine)
I see a few ways of interpreting this without looking at the source:
Does it mean deleting all data in the job directory but the signac_statepoint.json?
Everything but the statepoint and job doc?
Does it mean leaving the data but changing the hash and directory name?
Looking at the source, we see that it means the last option.
(Item 1) I think the solution here is to reword to not say "reset": perhaps "Job.reset_statepoint() will overwrite a job's existing statepoint file and change the job's directory name to be the newly determined hash while leaving other data files untouched."
I think the confusion stems from the fact that signac.Job.reset() is a function, and it does get rid of data!
(2)
In Projects-->The Data Space-->Moving, Copying and Removal we distinguish job.reset() from job.clear() and job.remove() and here we find the clearest definition of job.reset():
the reset() method will also clear all data associated with a job, but it will also automatically initialize the job if it was not originally initialized. (emphasis mine)
I think the wording here stays the same, but I'm including it to show the confusion as it relates to the previous example. In example (1), we change the statepoint data while preserving data. In example (2), we change the statepoint (by re-initializing it) and delete data!
(3)
In The FlowProject-->The Project Status, we see another use of the word "reset", this time referring to removing a specific piece of data:
We will reset the workflow for only a few jobs to get a more interesting status view.
Then the example shows manually removing the mock data file from the job. (Item 3) Solution: reword to avoid the use of reset that is different from the function called reset: "We will remove the file that triggers our post condition label."
(1) again Examples do not demonstrate use of update_statepoint() or reset_statepoint() even though update_statepoint is the suggested best practice. I raise this in this issue because it's mentioned in the same sentence as reset_statepoint() and the examples could help clarify both. (Item 2) Solution: add examples to show these functions.
Possible related new issue: although technically, state point is not the same as a job, the job is identified by the hash of its statepoint, so it seems like resetting the statepoint could affect the job.
(Item 4) I will also make an issue to add more description to reset_statepoint in signac to better compare it to reset.
The text was updated successfully, but these errors were encountered:
This is a good observation. I hadn't considered that part of our API before, but I see why the method names are confusing. I think this would be a good candidate for deprecation and changing the public API in the signac 2.0 release, since there is slightly redundant functionality between reset_statepoint and update_statepoint and the names aren't especially clear.
I agree that the wording can be unclear for new users.
Examples do not demonstrate use of update_statepoint() or reset_statepoint() even though update_statepoint is the suggested best practice. I raise this in this issue because it's mentioned in the same sentence as reset_statepoint() and the examples could help clarify both.
(Item 2) Solution: add examples to show these functions.
Clear examples would be especially helpful, although I'm curious how you would demonstrate the difference between these functions in the docs.
Issue Description
We need to better define the different meanings of "reset" to help explain
reset_statepoint
andupdate_statepoint
. I've identified some places in the documentation with imprecise wordings.Proposed change
I've copied the proposals here. See background for my reasoning.
Job.reset_statepoint()
will overwrite a job's existing statepoint file and change the job's directory name to be the newly determined hash while leaving other data files untouched."update_statepoint
andreset_statepoint
.Detailed Background
(1)
In Jobs-->The Job State Point-->Modifying the State Point we talk about
reset_statepoint
using the terminology of "resetting" as if it is self-evident:I see a few ways of interpreting this without looking at the source:
Looking at the source, we see that it means the last option.
(Item 1) I think the solution here is to reword to not say "reset": perhaps "
Job.reset_statepoint()
will overwrite a job's existing statepoint file and change the job's directory name to be the newly determined hash while leaving other data files untouched."I think the confusion stems from the fact that
signac.Job.reset()
is a function, and it does get rid of data!(2)
In Projects-->The Data Space-->Moving, Copying and Removal we distinguish
job.reset()
fromjob.clear()
andjob.remove()
and here we find the clearest definition ofjob.reset()
:I think the wording here stays the same, but I'm including it to show the confusion as it relates to the previous example. In example (1), we change the statepoint data while preserving data. In example (2), we change the statepoint (by re-initializing it) and delete data!
(3)
In The FlowProject-->The Project Status, we see another use of the word "reset", this time referring to removing a specific piece of data:
Then the example shows manually removing the mock data file from the job.
(Item 3) Solution: reword to avoid the use of reset that is different from the function called reset: "We will remove the file that triggers our post condition label."
(1) again
Examples do not demonstrate use of
update_statepoint()
orreset_statepoint()
even thoughupdate_statepoint
is the suggested best practice. I raise this in this issue because it's mentioned in the same sentence asreset_statepoint()
and the examples could help clarify both.(Item 2) Solution: add examples to show these functions.
Possible related new issue: although technically, state point is not the same as a job, the job is identified by the hash of its statepoint, so it seems like resetting the statepoint could affect the job.
(Item 4) I will also make an issue to add more description to
reset_statepoint
in signac to better compare it toreset
.The text was updated successfully, but these errors were encountered: