pydmt.api package¶
Submodules¶
pydmt.api.builder module¶
- class pydmt.api.builder.Builder[source]¶
Bases:
ABC
A Builder is what really builds things in the system. A builder knows on which inputs it relies and what outputs it generates (sometimes before build and sometimes after).
- abstract build() None [source]¶
this method actually does the building Just do whatever you want here. Options are: - Write pure python code - Call native code - Call external programs - A combination of the above If there are any problems then throw an exception. Try not to segfault the interpreter in this method…:)
- get_signature() str [source]¶
return the sha1 of anything that identifies the sources of the build Techically this is the sha1 of the file content of the list of files returned from
get_sources()
- abstract get_sources() Sequence[Node] [source]¶
return the name of the source files for this builder If the builder takes a whole folder the list all the filers in that folder. If a built takes all the .py files in a folder then list those. In the current implementation this method is not really that important because it is not used to calculate the signature of the input to the build. The @get_signature method is use for that. In the future the get_signature method will go away.
- class pydmt.api.builder.Folder(folder: str)[source]¶
Bases:
Node
This is a node representing a single Folder
- class pydmt.api.builder.Node[source]¶
Bases:
ABC
This is a source object which knows how to add his checksum to a checksum calculation
pydmt.api.copy module¶
- class pydmt.api.copy.Copy(source: str, target: str)[source]¶
Bases:
OneSourceOneTarget
- build()[source]¶
this method actually does the building Just do whatever you want here. Options are: - Write pure python code - Call native code - Call external programs - A combination of the above If there are any problems then throw an exception. Try not to segfault the interpreter in this method…:)
pydmt.api.fail module¶
- class pydmt.api.fail.Fail(source: str, target: str)[source]¶
Bases:
OneSourceOneTarget
This is a builder that fails. Why do we need it? Tests Why does it need a source and target? Because otherwise it would not get triggered
- build()[source]¶
this method actually does the building Just do whatever you want here. Options are: - Write pure python code - Call native code - Call external programs - A combination of the above If there are any problems then throw an exception. Try not to segfault the interpreter in this method…:)
pydmt.api.feature module¶
- class pydmt.api.feature.Feature[source]¶
Bases:
ABC
A Feature is a piece of code that adds builder to a pydmt system in a predefined way. This is a way to share common practices between projects.
Examples of features can be: - all the rules about how to build a python module with documentation and release it. - all the rules about how to build a C project and release it.
These are similar to facets or natures in development environments.
pydmt.api.one_source_one_target module¶
- class pydmt.api.one_source_one_target.OneSourceOneTarget(source: str, target: str)[source]¶
Bases:
Builder
This is a builder which has one source file and one target file
- get_sources() Sequence[Node] [source]¶
return the name of the source files for this builder If the builder takes a whole folder the list all the filers in that folder. If a built takes all the .py files in a folder then list those. In the current implementation this method is not really that important because it is not used to calculate the signature of the input to the build. The @get_signature method is use for that. In the future the get_signature method will go away.