bmtool 0.5.7__tar.gz → 0.5.7.1__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.
Files changed (29) hide show
  1. {bmtool-0.5.7 → bmtool-0.5.7.1}/PKG-INFO +1 -1
  2. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/SLURM.py +18 -7
  3. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool.egg-info/PKG-INFO +1 -1
  4. {bmtool-0.5.7 → bmtool-0.5.7.1}/setup.py +1 -1
  5. {bmtool-0.5.7 → bmtool-0.5.7.1}/LICENSE +0 -0
  6. {bmtool-0.5.7 → bmtool-0.5.7.1}/README.md +0 -0
  7. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/__init__.py +0 -0
  8. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/__main__.py +0 -0
  9. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/bmplot.py +0 -0
  10. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/connectors.py +0 -0
  11. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/debug/__init__.py +0 -0
  12. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/debug/commands.py +0 -0
  13. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/debug/debug.py +0 -0
  14. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/graphs.py +0 -0
  15. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/manage.py +0 -0
  16. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/plot_commands.py +0 -0
  17. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/singlecell.py +0 -0
  18. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/synapses.py +0 -0
  19. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/util/__init__.py +0 -0
  20. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/util/commands.py +0 -0
  21. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/util/neuron/__init__.py +0 -0
  22. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/util/neuron/celltuner.py +0 -0
  23. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool/util/util.py +0 -0
  24. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool.egg-info/SOURCES.txt +0 -0
  25. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool.egg-info/dependency_links.txt +0 -0
  26. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool.egg-info/entry_points.txt +0 -0
  27. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool.egg-info/requires.txt +0 -0
  28. {bmtool-0.5.7 → bmtool-0.5.7.1}/bmtool.egg-info/top_level.txt +0 -0
  29. {bmtool-0.5.7 → bmtool-0.5.7.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bmtool
3
- Version: 0.5.7
3
+ Version: 0.5.7.1
4
4
  Summary: BMTool
5
5
  Home-page: https://github.com/cyneuro/bmtool
6
6
  Download-URL:
@@ -59,7 +59,12 @@ def submit_job(script_path):
59
59
 
60
60
 
61
61
  def send_teams_message(webhook,message):
62
- # Message payload
62
+ """Sends a message to a teams channel or chat
63
+
64
+ Args:
65
+ webhook (str): A microsoft teams webhook
66
+ message (str): A message to send in the chat/channel
67
+ """
63
68
  message = {
64
69
  "text": f"{message}"
65
70
  }
@@ -256,8 +261,11 @@ export OUTPUT_DIR={case_output_dir}
256
261
  return True
257
262
 
258
263
  def check_block_completed(self):
259
- # Implement this method to check if all jobs are completed
260
- # This should return True only if all jobs are in the COMPLETED state
264
+ """checks if all the jobs in the block have been completed by slurm
265
+
266
+ Returns:
267
+ bool: True if all block jobs have been ran, false if job is still running
268
+ """
261
269
  for job_id in self.job_ids:
262
270
  status = check_job_status(job_id)
263
271
  if status != 'COMPLETED': # can add PENDING here for debugging NOT FOR ACTUALLY USING IT
@@ -266,8 +274,11 @@ export OUTPUT_DIR={case_output_dir}
266
274
 
267
275
 
268
276
  def check_block_running(self):
269
- # Implement this method to check if all jobs are completed
270
- # This should return True only if all jobs are in the COMPLETED state
277
+ """checks if a job is running
278
+
279
+ Returns:
280
+ bool: True if jobs are RUNNING false if anything else
281
+ """
271
282
  for job_id in self.job_ids:
272
283
  status = check_job_status(job_id)
273
284
  if status != 'RUNNING': #
@@ -283,6 +294,7 @@ class SequentialBlockRunner:
283
294
  blocks (list): List of SimulationBlock instances to be run.
284
295
  json_editor (seedSweep or multiSweep): Instance of seedSweep to edit JSON file.
285
296
  param_values (list): List of values for the parameter to be modified.
297
+ webhook (str): a microsoft webhook for teams. When used will send teams messages to the hook!
286
298
  """
287
299
 
288
300
  def __init__(self, blocks, json_editor=None, param_values=None, check_interval=200,webhook=None):
@@ -322,9 +334,8 @@ class SequentialBlockRunner:
322
334
  message = f"SIMULATION UPDATE: Block {i} has been submitted! There are {(len(self.blocks)-1)-i} left to be submitted"
323
335
  send_teams_message(self.webhook,message)
324
336
 
325
- time.sleep(self.check_interval)
326
337
  # Wait for the block to complete
327
- if i == len(self.blocks): # we want to wait for the last block to be completed not just running
338
+ if i == len(self.blocks) - 1: # Corrected index to check the last block
328
339
  while not block.check_block_completed():
329
340
  print(f"Waiting for the last block {i} to complete...")
330
341
  time.sleep(self.check_interval)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bmtool
3
- Version: 0.5.7
3
+ Version: 0.5.7.1
4
4
  Summary: BMTool
5
5
  Home-page: https://github.com/cyneuro/bmtool
6
6
  Download-URL:
@@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
6
6
 
7
7
  setup(
8
8
  name="bmtool",
9
- version='0.5.7',
9
+ version='0.5.7.1',
10
10
  author="Neural Engineering Laboratory at the University of Missouri",
11
11
  author_email="gregglickert@mail.missouri.edu",
12
12
  description="BMTool",
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes