libpipe 0.4__tar.gz → 0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
libpipe-0.5/PKG-INFO ADDED
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.3
2
+ Name: libpipe
3
+ Version: 0.5
4
+ Summary: Pipeline orchestration and node management utilities
5
+ License: GPL-3.0-or-later
6
+ Author: Florent Mertens
7
+ Author-email: florent.mertens@gmail.com
8
+ Requires-Python: >=3.10
9
+ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Dist: asyncssh (>=2.0)
16
+ Requires-Dist: click (>=8.0)
17
+ Requires-Dist: progressbar2 (>=3.40)
18
+ Requires-Dist: toml (>=0.10)
19
+ Description-Content-Type: text/markdown
20
+
21
+ Libpipe
22
+ =======
23
+
24
+ Common pipeline framework and library
25
+
26
+ Installation
27
+ ------------
28
+
29
+ libpipe can be installed via pip:
30
+
31
+ $ pip install libpipe
32
+
33
+ and requires Python 3.6.0 or higher.
34
+
@@ -224,13 +224,18 @@ def test_run_on_host():
224
224
 
225
225
  for i in range(20 * n_hosts):
226
226
  w.add('echo 0', run_on_host=random.choice(hosts))
227
+ w.add('echo 0', run_on_host='wrong_host')
228
+ task_last = w.tasks[-1]
227
229
 
228
230
  success, errors = w.execute()
229
231
 
230
232
  assert len(errors) == 0
231
233
 
232
234
  for task in success:
233
- assert task.remote_host == task.run_on_host
235
+ if task == task_last:
236
+ assert task.run_on_host == None
237
+ else:
238
+ assert task.remote_host == task.run_on_host
234
239
 
235
240
 
236
241
  def test_line_too_long(tmp_path):
@@ -249,7 +249,7 @@ class Client(object):
249
249
  try:
250
250
  self.conn, self.client = await asyncssh.create_connection(SSHClient, self.host, username=self.user,
251
251
  password=self.password, agent_forwarding=True)
252
- self.conn.set_keepalive(60, 3)
252
+ self.conn.set_keepalive(120, 5)
253
253
  except Exception:
254
254
  raise
255
255
  finally:
