From aaba92f55522a1f1f942f78efdf0a5ab2ebef144 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20Schr=C3=B6der?=
 <fschroeder@techfak.uni-bielefeld.de>
Date: Wed, 28 Feb 2024 16:56:22 +0100
Subject: [PATCH] Rename 'order.py' to 'orders.py' and update references

The 'order.py' module has been renamed to 'orders.py' for consistency and clarity. All references to this file within the code base, including import statements and comments, have been updated to reflect this change. A safer and more coherent codebase enhances readability and maintainability.
---
 cooperative_cuisine/configs/environment_config.yaml       | 4 ++--
 .../configs/study/level1/level1_config.yaml               | 4 ++--
 .../configs/study/level2/level2_config.yaml               | 4 ++--
 cooperative_cuisine/configs/tutorial_env_config.yaml      | 4 ++--
 cooperative_cuisine/counter_factory.py                    | 2 +-
 cooperative_cuisine/environment.py                        | 2 +-
 cooperative_cuisine/{order.py => orders.py}               | 8 ++++----
 .../reinforcement_learning/environment_config_rl.yaml     | 2 +-
 8 files changed, 15 insertions(+), 15 deletions(-)
 rename cooperative_cuisine/{order.py => orders.py} (98%)

diff --git a/cooperative_cuisine/configs/environment_config.yaml b/cooperative_cuisine/configs/environment_config.yaml
index 8757937d..d589789d 100644
--- a/cooperative_cuisine/configs/environment_config.yaml
+++ b/cooperative_cuisine/configs/environment_config.yaml
@@ -55,8 +55,8 @@ layout_chars:
 
 
 orders:
-  order_gen_class: !!python/name:cooperative_cuisine.order.RandomOrderGeneration ''
-  # the class to that receives the kwargs. Should be a child class of OrderGeneration in order.py
+  order_gen_class: !!python/name:cooperative_cuisine.orders.RandomOrderGeneration ''
+  # the class to that receives the kwargs. Should be a child class of OrderGeneration in orders.py
   order_gen_kwargs:
     order_duration_random_func:
       # how long should the orders be alive
diff --git a/cooperative_cuisine/configs/study/level1/level1_config.yaml b/cooperative_cuisine/configs/study/level1/level1_config.yaml
index cb270a97..d6e96cc4 100644
--- a/cooperative_cuisine/configs/study/level1/level1_config.yaml
+++ b/cooperative_cuisine/configs/study/level1/level1_config.yaml
@@ -54,8 +54,8 @@ layout_chars:
 
 
 orders:
-  order_gen_class: !!python/name:cooperative_cuisine.order.RandomOrderGeneration ''
-  # the class to that receives the kwargs. Should be a child class of OrderGeneration in order.py
+  order_gen_class: !!python/name:cooperative_cuisine.orders.RandomOrderGeneration ''
+  # the class to that receives the kwargs. Should be a child class of OrderGeneration in orders.py
   order_gen_kwargs:
     order_duration_random_func:
       # how long should the orders be alive
diff --git a/cooperative_cuisine/configs/study/level2/level2_config.yaml b/cooperative_cuisine/configs/study/level2/level2_config.yaml
index a6759c7a..0473e208 100644
--- a/cooperative_cuisine/configs/study/level2/level2_config.yaml
+++ b/cooperative_cuisine/configs/study/level2/level2_config.yaml
@@ -52,8 +52,8 @@ layout_chars:
 
 
 orders:
-  order_gen_class: !!python/name:cooperative_cuisine.order.RandomOrderGeneration ''
-  # the class to that receives the kwargs. Should be a child class of OrderGeneration in order.py
+  order_gen_class: !!python/name:cooperative_cuisine.orders.RandomOrderGeneration ''
+  # the class to that receives the kwargs. Should be a child class of OrderGeneration in orders.py
   order_gen_kwargs:
     order_duration_random_func:
       # how long should the orders be alive
diff --git a/cooperative_cuisine/configs/tutorial_env_config.yaml b/cooperative_cuisine/configs/tutorial_env_config.yaml
index 983b9a44..1a41ba31 100644
--- a/cooperative_cuisine/configs/tutorial_env_config.yaml
+++ b/cooperative_cuisine/configs/tutorial_env_config.yaml
@@ -52,8 +52,8 @@ layout_chars:
 
 
 orders:
