The-Defiant / pseudomonas

R package for adding namespace for function calls
0 stars 0 forks source link

Create main functionality for the package #2

Open project-defiant opened 4 months ago

project-defiant commented 4 months ago

The function search_abstract_syntax_tree should be a recursive call that checks all abstract syntax tree branches and finds the function calls. This function should use the the lobstr package

The function get_packages should extract available packages from the installed packages context

The function add_namespace should take a single ast string with the function call and replace the function name with the namespace::function name for instance read_csv -> readr::read_csv.

The function search_namespace should search package namespace to see it there is a name The function extract_function_namespace should loop over existing namespaces and try to find the namespace that has the function name within in by using search_namespace. The return value here should be the namespace string that will be subbing the function name without the namespace.

Each function should have a unit test that tells us that the functionality works correctly.

@olciila if you need any other information, feel free to set the questions below

project-defiant commented 1 month ago

@olciila any updates ?