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

Rename list* to filter* #55

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions EasyJobsBase/src/status.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export getstatus,
isexited,
issucceeded,
isfailed,
listpending,
listrunning,
listexited,
listsucceeded,
listfailed,
filterpending,
filterrunning,
filterexited,
filtersucceeded,
filterfailed,
setsucceeded!,
setpending!,
setfailed!
Expand Down Expand Up @@ -56,39 +56,39 @@ Test if the `job` failed during running.
isfailed(job::AbstractJob) = getstatus(job) === FAILED

"""
listpending(jobs)
filterpending(jobs)

Filter the pending jobs in a sequence of jobs.
"""
listpending(jobs) = Iterators.filter(ispending, jobs)
filterpending(jobs) = Iterators.filter(ispending, jobs)

"""
listrunning(jobs)
filterrunning(jobs)

Filter the running jobs in a sequence of jobs.
"""
listrunning(jobs) = Iterators.filter(isrunning, jobs)
filterrunning(jobs) = Iterators.filter(isrunning, jobs)

"""
listexited(jobs)
filterexited(jobs)

Filter the exited jobs in a sequence of jobs.
"""
listexited(jobs) = Iterators.filter(isexited, jobs)
filterexited(jobs) = Iterators.filter(isexited, jobs)

"""
listsucceeded(jobs)
filtersucceeded(jobs)

Filter the succeeded jobs in a sequence of jobs.
"""
listsucceeded(jobs) = Iterators.filter(issucceeded, jobs)
filtersucceeded(jobs) = Iterators.filter(issucceeded, jobs)

"""
listfailed(jobs)
filterfailed(jobs)

Filter the failed jobs in a sequence of jobs.
"""
listfailed(jobs) = Iterators.filter(isfailed, jobs)
filterfailed(jobs) = Iterators.filter(isfailed, jobs)

setsucceeded!(job::AbstractJob) = job.status = SUCCEEDED

Expand Down
12 changes: 6 additions & 6 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ isexited
issucceeded
isfailed
isinterrupted
listpending
listrunning
listexited
listsucceeded
listfailed
listinterrupted
filterpending
filterrunning
filterexited
filtersucceeded
filterfailed
filterinterrupted
countexecution
descriptionof
creationtimeof
Expand Down
Loading