Skip to content
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

Simplify code by using Flow methods __len__ and __getitem__ #467

Merged
merged 3 commits into from
Oct 29, 2023
Merged

Conversation

janosh
Copy link
Member

@janosh janosh commented Oct 29, 2023

Saves accessing flow.jobs a bunch.

@janosh janosh added the dx Developer experience label Oct 29, 2023
@codecov
Copy link

codecov bot commented Oct 29, 2023

Codecov Report

Merging #467 (7c66385) into main (85aabc5) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #467   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files          20       20           
  Lines        1516     1516           
  Branches      419      419           
=======================================
  Hits         1514     1514           
  Misses          2        2           
Files Coverage Δ
src/jobflow/core/flow.py 100.00% <100.00%> (ø)
src/jobflow/utils/graph.py 100.00% <100.00%> (ø)

@janosh janosh merged commit 3143029 into main Oct 29, 2023
8 checks passed
@janosh janosh deleted the simplify branch October 29, 2023 02:03
@utf
Copy link
Member

utf commented Oct 29, 2023

Hi @janosh, please could you revert this change, since it overlaps with the __getitem__ stuff proposed in #450. The __len__ part should still be fine.

At some point, we will need to rewrite the __getitem__ stuff in Flow and so with this PR we'd have to rewrite all the tests too.

@janosh
Copy link
Member Author

janosh commented Oct 29, 2023

could you specify what you mean by "have to rewrite the Flow.getitem"? do you want to make it behave like a dict rather than a list of jobs?

@utf utf added the enhancement New feature or request label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Developer experience enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants