<commit_before>(ns prop-shop.data.environment
  "Provides data access and manipulation for Environment resources."
  {:author "<NAME>"}
  (:require [prop-shop.data.base :as b]))


(defn add-environment
  "Persists a new Environment with the provided name."
  {:added "0.1"}
  [name]
  (b/add-entity
    {:name name
     :type :environment}))


(defn get-environments
  "Retrieves all Environments."
  {:added "0.1"}
  []
  (b/get-entities-by-type :environment))<commit_msg>Added function to rename an Environment resource. Fixes #39<commit_after>(ns prop-shop.data.environment
  "Provides data access and manipulation for Environment resources."
  {:author "<NAME>"}
  (:require [prop-shop.data.base :as b]))


(defn add-environment
  "Persists a new Environment with the provided name."
  {:added "0.1"}
  [name]
  (b/add-entity
    {:name name
     :type :environment}))


(defn get-environments
  "Retrieves all Environments."
  {:added "0.1"}
  []
  (b/get-entities-by-type :environment))


(defn get-environment
  "Retrieves an Environment by its UUID."
  {:added "0.1"}
  [uuid]
  (b/get-entity-by-uuid uuid))


(defn rename-environment
	"Renames the Environment specified by the UUID with the provided name."
	{:added "0.1"}
	[uuid name]
	(b/update-entity-by-uuid uuid {:name name}))
{'fraction_non_alphanumeric': 0.1449612403100775, 'fraction_numerical': 0.010852713178294573, 'mean_word_length': 3.8171641791044775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6627229', 'n_tokens_mistral': 453, 'n_tokens_neox': 439, 'n_words': 127}