From 932ff9632d1fccbfc7650298694580db7f28b88b Mon Sep 17 00:00:00 2001 From: perceptualrobots <67976964+perceptualrobots@users.noreply.github.com> Date: Fri, 3 Jan 2025 14:26:44 +0000 Subject: [PATCH] Add method to return config file contents in PCTExamples class Related to #9 --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/perceptualrobots/pct/issues/9?shareId=XXXX-XXXX-XXXX-XXXX). --- nbs/19_pct_examples.ipynb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nbs/19_pct_examples.ipynb b/nbs/19_pct_examples.ipynb index 3f1790d2..40048feb 100644 --- a/nbs/19_pct_examples.ipynb +++ b/nbs/19_pct_examples.ipynb @@ -165,8 +165,13 @@ "\n", " return None\n", "\n", - " \n", - " \n", + " def get_config_file_contents(self):\n", + " \"\"\"\n", + " Reads and returns the contents of the config file.\n", + " \"\"\"\n", + " with open(self.config_file, 'r') as file:\n", + " return file.read()\n", + "\n", " def plot_history(self, plots=None, title_prefix='', plots_dir=None, plots_figsize=(12, 6), history_data=None):\n", " \"\"\"\n", " Plots the history of the hierarchy.\n",