-  order_gen_class: !!python/name:cooperative_cuisine.order.RandomOrderGeneration ''
-  # the class to that receives the kwargs. Should be a child class of OrderGeneration in order.py
+  order_gen_class: !!python/name:cooperative_cuisine.orders.RandomOrderGeneration ''
+  # the class to that receives the kwargs. Should be a child class of OrderGeneration in orders.py
   order_gen_kwargs:
     order_duration_random_func:
       # how long should the orders be alive
diff --git a/cooperative_cuisine/counter_factory.py b/cooperative_cuisine/counter_factory.py
index f71ce499..2dc90d33 100644
--- a/cooperative_cuisine/counter_factory.py
+++ b/cooperative_cuisine/counter_factory.py
@@ -60,7 +60,7 @@ from cooperative_cuisine.game_items import (
     Item,
 )
 from cooperative_cuisine.hooks import Hooks
-from cooperative_cuisine.order import OrderManager
+from cooperative_cuisine.orders import OrderManager
 from cooperative_cuisine.utils import get_closest
 
 T = TypeVar("T")
diff --git a/cooperative_cuisine/environment.py b/cooperative_cuisine/environment.py
index da666278..42426009 100644
--- a/cooperative_cuisine/environment.py
+++ b/cooperative_cuisine/environment.py
@@ -52,7 +52,7 @@ from cooperative_cuisine.hooks import (
     ITEM_INFO_CONFIG,
     POST_STEP,
 )
-from cooperative_cuisine.order import (
+from cooperative_cuisine.orders import (
     OrderManager,
     OrderConfig,
 )
diff --git a/cooperative_cuisine/order.py b/cooperative_cuisine/orders.py
similarity index 98%
rename from cooperative_cuisine/order.py
rename to cooperative_cuisine/orders.py
index 7158df13..460f4578 100644
--- a/cooperative_cuisine/order.py
+++ b/cooperative_cuisine/orders.py
@@ -6,7 +6,7 @@ It is very configurable by letting you reference own Python classes and function
 ```yaml
 orders:
   serving_not_ordered_meals: null
-  order_gen_class:  !!python/name:cooperative_cuisine.order.RandomOrderGeneration ''
+  order_gen_class:  !!python/name:cooperative_cuisine.orders.RandomOrderGeneration ''
   order_gen_kwargs:
     ...
 ```
@@ -97,7 +97,7 @@ class OrderGeneration:
     Example:
         ```yaml
         orders:
-          order_gen_class: !!python/name:cooperative_cuisine.order.RandomOrderGeneration ''
+          order_gen_class: !!python/name:cooperative_cuisine.orders.RandomOrderGeneration ''
           kwargs:
             ...
         ```
@@ -334,8 +334,8 @@ class RandomOrderGeneration(OrderGeneration):
     You can set this order generation in your `environment_config.yml` with
     ```yaml
     orders:
-      order_gen_class: !!python/name:cooperative_cuisine.order.RandomOrderGeneration ''
-      # the class to that receives the kwargs. Should be a child class of OrderGeneration in order.py
+      order_gen_class: !!python/name:cooperative_cuisine.orders.RandomOrderGeneration ''
+      # the class to that receives the kwargs. Should be a child class of OrderGeneration in orders.py
       order_gen_kwargs:
         order_duration_random_func:
           # how long should the orders be alive
diff --git a/cooperative_cuisine/reinforcement_learning/environment_config_rl.yaml b/cooperative_cuisine/reinforcement_learning/environment_config_rl.yaml
index 8dc06e5e..5e75d9bd 100644
--- a/cooperative_cuisine/reinforcement_learning/environment_config_rl.yaml
+++ b/cooperative_cuisine/reinforcement_learning/environment_config_rl.yaml
@@ -56,7 +56,7 @@ layout_chars:
 
 orders:
   order_gen_class: !!python/name:cooperative_cuisine.order.RandomOrderGeneration ''
-  # the class to that receives the kwargs. Should be a child class of OrderGeneration in order.py
+  # the class to that receives the kwargs. Should be a child class of OrderGeneration in orders.py
   order_gen_kwargs:
     order_duration_random_func:
       # how long should the orders be alive
-- 
GitLab