From 3131e3d3645856d057cc79ae2ed9666ba0b16e76 Mon Sep 17 00:00:00 2001 From: "r.jaepel" <r.jaepel@fz-juelich.de> Date: Fri, 1 Sep 2023 14:56:23 +0200 Subject: [PATCH] Add creation of environment_yml to initialize_repo.py --- cadetrdm/initialize_repo.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cadetrdm/initialize_repo.py b/cadetrdm/initialize_repo.py index d970499..6b6c86f 100644 --- a/cadetrdm/initialize_repo.py +++ b/cadetrdm/initialize_repo.py @@ -133,9 +133,17 @@ def initialize_git_repo(path_to_repo: str, output_repo_name: (str | bool) = "out os.chdir(starting_directory) +def create_environment_yml(): + file_lines = ["name: rdm_example", "channels:", " - conda-forge", "dependencies:", " - python=3.10", " - conda", + " - cadet", " - pip", " - pip:", " - cadet-process", " - cadetrdm"] + + write_lines_to_file("environment.yml", file_lines, open_type="w") + + def create_readme(): readme_lines = ["# Project repo", "Your code goes in this repo.", "Please add a description here including: ", "- authors", "- project", "- things we will find interesting later", "", "", + "Please update the environment.yml with your python environment requirements.", "", "", "The output repository can be found at:", "[output_repo]() (not actually set yet because no remote has been configured at this moment"] write_lines_to_file("README.md", readme_lines, open_type="w") -- GitLab