@@ -445,6 +445,7 @@ class WorkerPool(object):
445
445
  """
446
446
  if run_on_host is not None and run_on_host not in self.hosts:
447
447
  print(f'Requested run_on_host "{run_on_host}" is not in the hosts list. Releasing constraint ...')
448
+ run_on_host = None
448
449
 
449
450
  if self.env_file:
450
451
  command = f"bash -c '. {self.env_file}; {command}'"
@@ -519,6 +520,9 @@ class WorkerPool(object):
519
520
  asyncio.get_event_loop().call_soon_threadsafe(sys.exit, exit_code)
520
521
 
521
522
  async def process_tasks(self):
523
+ # Sort tasks so that those with run_on_host are started first
524
+ self.tasks.sort(key=lambda task: not task.run_on_host)
525
+
522
526
  self.pbar.start(max_value=len(self.tasks))
523
527
 
524
528
  self.futures = [asyncio.ensure_future(task.run(self)) for task in self.tasks]
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ["poetry-core>=1.9.0"]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ [project]
6
+ name = "libpipe"
7
+ version = "0.5"
8
+ description = "Pipeline orchestration and node management utilities"
9
+ readme = "README.md"
10
+ license = { text = "GPL-3.0-or-later" }
11
+ authors = [
12
+ { name = "Florent Mertens", email = "florent.mertens@gmail.com" }
13
+ ]
14
+ repository = "https://gitlab.com/flomertens/libpipe"
15
+ requires-python = ">=3.10"
16
+
17
+ dependencies = [
18
+ "asyncssh>=2.0",
19
+ "progressbar2>=3.40",
20
+ "toml>=0.10",
21
+ "click>=8.0",
22
+ ]
23
+
24
+ [project.scripts]
25
+ nodetool = "libpipe.tools.nodetool:main"
26
+
27
+ [tool.poetry.group.dev.dependencies]
28
+ pytest = "^8.0"
29
+ pytest-cov = "^5.0"
libpipe-0.4/PKG-INFO DELETED
@@ -1,39 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: libpipe
3
- Version: 0.4
4
- Summary:
5
- Home-page: https://gitlab.com/flomertens/libpipe
6
- License: GPL-3.0-or-later
7
- Author: "Florent Mertens"
8
- Author-email: "florent.mertens@gmail.com"
9
- Requires-Python: >=3.6,<4.0
10
- Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.6
13
- Classifier: Programming Language :: Python :: 3.7
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Requires-Dist: asyncssh (>=2.0,<3.0)
19
- Requires-Dist: click (>=7.0,<9.0)
20
- Requires-Dist: importlib-metadata (>=1.0,<2.0); python_version < "3.8"
21
- Requires-Dist: progressbar2 (>=3.40)
22
- Requires-Dist: toml (>=0.10)
23
- Project-URL: Repository, https://gitlab.com/flomertens/libpipe
24
- Description-Content-Type: text/markdown
25
-
26
- Libpipe
27
- =======
28
-
29
- Common pipeline framework and library
30
-
31
- Installation
32
- ------------
33
-
34
- libpipe can be installed via pip:
35
-
36
- $ pip install libpipe
37
-
38
- and requires Python 3.6.0 or higher.
39
-
@@ -1,27 +0,0 @@
1
- [tool.poetry]
2
- name = "libpipe"
3
- version = "0.4"
4
- description = ""
5
- authors = ["\"Florent Mertens\" <\"florent.mertens@gmail.com\">"]
6
- license = "GPL-3.0-or-later"
7
- readme = 'README.md'
8
- repository = "https://gitlab.com/flomertens/libpipe"
9
-
10
- [tool.poetry.dependencies]
11
- python = "^3.6"
12
- asyncssh = "^2.0"
13
- progressbar2 = ">=3.40"
14
- toml = ">=0.10"
15
- click = "^7.0 | ^8.0"
16
- importlib-metadata = {version = "^1.0", python = "<3.8"}
17
-
18
- [tool.poetry.dev-dependencies]
19
- pytest = ">=5.2"
20
- pytest-cov = "^2.8.1"
21
-
22
- [tool.poetry.scripts]
23
- nodetool = "libpipe.tools.nodetool:main"
24
-
25
- [build-system]
26
- requires = ["poetry-core>=1.0.8"]
27
- build-backend = "poetry.core.masonry.api"
libpipe-0.4/setup.py DELETED
@@ -1,38 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from setuptools import setup
3
-
4
- packages = \
5
- ['libpipe', 'libpipe.tests', 'libpipe.tools']
6
-
7
- package_data = \
8
- {'': ['*']}
9
-
10
- install_requires = \
11
- ['asyncssh>=2.0,<3.0', 'click>=7.0,<9.0', 'progressbar2>=3.40', 'toml>=0.10']
12
-
13
- extras_require = \
14
- {':python_version < "3.8"': ['importlib-metadata>=1.0,<2.0']}
15
-
16
- entry_points = \
17
- {'console_scripts': ['nodetool = libpipe.tools.nodetool:main']}
18
-
19
- setup_kwargs = {
20
- 'name': 'libpipe',
21
- 'version': '0.4',
22
- 'description': '',
23
- 'long_description': 'Libpipe\n=======\n\nCommon pipeline framework and library\n\nInstallation\n------------\n\nlibpipe can be installed via pip:\n\n $ pip install libpipe\n\nand requires Python 3.6.0 or higher.\n',
24
- 'author': '"Florent Mertens"',
25
- 'author_email': '"florent.mertens@gmail.com"',
26
- 'maintainer': 'None',
27
- 'maintainer_email': 'None',
28
- 'url': 'https://gitlab.com/flomertens/libpipe',
29
- 'packages': packages,
30
- 'package_data': package_data,
31
- 'install_requires': install_requires,
32
- 'extras_require': extras_require,
33
- 'entry_points': entry_points,
34
- 'python_requires': '>=3.6,<4.0',
35
- }
36
-
37
-
38
- setup(**setup_kwargs)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes