-
Notifications
You must be signed in to change notification settings - Fork 36
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
doc/bettter document update and reset statepoint #444
Merged
Merged
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
cdc39e8
grammar fix
cbkerr 9c8ff91
explaing update_statepoint without using the word update
cbkerr af7b95a
grammar fix
cbkerr c865a37
noting that update_statepoint with overwrite=True is reset_statepoint
cbkerr 68f3d1f
explaing reset_statetpoint without the word reset
cbkerr c5db8e9
add links to main signac-docs
cbkerr 0200ada
Merge branch 'master' into doc/bettter-document-reset
cbkerr 9309616
add noqa for long line url
cbkerr baf77d9
move noqa to end of docstring
cbkerr aee8cd3
Merge branch 'master' into doc/bettter-document-reset
bdice 5b8fd1a
expand phrase into sentence from code review
cbkerr 23ac203
improve wording of overwrite argument docstring
cbkerr 661f13c
fix whitespace
cbkerr 192db01
Merge branch 'master' into doc/bettter-document-reset
bdice dfe5e5d
apply documentation changes to deprecated equivalent methods
cbkerr daedb33
Merge branch 'master' into doc/bettter-document-reset
bdice de55418
Merge branch 'master' into doc/bettter-document-reset
vyasr 1c4d1ac
suggestions from code review
cbkerr 369ddc2
Merge branch 'master' into doc/bettter-document-reset
cbkerr 3d97c3e
Update docstring parameters.
bdice cab21d6
Update docstrings.
bdice ad8ab00
Add missing statement.
bdice 49c19c8
Fix all Sphinx references to errors, add missing errors to public nam…
bdice 915eacc
Merge branch 'master' into doc/bettter-document-reset
bdice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -183,7 +183,12 @@ def ws(self): | |||||
return self.workspace() | ||||||
|
||||||
def reset_statepoint(self, new_statepoint): | ||||||
"""Reset the state point of this job. | ||||||
"""Overwrite the state point of this job while preserving job data. | ||||||
|
||||||
This method will change the job id if the state point has been altered. | ||||||
|
||||||
For more information, see | ||||||
`Modifying the State Point <https://docs.signac.io/en/latest/jobs.html#modifying-the-state-point>`_. | ||||||
|
||||||
.. danger:: | ||||||
|
||||||
|
@@ -196,7 +201,7 @@ def reset_statepoint(self, new_statepoint): | |||||
new_statepoint : dict | ||||||
The job's new state point. | ||||||
|
||||||
""" | ||||||
""" # noqa: E501 | ||||||
dst = self._project.open_job(new_statepoint) | ||||||
if dst == self: | ||||||
return | ||||||
|
@@ -243,7 +248,12 @@ def _reset_sp(self, new_statepoint=None): | |||||
self.reset_statepoint(new_statepoint) | ||||||
|
||||||
def update_statepoint(self, update, overwrite=False): | ||||||
"""Update the state point of this job. | ||||||
"""Change the state point of this job without affecting existing parameters. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
This method will change the job id if the state point has been altered. | ||||||
|
||||||
For more information, see | ||||||
`Modifying the State Point <https://docs.signac.io/en/latest/jobs.html#modifying-the-state-point>`_. | ||||||
cbkerr marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
.. warning:: | ||||||
|
||||||
|
@@ -256,9 +266,10 @@ def update_statepoint(self, update, overwrite=False): | |||||
update : dict | ||||||
A mapping used for the state point update. | ||||||
overwrite : | ||||||
bdice marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
Set to true, to ignore whether this update overwrites parameters, | ||||||
which are currently part of the job's state point. | ||||||
Use with caution! (Default value = False) | ||||||
If True, this method will set all existing and new parameters | ||||||
to a job's statepoint, making it equivalent to | ||||||
:meth:`~.reset_statepoint`. Use with caution! | ||||||
(Default value = False) | ||||||
|
||||||
Raises | ||||||
------ | ||||||
|
@@ -270,7 +281,7 @@ def update_statepoint(self, update, overwrite=False): | |||||
OSError | ||||||
If the move failed due to an unknown system related error. | ||||||
|
||||||
""" | ||||||
""" # noqa: E501 | ||||||
statepoint = self.statepoint() | ||||||
if not overwrite: | ||||||
for key, value in update.items(): | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use an intersphinx reference to
_project-job-statepoint-modify
.See this guide: https://github.com/glotzerlab/signac-docs/wiki/How-to-cross-reference-links-between-package-docs-and-signac-docs-using-intersphinx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make a new issue to add intersphinx because none of the files use it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made #452 to involve newer contributors