Class PythonProjectLayout

java.lang.Object
org.machanism.machai.project.layout.ProjectLayout
org.machanism.machai.project.layout.PythonProjectLayout

public class PythonProjectLayout extends ProjectLayout
Project layout implementation for Python-based projects.

Determines if a directory contains a Python project using pyproject.toml and related metadata. Handles analysis of modules, sources, documents, and tests in a Python environment.

Since:
0.0.2
Author:
Viktor Tovstyi
  • Constructor Details

    • PythonProjectLayout

      public PythonProjectLayout()
  • Method Details

    • isPythonProject

      public static boolean isPythonProject(File projectDir)
      Checks whether the provided directory is a Python project.
      • Looks for pyproject.toml, setup.py, or setup.cfg.
      • Checks for requirements.txt, Pipfile, or typical virtual environment directories.
      • Examines Python file structures and project classifiers.
      Parameters:
      projectDir - Directory to examine for Python project indicators
      Returns:
      true if a Python project is detected, false otherwise
    • getSources

      public List<String> getSources()
      Gets list of source directories for the Python project.
      Specified by:
      getSources in class ProjectLayout
      Returns:
      empty list; not currently implemented
    • getDocuments

      public List<String> getDocuments()
      Gets list of document directories for the Python project.
      Specified by:
      getDocuments in class ProjectLayout
      Returns:
      empty list; not currently implemented
    • getTests

      public List<String> getTests()
      Gets list of test source directories for the Python project.
      Specified by:
      getTests in class ProjectLayout
      Returns:
      empty list; not currently implemented