myqueue
Advanced tools
+1
-1
@@ -6,2 +6,2 @@ Changelog | ||
| https://myqueue.readthedocs.io/en/latest/releasenotes.html | ||
| https://myqueue.readthedocs.io/releasenotes.html |
+1
-1
@@ -6,2 +6,2 @@ Contributing | ||
| https://myqueue.readthedocs.io/en/latest/development.html | ||
| https://myqueue.readthedocs.io/development.html |
+19
-15
@@ -132,3 +132,3 @@ .. _cli: | ||
| usage: mq submit [-h] [-d DEPENDENCIES] [-n NAME] [--restart N] | ||
| [--max-tasks MAX_TASKS] [-R c[:p][:n]:t[:w]] [-w] | ||
| [--max-tasks MAX_TASKS] [-R RESOURCES] [-w] | ||
| [-X EXTRA_SCHEDULER_ARGS] [-z] [-v] [-q] [-T] | ||
@@ -159,7 +159,8 @@ task [folder ...] | ||
| Maximum number of tasks to submit. | ||
| -R c[:p][:n]:t[:w], --resources c[:p][:n]:t[:w] | ||
| Where c=cores, p=processes, n=nodename, t=tmax and | ||
| -R RESOURCES, --resources RESOURCES | ||
| With RESOURCES=c[:p][:g][:n]:t[:w] where c=cores, | ||
| p=processes, g=gpus-per-node, n=nodename, t=tmax and | ||
| w=weight. Number of cores and tmax must always be | ||
| specified. Examples: "8:1h", 8 cores for 1 hour. Use | ||
| "m" for minutes, "h" for hours and "d" for days. | ||
| specified. Examples: "8:1h", 8 cores for 1 hour (use | ||
| "m" for minutes, "h" for hours and "d" for days). | ||
| "16:1:30m": 16 cores, 1 process, half an hour. | ||
@@ -169,3 +170,4 @@ "40:xeon40:5m": 40 cores on "xeon40" for 5 minutes. | ||
| for 5 minutes. "40:1:xeon40:5m:0.5": same as previous, | ||
| but with a weight of 0.5. | ||
| but with a weight of 0.5. Use "4G" for 4 GPUs per | ||
| node. | ||
| -w, --workflow Write <task-name>.state file when task has finished. | ||
@@ -188,5 +190,5 @@ -X EXTRA_SCHEDULER_ARGS, --extra-scheduler-args EXTRA_SCHEDULER_ARGS | ||
| usage: mq resubmit [-h] [--keep] [-R c[:p][:n]:t[:w]] [-w] | ||
| [-X EXTRA_SCHEDULER_ARGS] [-s qhrdFCTMaA] [-i ID] [-n NAME] | ||
| [-e ERROR] [-z] [-v] [-q] [-T] [-r] | ||
| usage: mq resubmit [-h] [--keep] [-R RESOURCES] [-w] [-X EXTRA_SCHEDULER_ARGS] | ||
| [-s qhrdFCTMaA] [-i ID] [-n NAME] [-e ERROR] [-z] [-v] [-q] | ||
| [-T] [-r] | ||
| [folder ...] | ||
@@ -206,7 +208,8 @@ | ||
| --keep Do not remove old tasks. | ||
| -R c[:p][:n]:t[:w], --resources c[:p][:n]:t[:w] | ||
| Where c=cores, p=processes, n=nodename, t=tmax and | ||
| -R RESOURCES, --resources RESOURCES | ||
| With RESOURCES=c[:p][:g][:n]:t[:w] where c=cores, | ||
| p=processes, g=gpus-per-node, n=nodename, t=tmax and | ||
| w=weight. Number of cores and tmax must always be | ||
| specified. Examples: "8:1h", 8 cores for 1 hour. Use | ||
| "m" for minutes, "h" for hours and "d" for days. | ||
| specified. Examples: "8:1h", 8 cores for 1 hour (use | ||
| "m" for minutes, "h" for hours and "d" for days). | ||
| "16:1:30m": 16 cores, 1 process, half an hour. | ||
@@ -216,3 +219,4 @@ "40:xeon40:5m": 40 cores on "xeon40" for 5 minutes. | ||
| for 5 minutes. "40:1:xeon40:5m:0.5": same as previous, | ||
| but with a weight of 0.5. | ||
| but with a weight of 0.5. Use "4G" for 4 GPUs per | ||
| node. | ||
| -w, --workflow Write <task-name>.state file when task has finished. | ||
@@ -495,3 +499,3 @@ -X EXTRA_SCHEDULER_ARGS, --extra-scheduler-args EXTRA_SCHEDULER_ARGS | ||
| https://myqueue.readthedocs.io/en/latest/configuration.html | ||
| https://myqueue.readthedocs.io/configuration.html | ||
@@ -498,0 +502,0 @@ Example:: |
+1
-1
@@ -72,3 +72,3 @@ # -*- coding: utf-8 -*- | ||
| # Usually you set "language" from the command line for these cases. | ||
| language = None | ||
| # language = None | ||
@@ -75,0 +75,0 @@ # List of patterns, relative to source directory, that match files and |
@@ -136,3 +136,3 @@ ============= | ||
| cores[:processes][:nodename]:tmax[:weight] | ||
| cores[:processes][:gpus][:nodename]:tmax[:weight] | ||
@@ -144,2 +144,5 @@ * ``cores``: Number of cores to reserve. | ||
| * ``gpus``: Number of GPUs per node to allocate. | ||
| Example: ``4G``. Default is no GPUs (``0G``). | ||
| * ``nodename``: Node-name | ||
@@ -149,3 +152,4 @@ (defaults to best match in :ref:`the list of node-types <nodes>`). | ||
| * ``tmax``: Maximum time (use *s*, *m*, *h* and *d* for seconds, minutes, | ||
| hours and days respectively). | ||
| hours and days respectively). Examples: ``1h``, ``2d``. Default | ||
| is ``10m``. | ||
@@ -167,2 +171,3 @@ * ``weight``: weight of a task. Can be used to limit the number of | ||
| (useful for OpenMP tasks or tasks that do their own *mpiexec* call) | ||
| * ``96:4:4G:10h`` 96 cores and 4 processes and 4 GPUs per node for 10 hours | ||
@@ -180,2 +185,18 @@ Resources can also be specified via special comments in scripts: | ||
| .. _preamble: | ||
| Preamble | ||
| ======== | ||
| The value of the :envvar:`MYQUEUE_PREAMBLE` environment variable | ||
| will be inserted at the beginning of the script that will be | ||
| submitted. | ||
| .. tip:: | ||
| To see the script that you are about to submit, use:: | ||
| $ mq submit ... -vz # --verbose --dry-run | ||
| .. _states: | ||
@@ -182,0 +203,0 @@ |
@@ -16,5 +16,16 @@ .. _releases: | ||
| * ... | ||
| Version 24.10.0 | ||
| =============== | ||
| * Introduced an environment variable :envvar:`MYQUEUE_PREAMBLE`. | ||
| Its value will be inserted at the beginning of the script that is | ||
| submitted. See :ref:`preamble`. | ||
| * Number of GPUs per node can now be part of a resource specification. | ||
| See :ref:`resources` and :func:`myqueue.workflow.run`. | ||
| * Automatically adds BASH-completion line to ``$VIRTUAL_ENV/bin/activate`` | ||
| script. | ||
| Version 24.9.0 | ||
@@ -21,0 +32,0 @@ ============== |
@@ -14,6 +14,6 @@ .. _workflows: | ||
| * Workflow for testing a `GPAW exercise | ||
| <https://gpaw.readthedocs.io/summerschools/summerschool22/ | ||
| <https://gpaw.readthedocs.io/summerschools/summerschool24/ | ||
| catalysis/catalysis.html>`__: | ||
| `agts.py <https://gitlab.com/gpaw/gpaw/-/blob/master/doc/summerschools/ | ||
| summerschool22/catalysis/agts.py>`__ | ||
| summerschool24/catalysis/agts.py>`__ | ||
@@ -20,0 +20,0 @@ |
| Metadata-Version: 2.1 | ||
| Name: myqueue | ||
| Version: 24.9.0 | ||
| Version: 24.10.0 | ||
| Summary: Frontend for SLURM/LSF/PBS | ||
@@ -683,3 +683,3 @@ Maintainer-email: Jens Jørgen Mortensen <jjmo@dtu.dk> | ||
| Project-URL: repository, https://gitlab.com/myqueue/myqueue | ||
| Project-URL: changelog, https://myqueue.readthedocs.io/en/latest/releasenotes.html | ||
| Project-URL: changelog, https://myqueue.readthedocs.io/releasenotes.html | ||
| Project-URL: docs, https://myqueue.readthedocs.io | ||
@@ -709,3 +709,3 @@ Project-URL: issues, https://gitlab.com/myqueue/myqueue/-/issues | ||
| .. image:: https://readthedocs.org/projects/myqueue/badge/?version=latest | ||
| :target: https://myqueue.readthedocs.io/en/latest/?badge=latest | ||
| :target: https://myqueue.readthedocs.io/?badge=latest | ||
| :alt: Documentation Status | ||
@@ -783,13 +783,13 @@ | ||
| * `Quick-start | ||
| <https://myqueue.readthedocs.io/en/latest/quickstart.html>`__ | ||
| <https://myqueue.readthedocs.io/quickstart.html>`__ | ||
| * `Documentation | ||
| <https://myqueue.readthedocs.io/en/latest/documentation.html>`__ | ||
| <https://myqueue.readthedocs.io/documentation.html>`__ | ||
| * `How it works | ||
| <https://myqueue.readthedocs.io/en/latest/howitworks.html>`__ | ||
| <https://myqueue.readthedocs.io/howitworks.html>`__ | ||
| * `Command-line interface | ||
| <https://myqueue.readthedocs.io/en/latest/cli.html>`__ | ||
| <https://myqueue.readthedocs.io/cli.html>`__ | ||
| * `Workflows | ||
| <https://myqueue.readthedocs.io/en/latest/workflows.html>`__ | ||
| <https://myqueue.readthedocs.io/workflows.html>`__ | ||
| * `Python API | ||
| <https://myqueue.readthedocs.io/en/latest/api.html>`__ | ||
| <https://myqueue.readthedocs.io/api.html>`__ | ||
@@ -814,3 +814,3 @@ | ||
| Now, configure your system as described | ||
| `here <https://myqueue.readthedocs.io/en/latest/configuration.html>`__. | ||
| `here <https://myqueue.readthedocs.io/configuration.html>`__. | ||
@@ -828,3 +828,3 @@ | ||
| See the `release notes | ||
| <https://myqueue.readthedocs.io/en/latest/releasenotes.html>`_ for a history | ||
| <https://myqueue.readthedocs.io/releasenotes.html>`_ for a history | ||
| of notable changes to MyQueue. | ||
@@ -850,2 +850,2 @@ | ||
| More information `here | ||
| <https://myqueue.readthedocs.io/en/latest/development.html>`_. | ||
| <https://myqueue.readthedocs.io/development.html>`_. |
+14
-12
@@ -129,3 +129,3 @@ from __future__ import annotations | ||
| https://myqueue.readthedocs.io/en/latest/configuration.html | ||
| https://myqueue.readthedocs.io/configuration.html | ||
@@ -245,8 +245,8 @@ Example: | ||
| a('-R', '--resources', | ||
| metavar='c[:p][:n]:t[:w]', | ||
| help='Where c=cores, p=processes, n=nodename, t=tmax and ' | ||
| help='With RESOURCES=c[:p][:g][:n]:t[:w] where ' | ||
| 'c=cores, p=processes, g=gpus-per-node, n=nodename, t=tmax and ' | ||
| 'w=weight. Number of cores and tmax must always be specified. ' | ||
| 'Examples: "8:1h", 8 cores for 1 hour. ' | ||
| 'Use "m" for minutes, ' | ||
| '"h" for hours and "d" for days. ' | ||
| 'Examples: "8:1h", 8 cores for 1 hour ' | ||
| '(use "m" for minutes, ' | ||
| '"h" for hours and "d" for days). ' | ||
| '"16:1:30m": 16 cores, 1 process, half an hour. ' | ||
@@ -257,3 +257,3 @@ '"40:xeon40:5m": 40 cores on "xeon40" for 5 minutes. ' | ||
| '"40:1:xeon40:5m:0.5": same as previous, but with a weight ' | ||
| 'of 0.5.') | ||
| 'of 0.5. Use "4G" for 4 GPUs per node.') | ||
| a('-w', '--workflow', action='store_true', | ||
@@ -326,3 +326,3 @@ help='Write <task-name>.state file when task has finished.') | ||
| if cmd not in ['list', 'completion', 'info', 'test']: | ||
| if cmd not in ['list', 'completion', 'info']: | ||
| a('-z', '--dry-run', | ||
@@ -395,5 +395,4 @@ action='store_true', | ||
| if args.command == 'completion': | ||
| py = sys.executable | ||
| filename = Path(__file__).with_name('complete.py') | ||
| cmd = f'complete -o default -C "{py} {filename}" mq' | ||
| from myqueue.utils import completion_command | ||
| cmd = completion_command() | ||
| if args.verbose: | ||
@@ -440,5 +439,8 @@ print('Add tab-completion for Bash by copying the following ' | ||
| from myqueue.task import task | ||
| from myqueue.utils import mqhome | ||
| from myqueue.utils import mqhome, ensure_completions | ||
| from myqueue.workflow import prune, workflow | ||
| if not is_test: | ||
| ensure_completions() | ||
| verbosity = 1 - args.quiet + args.verbose | ||
@@ -445,0 +447,0 @@ |
@@ -82,3 +82,3 @@ """User configuration (handling of .myqueue/config.py files).""" | ||
| "file (must be 'slurm', 'lfs', 'pbs' or 'test'). See " | ||
| 'https://myqueue.rtfd.io/en/latest/configuration.html') | ||
| 'https://myqueue.rtfd.io/configuration.html') | ||
@@ -185,3 +185,3 @@ if 'mpi' in cfg or 'mpi_implementation' in cfg: | ||
| '#\n' | ||
| '# https://myqueue.readthedocs.io/en/latest/configuration.html\n' | ||
| '# https://myqueue.readthedocs.io/configuration.html\n' | ||
| '\n' + | ||
@@ -188,0 +188,0 @@ text) |
+14
-24
@@ -101,10 +101,3 @@ from __future__ import annotations | ||
| if n > N: | ||
| L0 = 12 | ||
| if columns[-1] == 'e': | ||
| L = lengths[-1] | ||
| L = n - N if n - N < L else min(L, L0) | ||
| for words in lines: | ||
| words[-1] = cut(words[-1], L, end=True) | ||
| lengths[-1] = L | ||
| fit_to_termial_size(N, lines, lengths, L0) | ||
| fit_to_termial_size(N, lines, lengths) | ||
@@ -145,3 +138,3 @@ use_color = sys.stdout.isatty() and 'MYQUEUE_TESTING' not in os.environ | ||
| widths: list[int], | ||
| L0: int = 12) -> None: | ||
| Lmin: int = 12) -> None: | ||
| """Reduce width of columns to fit inside N characters. | ||
@@ -155,17 +148,16 @@ | ||
| w = sum(widths) + len(widths) | ||
| if w > N: | ||
| for i, L in enumerate(widths): | ||
| if L > L0: | ||
| m = sum(L + 1 for L in widths[i:] if L > L0) | ||
| if m == 0: | ||
| return | ||
| x = (N - w + m) / m | ||
| Lnew = max(L0, int(x * (L + 1)) - 1) | ||
| w -= L - Lnew | ||
| widths[i] = Lnew | ||
| for words in lines: | ||
| words[i] = cut(words[i], Lnew) | ||
| while w > N: | ||
| L, i = max((L, i) for i, L in enumerate(widths)) | ||
| if L <= Lmin: | ||
| return | ||
| Lnew = Lmin | ||
| if L - Lnew > w - N: | ||
| Lnew = L - w + N | ||
| w -= L - Lnew | ||
| widths[i] = Lnew | ||
| for words in lines: | ||
| words[i] = cut(words[i], Lnew) | ||
| def cut(word: str, L: int, end: bool = False) -> str: | ||
| def cut(word: str, L: int) -> str: | ||
| """Cut string to length L. | ||
@@ -177,4 +169,2 @@ | ||
| if len(word) > L: | ||
| if end: | ||
| return word[:L - 1] + '…' | ||
| l1 = L // 2 | ||
@@ -181,0 +171,0 @@ l2 = L - l1 - 1 |
+38
-11
@@ -14,4 +14,3 @@ """Resource class to handle resource requirements: time, cores, processes.""" | ||
| RESOURCES_URL = ( | ||
| 'https://myqueue.readthedocs.io/en/latest/documentation.html#resources') | ||
| URL = 'https://myqueue.readthedocs.io/documentation.html#resources' | ||
@@ -50,4 +49,6 @@ | ||
| cores: int = 0, | ||
| *, | ||
| nodename: str = '', | ||
| processes: int = 0, | ||
| gpus: int = -1, | ||
| tmax: int = 0, | ||
@@ -72,2 +73,3 @@ weight: float = -1.0): | ||
| self.weight = weight | ||
| self.gpus = 0 if gpus == -1 else gpus | ||
@@ -80,3 +82,4 @@ if processes == 0: | ||
| 'Bad resource string: Number of processes ' | ||
| f'bigger than number of cores! See {RESOURCES_URL}') | ||
| 'bigger than number of cores! ' | ||
| f'See {URL}') | ||
| self.processes = processes | ||
@@ -107,2 +110,3 @@ | ||
| processes = 0 | ||
| gpus = 0 | ||
| weight = -1.0 | ||
@@ -116,4 +120,7 @@ try: | ||
| for p in parts: | ||
| if p.isdigit(): | ||
| processes = int(p) | ||
| if p[0].isdigit(): | ||
| if p[-1] == 'G': | ||
| gpus = int(p[:-1]) | ||
| else: | ||
| processes = int(p) | ||
| else: | ||
@@ -123,5 +130,11 @@ nodename = p | ||
| raise ValueError( | ||
| f'Bad resource string: {s!r}. See {RESOURCES_URL}') from ex | ||
| f'Bad resource string: {s!r}. ' | ||
| f'See {URL}') from ex | ||
| return Resources(cores, nodename, processes, tmax, weight) | ||
| return Resources(cores, | ||
| nodename=nodename, | ||
| processes=processes, | ||
| gpus=gpus, | ||
| tmax=tmax, | ||
| weight=weight) | ||
@@ -132,2 +145,3 @@ @staticmethod | ||
| processes: int = 0, | ||
| gpus: int = -1, | ||
| tmax: str = '', | ||
@@ -141,2 +155,3 @@ weight: float = -1.0, | ||
| and processes == 0 | ||
| and gpus == -1 | ||
| and tmax == '' and | ||
@@ -153,9 +168,13 @@ weight == -1.0) | ||
| if resources != '': | ||
| url = 'https://myqueue.readthedocs.io/en/latest' | ||
| raise ValueError( | ||
| f'resources={resources!r} can\'t be combined with ' | ||
| '"cores", "nodename", "processes", "tmax" or "weight". ' | ||
| f'See {url}/documentation.html#resources') | ||
| f'See {URL}') | ||
| return Resources(cores, nodename, processes, T(tmax or '10m'), weight) | ||
| return Resources(cores, | ||
| nodename=nodename, | ||
| processes=processes, | ||
| gpus=gpus, | ||
| tmax=T(tmax or '10m'), | ||
| weight=weight) | ||
@@ -165,3 +184,5 @@ def __str__(self) -> str: | ||
| if self.processes != self.cores: | ||
| s += ':' + str(self.processes) | ||
| s += f':{self.processes}' | ||
| if self.gpus != 0: | ||
| s += f':{self.gpus}G' | ||
| if self.nodename: | ||
@@ -184,2 +205,4 @@ s += ':' + self.nodename | ||
| dct['processes'] = self.processes | ||
| if self.gpus != 0: | ||
| dct['gpus'] = self.gpus | ||
| if self.tmax != 600: | ||
@@ -257,2 +280,6 @@ dct['tmax'] = self.tmax | ||
| continue | ||
| if self.gpus > dct.get('gpus', 0): | ||
| continue | ||
| if self.gpus == 0 and dct.get('gpus', 0) > 0: | ||
| continue | ||
| if self.cores % dct['cores'] == 0: | ||
@@ -259,0 +286,0 @@ break |
@@ -56,3 +56,3 @@ from __future__ import annotations | ||
| script += self.get_venv_activation_line() | ||
| script += self.preamble() + '\n' | ||
@@ -59,0 +59,0 @@ script += ( |
@@ -60,3 +60,3 @@ from __future__ import annotations | ||
| script += self.get_venv_activation_line() | ||
| script += self.preamble() + '\n' | ||
@@ -63,0 +63,0 @@ script += ( |
@@ -18,7 +18,11 @@ from __future__ import annotations | ||
| def get_venv_activation_line(self) -> str: | ||
| def preamble(self) -> str: | ||
| lines = [] | ||
| if self.activation_script: | ||
| return (f'source {self.activation_script}\n' | ||
| f'echo "venv: {self.activation_script}"\n') | ||
| return '' | ||
| lines += [f'source {self.activation_script}', | ||
| f'echo "venv: {self.activation_script}"'] | ||
| pre = os.environ.get('MYQUEUE_PREAMBLE') | ||
| if pre: | ||
| lines.append(pre.rstrip()) | ||
| return '\n'.join(lines) | ||
@@ -25,0 +29,0 @@ def submit(self, |
@@ -16,3 +16,4 @@ from __future__ import annotations | ||
| nodelist = self.config.nodes | ||
| nodes, nodedct = task.resources.select(nodelist) | ||
| resources = task.resources | ||
| nodes, nodedct = resources.select(nodelist) | ||
@@ -23,5 +24,5 @@ env = [] | ||
| if task.resources.processes == 1: | ||
| if resources.processes == 1: | ||
| cmd = cmd.replace('python3', self.config.serial_python) | ||
| ntasks = task.resources.cores | ||
| ntasks = resources.cores | ||
| cpus_per_task = 1 | ||
@@ -36,4 +37,4 @@ else: | ||
| self.config.parallel_python) | ||
| ntasks = task.resources.processes | ||
| cpus_per_task = task.resources.cores // ntasks | ||
| ntasks = resources.processes | ||
| cpus_per_task = resources.cores // ntasks | ||
@@ -46,3 +47,3 @@ if not os.access(task.folder, os.W_OK | os.X_OK): | ||
| f'--job-name={name}', | ||
| f'--time={ceil(task.resources.tmax / 60)}', | ||
| f'--time={ceil(resources.tmax / 60)}', | ||
| f'--ntasks={ntasks}', | ||
@@ -59,2 +60,5 @@ f'--cpus-per-task={cpus_per_task}', | ||
| if resources.gpus: | ||
| sbatch.append(f'--gpus-per-node={resources.gpus}') | ||
| extra_args = self.config.extra_args + nodedct.get('extra_args', []) | ||
@@ -80,3 +84,3 @@ sbatch += extra_args | ||
| script += self.get_venv_activation_line() | ||
| script += self.preamble() + '\n' | ||
@@ -83,0 +87,0 @@ script += ( |
+3
-1
@@ -339,2 +339,3 @@ from __future__ import annotations | ||
| processes: int = 0, | ||
| gpus: int = -1, | ||
| tmax: str = '', | ||
@@ -423,3 +424,4 @@ weight: float = -1.0, | ||
| res = Resources.from_args_and_command( | ||
| cores, nodename, processes, tmax, weight, resources, command, path) | ||
| cores, nodename, processes, gpus, | ||
| tmax, weight, resources, command, path) | ||
@@ -426,0 +428,0 @@ return Task(command, |
+25
-1
@@ -292,2 +292,27 @@ """Useful utilities.""" | ||
| def completion_command() -> str: | ||
| py = sys.executable | ||
| filename = Path(__file__).with_name('complete.py') | ||
| cmd = f'complete -o default -C "{py} {filename}" mq' | ||
| return cmd | ||
| def ensure_completions() -> None: | ||
| """Add BASH tab-completion command to activation script.""" | ||
| venv = os.environ.get('VIRTUAL_ENV') | ||
| if not venv: | ||
| return | ||
| installed = Path(venv) / 'etc/myqueue/completion-installed' | ||
| if installed.is_file(): | ||
| return | ||
| cmd = completion_command() | ||
| activate = Path(venv) / 'bin/activate' | ||
| with activate.open('a') as fd: | ||
| fd.write(f'\n# Tab-completion for MyQueue:\n{cmd}\n') | ||
| installed.parent.mkdir(exist_ok=True, parents=True) | ||
| installed.touch() | ||
| print(f'Just added this line:\n\n {cmd}\n\nto your {activate} script.\n', | ||
| file=sys.stderr) | ||
| def convert_done_files() -> None: | ||
@@ -319,4 +344,3 @@ """Convert old done-files to new-style state files.""" | ||
| if __name__ == '__main__': # pragma: no cover | ||
| assert sys.version_info >= (3, 9) | ||
| os.environ['COLUMNS'] = '80' | ||
| update_readme_and_completion() |
+13
-5
@@ -322,2 +322,3 @@ from __future__ import annotations | ||
| 'cores': 1, | ||
| 'gpus': -1, | ||
| 'nodename': '', | ||
@@ -341,4 +342,5 @@ 'processes': 0, | ||
| creates: list[str] = [], | ||
| tmax: str = None, | ||
| cores: int = None, | ||
| tmax: str | None = None, | ||
| cores: int | None = None, | ||
| gpus: int | None = None, | ||
| nodename: str = None, | ||
@@ -375,2 +377,4 @@ processes: int = None, | ||
| Number of cores (default is 1). | ||
| gpus: int | ||
| Number of GPUs per node (default is 0). | ||
| nodename: str | ||
@@ -397,3 +401,3 @@ Name of node. | ||
| resource_kwargs = {} | ||
| values = [tmax, cores, nodename, processes, restart, weight] | ||
| values = [tmax, cores, gpus, nodename, processes, restart, weight] | ||
| for value, (key, default) in zip(values, | ||
@@ -466,2 +470,3 @@ self.resource_kwargs.items()): | ||
| cores: int = None, | ||
| gpus: int | None = None, | ||
| nodename: str = None, | ||
@@ -477,2 +482,4 @@ processes: int = None, | ||
| Number of cores (default is 1). | ||
| gpus: int | ||
| Number of GPUs per node (default is 0). | ||
| nodename: str | ||
@@ -487,4 +494,5 @@ Name of node. | ||
| """ | ||
| keys = ['tmax', 'cores', 'nodename', 'processes', 'restart', 'weight'] | ||
| values = [tmax, cores, nodename, processes, restart, weight] | ||
| keys = ['tmax', 'cores', 'gpus', | ||
| 'nodename', 'processes', 'restart', 'weight'] | ||
| values = [tmax, cores, gpus, nodename, processes, restart, weight] | ||
| kwargs = {key: value | ||
@@ -491,0 +499,0 @@ for key, value in zip(keys, values) |
+12
-12
| Metadata-Version: 2.1 | ||
| Name: myqueue | ||
| Version: 24.9.0 | ||
| Version: 24.10.0 | ||
| Summary: Frontend for SLURM/LSF/PBS | ||
@@ -683,3 +683,3 @@ Maintainer-email: Jens Jørgen Mortensen <jjmo@dtu.dk> | ||
| Project-URL: repository, https://gitlab.com/myqueue/myqueue | ||
| Project-URL: changelog, https://myqueue.readthedocs.io/en/latest/releasenotes.html | ||
| Project-URL: changelog, https://myqueue.readthedocs.io/releasenotes.html | ||
| Project-URL: docs, https://myqueue.readthedocs.io | ||
@@ -709,3 +709,3 @@ Project-URL: issues, https://gitlab.com/myqueue/myqueue/-/issues | ||
| .. image:: https://readthedocs.org/projects/myqueue/badge/?version=latest | ||
| :target: https://myqueue.readthedocs.io/en/latest/?badge=latest | ||
| :target: https://myqueue.readthedocs.io/?badge=latest | ||
| :alt: Documentation Status | ||
@@ -783,13 +783,13 @@ | ||
| * `Quick-start | ||
| <https://myqueue.readthedocs.io/en/latest/quickstart.html>`__ | ||
| <https://myqueue.readthedocs.io/quickstart.html>`__ | ||
| * `Documentation | ||
| <https://myqueue.readthedocs.io/en/latest/documentation.html>`__ | ||
| <https://myqueue.readthedocs.io/documentation.html>`__ | ||
| * `How it works | ||
| <https://myqueue.readthedocs.io/en/latest/howitworks.html>`__ | ||
| <https://myqueue.readthedocs.io/howitworks.html>`__ | ||
| * `Command-line interface | ||
| <https://myqueue.readthedocs.io/en/latest/cli.html>`__ | ||
| <https://myqueue.readthedocs.io/cli.html>`__ | ||
| * `Workflows | ||
| <https://myqueue.readthedocs.io/en/latest/workflows.html>`__ | ||
| <https://myqueue.readthedocs.io/workflows.html>`__ | ||
| * `Python API | ||
| <https://myqueue.readthedocs.io/en/latest/api.html>`__ | ||
| <https://myqueue.readthedocs.io/api.html>`__ | ||
@@ -814,3 +814,3 @@ | ||
| Now, configure your system as described | ||
| `here <https://myqueue.readthedocs.io/en/latest/configuration.html>`__. | ||
| `here <https://myqueue.readthedocs.io/configuration.html>`__. | ||
@@ -828,3 +828,3 @@ | ||
| See the `release notes | ||
| <https://myqueue.readthedocs.io/en/latest/releasenotes.html>`_ for a history | ||
| <https://myqueue.readthedocs.io/releasenotes.html>`_ for a history | ||
| of notable changes to MyQueue. | ||
@@ -850,2 +850,2 @@ | ||
| More information `here | ||
| <https://myqueue.readthedocs.io/en/latest/development.html>`_. | ||
| <https://myqueue.readthedocs.io/development.html>`_. |
+2
-2
@@ -7,3 +7,3 @@ [build-system] | ||
| name = "myqueue" | ||
| version = "24.9.0" | ||
| version = "24.10.0" | ||
| description = "Frontend for SLURM/LSF/PBS" | ||
@@ -34,5 +34,5 @@ | ||
| repository = "https://gitlab.com/myqueue/myqueue" | ||
| changelog = "https://myqueue.readthedocs.io/en/latest/releasenotes.html" | ||
| changelog = "https://myqueue.readthedocs.io/releasenotes.html" | ||
| docs = "https://myqueue.readthedocs.io" | ||
| issues = "https://gitlab.com/myqueue/myqueue/-/issues" | ||
| matrix = "https://matrix.to/#/#myqueue:matrix.org" |
+10
-10
@@ -7,3 +7,3 @@ .. image:: https://gitlab.com/myqueue/myqueue/badges/master/coverage.svg | ||
| .. image:: https://readthedocs.org/projects/myqueue/badge/?version=latest | ||
| :target: https://myqueue.readthedocs.io/en/latest/?badge=latest | ||
| :target: https://myqueue.readthedocs.io/?badge=latest | ||
| :alt: Documentation Status | ||
@@ -81,13 +81,13 @@ | ||
| * `Quick-start | ||
| <https://myqueue.readthedocs.io/en/latest/quickstart.html>`__ | ||
| <https://myqueue.readthedocs.io/quickstart.html>`__ | ||
| * `Documentation | ||
| <https://myqueue.readthedocs.io/en/latest/documentation.html>`__ | ||
| <https://myqueue.readthedocs.io/documentation.html>`__ | ||
| * `How it works | ||
| <https://myqueue.readthedocs.io/en/latest/howitworks.html>`__ | ||
| <https://myqueue.readthedocs.io/howitworks.html>`__ | ||
| * `Command-line interface | ||
| <https://myqueue.readthedocs.io/en/latest/cli.html>`__ | ||
| <https://myqueue.readthedocs.io/cli.html>`__ | ||
| * `Workflows | ||
| <https://myqueue.readthedocs.io/en/latest/workflows.html>`__ | ||
| <https://myqueue.readthedocs.io/workflows.html>`__ | ||
| * `Python API | ||
| <https://myqueue.readthedocs.io/en/latest/api.html>`__ | ||
| <https://myqueue.readthedocs.io/api.html>`__ | ||
@@ -112,3 +112,3 @@ | ||
| Now, configure your system as described | ||
| `here <https://myqueue.readthedocs.io/en/latest/configuration.html>`__. | ||
| `here <https://myqueue.readthedocs.io/configuration.html>`__. | ||
@@ -126,3 +126,3 @@ | ||
| See the `release notes | ||
| <https://myqueue.readthedocs.io/en/latest/releasenotes.html>`_ for a history | ||
| <https://myqueue.readthedocs.io/releasenotes.html>`_ for a history | ||
| of notable changes to MyQueue. | ||
@@ -148,2 +148,2 @@ | ||
| More information `here | ||
| <https://myqueue.readthedocs.io/en/latest/development.html>`_. | ||
| <https://myqueue.readthedocs.io/development.html>`_. |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
454217
0.56%6120
0.91%