Skip to content

Commit 8b0bfcc

Browse files
committed
Moved name parameter after directory so we can say JobSpec('/bin/sleep', ['1'])
1 parent ec32f62 commit 8b0bfcc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/psij/job_spec.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
class JobSpec(object):
1414
"""A class to hold information about the characteristics of a:class:`~psij.Job`."""
1515

16-
def __init__(self, name: Optional[str] = None, executable: Optional[str] = None,
17-
arguments: Optional[List[str]] = None, directory: Optional[Path] = None,
16+
def __init__(self, executable: Optional[str] = None, arguments: Optional[List[str]] = None,
17+
directory: Optional[Path] = None, name: Optional[str] = None,
1818
inherit_environment: bool = True, environment: Optional[Dict[str, str]] = None,
1919
stdin_path: Optional[Path] = None, stdout_path: Optional[Path] = None,
2020
stderr_path: Optional[Path] = None, resources: Optional[ResourceSpec] = None,
@@ -62,14 +62,14 @@ def __init__(self, name: Optional[str] = None, executable: Optional[str] = None,
6262
refer to files inside the job directory using relative paths.
6363
6464
65-
:param name: A name for the job. The name plays no functional role except that
66-
:class:`~psij.JobExecutor` implementations may attempt to use the name to label the
67-
job as presented by the underlying implementation.
6865
:param executable: An executable, such as "/bin/date".
6966
:param arguments: The argument list to be passed to the executable. Unlike with execve(),
7067
the first element of the list will correspond to `argv[1]` when accessed by the invoked
7168
executable.
7269
:param directory: The directory, on the compute side, in which the executable is to be run
70+
:param name: A name for the job. The name plays no functional role except that
71+
:class:`~psij.JobExecutor` implementations may attempt to use the name to label the
72+
job as presented by the underlying implementation.
7373
:param inherit_environment: If this flag is set to `False`, the job starts with an empty
7474
environment. The only environment variables that will be accessible to the job are the
7575
ones specified by this property. If this flag is set to `True`, which is the default,

0 commit comments

Comments
 (0)