Compare commits
No commits in common. "6384d326c1a720918e8505a29864765c418fc27b" and "95635013270ff363a27d8013f8e0b8e6454a3fa1" have entirely different histories.
6384d326c1
...
9563501327
10
nhf/build.py
10
nhf/build.py
|
@ -214,7 +214,7 @@ class Submodel:
|
||||||
def write_to(self, obj, path: str):
|
def write_to(self, obj, path: str):
|
||||||
x = self._method(obj)
|
x = self._method(obj)
|
||||||
assert isinstance(x, Model), f"Unexpected type: {type(x)}"
|
assert isinstance(x, Model), f"Unexpected type: {type(x)}"
|
||||||
x.build_all(path, prefix=False)
|
x.build_all(path)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def methods(cls, subject):
|
def methods(cls, subject):
|
||||||
|
@ -271,17 +271,11 @@ class Model:
|
||||||
total += 1
|
total += 1
|
||||||
return total
|
return total
|
||||||
|
|
||||||
def build_all(
|
def build_all(self, output_dir: Union[Path, str] = "build", verbose=1):
|
||||||
self,
|
|
||||||
output_dir: Union[Path, str] = "build",
|
|
||||||
prefix: bool = True,
|
|
||||||
verbose=1):
|
|
||||||
"""
|
"""
|
||||||
Build all targets in this model and write the results to file
|
Build all targets in this model and write the results to file
|
||||||
"""
|
"""
|
||||||
output_dir = Path(output_dir)
|
output_dir = Path(output_dir)
|
||||||
if prefix:
|
|
||||||
output_dir = output_dir / self.name
|
|
||||||
targets = Target.methods(self)
|
targets = Target.methods(self)
|
||||||
for t in targets.values():
|
for t in targets.values():
|
||||||
file_name = t.file_name
|
file_name = t.file_name
|
||||||
|
|
Loading…
Reference in New Issue