Skip to content

Commit

Permalink
feat: server mgmt steps,syntax corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
moe-ad committed Jan 14, 2025
1 parent d0f6d31 commit 14fe79c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ skip_install =
deps =
links,html: -r requirements/requirements_docs.txt

commands_pre =
# Clear any running servers that may be locking resources
html,links: python -c "import psutil; proc_name = 'Ans.Dpf.Grpc'; nb_procs = len([proc.kill() for proc in psutil.process_iter() if proc_name in proc.name()]); \
html,links: print(f'Killed \{nb_procs} \{proc_name} processes.')"

commands =
# Remove previously rendered documentation
clean: python -c "import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)" "{toxinidir}/{env:BUILD_DIR}"
Expand Down Expand Up @@ -157,6 +162,12 @@ commands =
html: [(shutil.copy(src, 'build/html/_images') if os.path.exists(src) else print(f'Source not found: {src}')) for src in \
html: glob.glob('{env:SOURCE_DIR}/examples/04-advanced/02-volume_averaged_stress/*') + glob.glob('{env:SOURCE_DIR}/examples/12-fluids/02-fluids_results/*')]"


commands_post =
# Clear any running servers that may be locking resources
html,links: python -c "import psutil; proc_name = 'Ans.Dpf.Grpc'; nb_procs = len([proc.kill() for proc in psutil.process_iter() if proc_name in proc.name()]); \
html,links: print(f'Killed \{nb_procs} \{proc_name} processes.')"

[testenv:build-wheel]
description = Environment for custom build of package wheels

Expand Down

0 comments on commit 14fe79c

Please sign in to comment.