Repository: RasaHQ/rasa
Pull request: Follow through on deprecation warnings for `rasa.shared.data`.
**Proposed changes**:
- fix #8867 

**Status (please check what you already did)**:
- [ ] added some tests for the functionality
- [ ] updated the documentation
- [x] updated the changelog (please check [changelog](https://github.com/RasaHQ/rasa/tree/main/changelog) for instructions)
- [x] reformat files using `black` (please check [Readme](https://github.com/RasaHQ/rasa#code-style) for instructions)


Problem statement:
3.0 Deprecation Warning: Resolve `rasa.shared.data` warnings
**Background**:
These warnings were found in:
- rasa.shared.data.py:L74
```
"`get_test_directory` is deprecated and will be removed in Rasa 3.0.0. "
```
- rasa.shared.data.py:L120
```
"`get_core_nlu_directories` is deprecated and will be removed in Rasa 3.0.0. "
```

**Definition of Done**:
- [ ] resolve deprecation warning in 3.0 version

Hints from issue discussion:

Commit message: Follow through on deprecation warnings for `rasa.shared.data`.

Patch to review:
diff --git a/changelog/8867.removal.md b/changelog/8867.removal.md
new file mode 100644
index 000000000000..0687f9033b43
--- /dev/null
+++ b/changelog/8867.removal.md
@@ -0,0 +1 @@
+Follow through on deprecation warnings for `rasa.shared.data`.
diff --git a/docs/docs/jupyter-notebooks.mdx b/docs/docs/jupyter-notebooks.mdx
index 8f1a73b0fc31..bdd2084a3000 100644
--- a/docs/docs/jupyter-notebooks.mdx
+++ b/docs/docs/jupyter-notebooks.mdx
@@ -75,15 +75,15 @@ chat(model_path, endpoints)
 ## Evaluate your model against test data
 
 Rasa has a convenience function for getting your training data.
-Rasa's `get_core_nlu_directories` is a function which
-recursively finds all the stories and NLU data files in a directory
-and copies them into two temporary directories.
+Rasa's `get_core_directory` and `get_nlu_directory` are functions which
+recursively find all the stories or NLU data files
+and copies them into temporary directories.
 The return values are the paths to these newly created directories.
 
 ```bash
 import rasa.data as data
-nlu_data_directory = data.get_data_directories(training_files, data.is_nlu_file)
-stories_directory = data.get_data_directories(training_files, data.is_story_file)
+nlu_data_directory = data.get_nlu_directory(training_files)
+stories_directory = data.get_core_directory(training_files)
 print(stories_directory, nlu_data_directory)
 ```
 To test your model, call the `test` function, passing in the path
diff --git a/rasa/shared/data.py b/rasa/shared/data.py
index 6f02eeb68a95..592877d74af9 100644
--- a/rasa/shared/data.py
+++ b/rasa/shared/data.py
@@ -61,23 +61,6 @@ def is_likely_markdown_file(file_path: Text) -> bool:
     return Path(file_path).suffix in set(MARKDOWN_FILE_EXTENSIONS)
 
 
-def get_test_directory(paths: Optional[Union[Text, List[Text]]]) -> Text:
-    """Recursively collects all Core training files from a list of paths.
-
-    Args:
-        paths: List of paths to training files or folders containing them.
-
-    Returns:
-        Path to temporary directory containing all found Core training files.
-    """
-    rasa.shared.utils.io.raise_warning(
-        "`get_test_directory` is deprecated and will be removed in Rasa 3.0.0. ",
-        category=DeprecationWarning,
-    )
-    test_files = get_data_files(paths, is_test_stories_file)
-    return _copy_files_to_new_dir(test_files)
-
-
 def get_core_directory(paths: Optional[Union[Text, List[Text]]]) -> Text:
     """Recursively collects all Core training files from a list of paths.
 
@@ -104,31 +87,6 @@ def get_nlu_directory(paths: Optional[Union[Text, List[Text]]],) -> Text:
     return _copy_files_to_new_dir(nlu_files)
 
 
-def get_core_nlu_directories(
-    paths: Optional[Union[Text, List[Text]]]
-) -> Tuple[Text, Text]:
-    """Recursively collects all training files from a list of paths.
-
-    Args:
-        paths: List of paths to training files or folders containing them.
-
-    Returns:
-        Path to directory containing the Core files and path to directory
-        containing the NLU training files.
-    """
-    rasa.shared.utils.io.raise_warning(
-        "`get_core_nlu_directories` is deprecated and will be removed in Rasa 3.0.0. ",
-        category=DeprecationWarning,
-    )
-    story_files = get_data_files(paths, is_story_file)
-    nlu_data_files = get_data_files(paths, is_nlu_file)
-
-    story_directory = _copy_files_to_new_dir(story_files)
-    nlu_directory = _copy_files_to_new_dir(nlu_data_files)
-
-    return story_directory, nlu_directory
-
-
 def get_data_files(
     paths: Optional[Union[Text, List[Text]]], filter_predicate: Callable[[Text], bool]
 ) -> List[Text]:
diff --git a/tests/shared/test_data.py b/tests/shared/test_data.py
index 390b4a976d24..5d81d4787e15 100644
--- a/tests/shared/test_data.py
+++ b/tests/shared/test_data.py
@@ -187,60 +187,6 @@ def test_get_core_nlu_files(project):
     assert any(file.endswith("rules.yml") for file in core_files)
 
 
-def test_get_core_nlu_directories(project):
-    data_dir = os.path.join(project, "data")
-    core_directory, nlu_directory = rasa.shared.data.get_core_nlu_directories(
-        [data_dir]
-    )
-
-    nlu_files = os.listdir(nlu_directory)
-
-    assert len(nlu_files) == 1
-    assert nlu_files[0].endswith("nlu.yml")
-
-    core_files = os.listdir(core_directory)
-
-    assert len(core_files) == 2
-    assert any(file.endswith("stories.yml") for file in core_files)
-    assert any(file.endswith("rules.yml") for file in core_files)
-
-
-def test_get_core_nlu_directories_with_none():
-    directories = rasa.shared.data.get_core_nlu_directories(None)
-
-    assert all(directories)
-    assert all(not os.listdir(directory) for directory in directories)
-
-
-def test_same_file_names_get_resolved(
-    tmp_path: Path, stories_path: Text, nlu_data_path: Text
-):
-    # makes sure the resolution properly handles if there are two files with
-    # with the same name in different directories
-
-    (tmp_path / "one").mkdir()
-    (tmp_path / "two").mkdir()
-    shutil.copy2(stories_path, tmp_path / "one" / "stories.yml")
-    shutil.copy2(stories_path, tmp_path / "two" / "stories.yml")
-
-    shutil.copy2(nlu_data_path, tmp_path / "one" / "nlu.yml")
-    shutil.copy2(nlu_data_path, tmp_path / "two" / "nlu.yml")
-
-    core_directory, nlu_directory = rasa.shared.data.get_core_nlu_directories(
-        [str(tmp_path)]
-    )
-
-    nlu_files = os.listdir(nlu_directory)
-
-    assert len(nlu_files) == 2
-    assert all(f.endswith("nlu.yml") for f in nlu_files)
-
-    stories = os.listdir(core_directory)
-
-    assert len(stories) == 2
-    assert all(f.endswith("stories.yml") for f in stories)
-
-
 @pytest.mark.parametrize(
     "test_input,expected",
     [


Code review comments:
diff_hunk: @@ -75,15 +75,15 @@ chat(model_path, endpoints)
 ## Evaluate your model against test data
 
 Rasa has a convenience function for getting your training data.
-Rasa's `get_core_nlu_directories` is a function which
-recursively finds all the stories and NLU data files in a directory
-and copies them into two temporary directories.
+Rasa's `get_core_directory` and `get_nlu_directory` are functions which
+recursively find all the stories or NLU data files
+and copies them into temporary directories.
 The return values are the paths to these newly created directories.
 
 ```bash
 import rasa.data as data
path: docs/docs/jupyter-notebooks.mdx
text: @user1:
This is not your change - but shouldn't this be `import rasa.shared.data as data`?

@author:
Updated! To be honest, I am not sure how up-to-date this file is.