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
-
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
findDirectories, findFiles, getExcludeDirs, getModules, getParentId, getProjectDir, getProjectId, getProjectLayoutType, getProjectName, getRelativePath, getRelativePath, getRelativePath, projectDir
-
Constructor Details
-
PythonProjectLayout
public PythonProjectLayout()
-
-
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; not currently implemented
-
getDocuments
Gets list of document directories for the Python project.- Specified by:
getDocumentsin classProjectLayout- Returns:
- empty list; not currently implemented
-
getTests
Gets list of test source directories for the Python project.- Specified by:
getTestsin classProjectLayout- Returns:
- empty list; not currently implemented
-