materialsproject / jobflow

jobflow is a library for writing computational workflows.
https://materialsproject.github.io/jobflow
Other
90 stars 25 forks source link

Add `job_dir` attribute to `Response` class to record where a job ran #570

Closed janosh closed 3 months ago

janosh commented 3 months ago

includes tests.

TODO

there are probably a bunch more places where the job_dir attribute should be set when executing a job. also, should we add the same attribute to the Job class @utf? it would only be populated after the job has run which maybe makes for a worse UX?

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.42%. Comparing base (a0dae68) to head (227071e). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #570 +/- ## ======================================= Coverage 99.42% 99.42% ======================================= Files 21 21 Lines 1564 1570 +6 Branches 425 426 +1 ======================================= + Hits 1555 1561 +6 Misses 9 9 ``` | [Files](https://app.codecov.io/gh/materialsproject/jobflow/pull/570?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject) | Coverage Δ | | |---|---|---| | [src/jobflow/core/job.py](https://app.codecov.io/gh/materialsproject/jobflow/pull/570?src=pr&el=tree&filepath=src%2Fjobflow%2Fcore%2Fjob.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject#diff-c3JjL2pvYmZsb3cvY29yZS9qb2IucHk=) | `100.00% <100.00%> (ø)` | | | [src/jobflow/core/store.py](https://app.codecov.io/gh/materialsproject/jobflow/pull/570?src=pr&el=tree&filepath=src%2Fjobflow%2Fcore%2Fstore.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject#diff-c3JjL2pvYmZsb3cvY29yZS9zdG9yZS5weQ==) | `100.00% <100.00%> (ø)` | | | [src/jobflow/managers/local.py](https://app.codecov.io/gh/materialsproject/jobflow/pull/570?src=pr&el=tree&filepath=src%2Fjobflow%2Fmanagers%2Flocal.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject#diff-c3JjL2pvYmZsb3cvbWFuYWdlcnMvbG9jYWwucHk=) | `100.00% <100.00%> (ø)` | | | [src/jobflow/utils/\_\_init\_\_.py](https://app.codecov.io/gh/materialsproject/jobflow/pull/570?src=pr&el=tree&filepath=src%2Fjobflow%2Futils%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject#diff-c3JjL2pvYmZsb3cvdXRpbHMvX19pbml0X18ucHk=) | `100.00% <ø> (ø)` | | | [src/jobflow/utils/uid.py](https://app.codecov.io/gh/materialsproject/jobflow/pull/570?src=pr&el=tree&filepath=src%2Fjobflow%2Futils%2Fuid.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject#diff-c3JjL2pvYmZsb3cvdXRpbHMvdWlkLnB5) | `81.57% <ø> (ø)` | | | [src/jobflow/utils/uuid.py](https://app.codecov.io/gh/materialsproject/jobflow/pull/570?src=pr&el=tree&filepath=src%2Fjobflow%2Futils%2Fuuid.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=materialsproject#diff-c3JjL2pvYmZsb3cvdXRpbHMvdXVpZC5weQ==) | `100.00% <ø> (ø)` | |
utf commented 3 months ago

Thanks @janosh. I think for now let's leave it off the Job object as really it is a runner feature.