We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code like this should not be written:
def stateless_compute_read_epics_values(data, **kwargs): _PREV_EPICS_FILE = "prev-status.json" # TODO(pjm): hacked in animation directory run_dir = pkio.py_path( re.sub(r"/unused$", "/animation", str(simulation_db.simulation_run_dir(data))) ) p = run_dir.join(_PREV_EPICS_FILE)
This is an analysisJob, not a statelessCompute.
BTW, globals (_PREV_EPICS_FILE) should be defined globally (with global), but in this case, it can be local to make the code clearer:
_PREV_EPICS_FILE
global
run_dir.join("prev-status.json")
Also,
shutil.copyfile(str(e), str(p))
This is not necessary. The reason we chose py.path is that it solves this problem for us:
e.copy(p)
And this should be encapsulated in pkio:
and e.exists() and p.exists() and filecmp.cmp(str(e), str(p), False)
See #6289 for why.
The text was updated successfully, but these errors were encountered:
for #6290 use pkio library for file compare
689a16a
- depends on radiasoft/pykern#398
af8f53f
moellep
No branches or pull requests
Code like this should not be written:
This is an analysisJob, not a statelessCompute.
BTW, globals (
_PREV_EPICS_FILE
) should be defined globally (withglobal
), but in this case, it can be local to make the code clearer:Also,
This is not necessary. The reason we chose py.path is that it solves this problem for us:
And this should be encapsulated in pkio:
See #6289 for why.
The text was updated successfully, but these errors were encountered: