piel.project_structure#

This file allows us to automate several aspects of creating a fully compatible project structure.

Module Contents#

Functions#

create_setup_py(→ None)

This function creates a setup.py file from the config.json file found in the design directory.

create_empty_piel_project(→ None)

This function creates an empty piel-structure project in the target directory. Structuring your files in this way

get_module_folder_type_location(module, folder_type)

This is an easy helper function that saves a particular file in the corresponding location of a piel project structure.

pip_install_local_module(module_path)

This function installs a local module in editable mode.

read_configuration(→ dict)

This function reads the configuration file found in the design directory.

create_setup_py(design_directory: piel.types.piel_path_types, project_name: str | None = None, from_config_json: bool = True) None[source]#

This function creates a setup.py file from the config.json file found in the design directory.

Parameters:

design_directory (piel_path_types) – Design directory PATH or module name.

Returns:

None

create_empty_piel_project(project_name: str, parent_directory: piel.types.piel_path_types) None[source]#

This function creates an empty piel-structure project in the target directory. Structuring your files in this way enables the co-design and use of the tools supported by piel whilst maintaining the design flow ordered, clean and extensible. You can read more about it in the documentation TODO add link.

TODO just make this a cookiecutter. TO BE DEPRECATED whenever I get round to that.

Parameters:
  • project_name (str) – Name of the project.

  • parent_directory (piel_path_types) – Parent directory of the project.

Returns:

None

get_module_folder_type_location(module: types.ModuleType, folder_type: Literal[digital_source, digital_testbench])[source]#

This is an easy helper function that saves a particular file in the corresponding location of a piel project structure.

TODO DOCS

pip_install_local_module(module_path: piel.types.piel_path_types)[source]#

This function installs a local module in editable mode.

Parameters:

module_path (piel_path_types) – Path to the module to be installed.

Returns:

None

read_configuration(design_directory: piel.types.piel_path_types) dict[source]#

This function reads the configuration file found in the design directory.

Parameters:

design_directory (piel_path_types) – Design directory PATH.

Returns:

Configuration dictionary.

Return type:

config_dictionary(dict)