Class PythonProjectLayout
java.lang.Object
org.machanism.machai.project.layout.ProjectLayout
org.machanism.machai.project.layout.PythonProjectLayout
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringConventional Python project descriptor used for project detection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets list of document directories for the Python project.Gets list of source directories for the Python project.getTests()Gets list of test source directories for the Python project.static booleanisPythonProject(File projectDir) Checks whether the provided directory is a Python project.Methods inherited from class org.machanism.machai.project.layout.ProjectLayout
getExcludeDirs, getModules, getParentId, getProjectDir, getProjectId, getProjectLayoutType, getProjectName, getRelativePath, getRelativePath, getRelativePath, getTempDir, isExcludedPath, listDirectories, listFiles, projectDir
-
Field Details
-
PROJECT_MODEL_FILE_NAME
Conventional Python project descriptor used for project detection.- See Also:
-
-
Constructor Details
-
PythonProjectLayout
public PythonProjectLayout()Creates a Python project layout instance.
-
-
Method Details
-
isPythonProject
Checks whether the provided directory is a Python project.- Looks for
pyproject.toml,setup.py, orsetup.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:
trueif a Python project is detected,falseotherwise
- Looks for
-
getSources
Gets list of source directories for the Python project.- Specified by:
getSourcesin classProjectLayout- Returns:
- empty list; intentionally returns a safe default until Python source discovery is implemented
-
getDocuments
Gets list of document directories for the Python project.- Specified by:
getDocumentsin classProjectLayout- Returns:
- empty list; intentionally returns a safe default until Python documentation discovery is implemented
-
getTests
Gets list of test source directories for the Python project.- Specified by:
getTestsin classProjectLayout- Returns:
- empty list; intentionally returns a safe default until Python test discovery is implemented
-