mypythontools_cicd.project_paths package¶
Subpackage where you can get paths used in your project (path to README, __init__.py etc.) or configure paths to be able other modules here in mypythontools_cicd with PROJECT_PATHS.
- class mypythontools_cicd.project_paths.ProjectPaths[source]¶
Bases:
object
Define paths for usual python projects like root path, docs path, init path etc.
You can find paths, that are lazy evaluated only after you ask for them. They are inferred automatically, but if you have alternative structure, you can also set it. Getters return path objects, so it’s posix.
Note
If you use paths in sys.path.insert or as subprocess main parameter, do not forget to convert it to string with as_posix().
- property app: Path¶
Folder where python scripts are and __init__.py.
- Type
Path
- Default
__App_path
- property docs: Path¶
Where documentation is stored. Usually root / docs.
‘doc’, ‘Doc’, ‘Docs’, ‘DOC’, ‘DOCS’ also inferred if on root.
- Type
Path
- Default
root_path/docs
- property readme: Path¶
Return README path whether it’s capitalized or not.
‘Readme.md’, ‘readme.md’, and rst extension also inferred if on root.
- Type
Path
- Default
root_path/README.md
- property root: Path¶
Path where all project is (docs, tests…). Root is usually current working directory.
- Type
Path
- Default
Path.cwd()
- property tests: Path¶
Folder where tests are stored. Usually root / tests.
‘test’, ‘Test’, ‘Tests’, ‘TEST’, ‘TESTS’ also inferred if on root.
- Type
Path
- Default
root_path/tests