Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b26ee8d
Remove py_env_lib entity, environment, grid, and location classes
dmccoystephenson May 24, 2025
be548cd
Add Viron classes - Location, Grid, Entity, Environment, and their re…
dmccoystephenson May 24, 2025
3a21df7
Refactor import statements in service files to use direct module imports
dmccoystephenson May 24, 2025
8287c94
Add Viron submodule for project integration
dmccoystephenson May 24, 2025
74e9e89
Comment out validation for creationDate format in Environment class
dmccoystephenson May 24, 2025
5b1bc3e
Integrate location and environment services, update drawEnvironment f…
dmccoystephenson May 24, 2025
5c4d7ce
Specify num grids and modify environment creation log message
dmccoystephenson May 24, 2025
82b707d
Increase grid size from 20 to 50
dmccoystephenson May 24, 2025
5dcd478
Refactor project structure: remove model & service classes and upda…
dmccoystephenson May 25, 2025
c0c3966
Add Docker Compose scripts for starting and stopping containers
dmccoystephenson May 25, 2025
b6f1a9f
feat: load existing environment from JSON if available, otherwise cre…
dmccoystephenson May 25, 2025
08c4ec5
chore: update subproject commit reference
dmccoystephenson May 25, 2025
fba3d9a
feat: enhance environment loading logic to check grid size and number…
dmccoystephenson May 25, 2025
c7e75e1
fix: update environment file name and enhance loading logic to manage…
dmccoystephenson May 25, 2025
43a2ce1
feat: add script to create environments with incrementing sizes and u…
dmccoystephenson May 25, 2025
cc2cd71
fix: ensure environments.json is deleted before starting environment …
dmccoystephenson May 25, 2025
4a1fce3
fix: update .gitignore to include all JSON and TXT files
dmccoystephenson May 25, 2025
219b349
feat: measure and log environment creation time in main.py
dmccoystephenson May 25, 2025
7f1ba41
fix: redirect output and error logs to append instead of overwrite in…
dmccoystephenson May 25, 2025
fad9cbf
feat: add creation time tracking for environments in main.py
dmccoystephenson May 25, 2025
27dfcea
fix: add deletion message for environments.json in create_environment…
dmccoystephenson May 25, 2025
450ea45
feat: draw environment after creation and update display in main.py
dmccoystephenson May 25, 2025
f979b56
feat: enhance environment loading with error handling and user feedback
dmccoystephenson May 25, 2025
f7ca682
fix: adjust text position for environment creation message in main.py
dmccoystephenson May 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pyc
*.pyc
*.json
*.txt
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Viron"]
path = Viron
url = https://www.github.com/Preponderous-Software/Viron
1 change: 1 addition & 0 deletions Viron
Submodule Viron added at d9809d
15 changes: 15 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import os
import importlib

package_dir = os.path.dirname(__file__)

for root, dirs, files in os.walk(package_dir):
for file in files:
if file.endswith('.py') and file != '__init__.py':
rel_dir = os.path.relpath(root, package_dir)
module_name = file[:-3]
if rel_dir == '.':
import_path = f".{module_name}"
else:
import_path = "." + ".".join(rel_dir.split(os.sep)) + f".{module_name}"
importlib.import_module(import_path, package=__package__)
42 changes: 42 additions & 0 deletions create_environments.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Script to run `python main.py` a number of times with incrementing sizes

echo off

setlocal enabledelayedexpansion
set "script=main.py"
REM Check if a max size argument was provided, otherwise use default
if "%~1"=="" (
echo No max size provided, using default value.
set "max_size=100"
) else (
echo Max size provided: %~1
set "max_size=%~1"
)
REM Delete environments.json before starting
echo Deleting environments.json if it exists...
if exist environments.json (
echo environments.json found, deleting...
del environments.json
) else (
echo environments.json not found, nothing to delete.
)

set "size_of_next_env=1"
set "increment=1"
set "output_file=output.txt"
set "python_executable=python"
set "log_file=log.txt"
set "error_log_file=error_log.txt"

:loop
if !size_of_next_env! leq !max_size! (
@echo Starting environment with size !size_of_next_env!
%python_executable% %script% !size_of_next_env! --exit-after-create >> %output_file% 2>> %error_log_file%
if errorlevel 1 (
echo Error occurred while running with size !size_of_next_env!.
) else (
echo Environment created successfully with size !size_of_next_env!.
)
set /a size_of_next_env+=%increment%
goto loop
)
6 changes: 6 additions & 0 deletions down.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This script is used to stop the Docker containers defined in the Docker Compose file.

docker compose -f .\viron\compose.yml down --remove-orphans --volumes
REM The --remove-orphans flag removes containers for services not defined in the Compose file.
REM The --volumes flag removes the volumes associated with the containers, ensuring a clean shutdown.
REM This ensures that all resources are cleaned up when the containers are stopped.
92 changes: 0 additions & 92 deletions entity.py

This file was deleted.

66 changes: 0 additions & 66 deletions environment.py

This file was deleted.

119 changes: 0 additions & 119 deletions grid.py

This file was deleted.

Loading