Classes | |
class | _after |
class | _Groups |
class | _running |
class | _todo |
class | AlwaysRunner |
class | AtimesRunner |
class | Builder |
class | ExecutionError |
class | MultiprocessingModule |
class | PathError |
class | PickleJson |
class | Runner |
class | RunnerUnsupportedException |
class | SmartRunner |
class | StraceProcess |
class | StraceRunner |
Functions | |
def | printerr (message) |
def | args_to_list (args) |
def | shell (args, kwargs) |
def | _shell (args, input=None, silent=True, shell=False, ignore_status=False, kwargs) |
def | md5_hasher (filename) |
def | mtime_hasher (filename) |
def | _call_strace (self, args, kwargs) |
def | _results_handler (builder, delay=0.01) |
def | setup (builder=None, default=None, kwargs) |
def | _set_default_builder () |
def | run (args, kwargs) |
def | after (args) |
def | autoclean () |
def | memoize (command, kwargs) |
def | outofdate (command) |
def | parse_options (usage=_usage, extra_options=None, command_line=None) |
def | fabricate_version (min=None, max=None) |
def | main (globals_dict=None, build_dir=None, extra_options=None, builder=None, default=None, jobs=1, command_line=None, kwargs) |
Variables | |
string | __version__ = '1.29.3' |
int | deps_version = 2 |
multiprocessing | |
int | PY3 = 3 |
string_types = str | |
threading_condition = threading.Condition | |
list | __all__ |
int | FAT_atime_resolution = 24 |
int | FAT_mtime_resolution = 2 |
float | NTFS_atime_resolution = 0.0002048 |
float | NTFS_mtime_resolution = 0.0002048 |
md5func = hashlib.md5 | |
json | |
_pool = None | |
_groups = _Groups() | |
_results = None | |
_stop_results = threading.Event() | |
default_builder = None | |
string | default_command = 'build' |
_setup_builder = None | |
_setup_default = None | |
dictionary | _setup_kwargs = {} |
_parsed_options = None | |
string | _usage = '[options] build script functions to run' |
parser | |
options | |
args | |
int | status = 0 |
Build tool that finds dependencies automatically for any language. fabricate is a build tool that finds dependencies automatically for any language. It's small and just works. No hidden stuff behind your back. It was inspired by Bill McCloskey's make replacement, memoize, but fabricate works on Windows as well as Linux. Read more about how to use it and how it works on the project page: https://github.com/SimonAlfie/fabricate/ Like memoize, fabricate is released under a "New BSD license". fabricate is copyright (c) 2009 Brush Technology. Full text of the license is here: https://github.com/SimonAlfie/fabricate/wiki/License To get help on fabricate functions: from fabricate import * help(function)
|
private |
Top level function call for Strace that can be run in parallel
Definition at line 499 of file fabricate.py.
|
private |
Body of thread that stores results in .deps and handles 'after' conditions "builder" the builder used
Definition at line 917 of file fabricate.py.
References printerr(), submit_syst.str, and sum.
|
private |
Set default builder to Builder() instance if it's not yet set.
Definition at line 1399 of file fabricate.py.
Referenced by after(), autoclean(), memoize(), outofdate(), and run().
|
private |
Definition at line 176 of file fabricate.py.
References args_to_list().
Referenced by shell().
def fabricate.after | ( | args | ) |
wait until after the specified command groups complete and return results, or None if not parallel
Definition at line 1416 of file fabricate.py.
References _set_default_builder().
Referenced by CopyPred(), ana::CovMxSurface.CovMxSurface(), DecorrelateFD(), and main().
def fabricate.args_to_list | ( | args | ) |
Return a flat list of the given arguments for shell().
Definition at line 129 of file fabricate.py.
Referenced by fabricate.Builder._run(), _shell(), and fabricate.Builder.memoize().
def fabricate.autoclean | ( | ) |
Automatically delete all outputs of the default build.
Definition at line 1442 of file fabricate.py.
References _set_default_builder().
Referenced by build_template.clean(), and build_test.clean().
def fabricate.fabricate_version | ( | min = None , |
|
max = None |
|||
) |
If min is given, assert that the running fabricate is at least that version or exit with an error message. If max is given, assert that the running fabricate is at most that version. Return the current fabricate version string. This function was introduced in v1.14; for prior versions, the version string is available only as module local string fabricate.__version__
Definition at line 1495 of file fabricate.py.
References check_time_usage.float, and main().
def fabricate.main | ( | globals_dict = None , |
|
build_dir = None , |
|||
extra_options = None , |
|||
builder = None , |
|||
default = None , |
|||
jobs = 1 , |
|||
command_line = None , |
|||
kwargs | |||
) |
Run the default function or the function(s) named in the command line arguments. Call this at the end of your build script. If one of the functions returns nonzero, main will exit with the last nonzero return value as its status code. "builder" is the class of builder to create, default (None) is the normal builder "command_line" is an optional list of command line arguments that can be used to prevent the default parsing of sys.argv. Used to intercept and modify the command line passed to the build script. "default" is the default user script function to call, None = 'build' "extra_options" is an optional list of options created with optparse.make_option(). The pseudo-global variable main.options is set to the parsed options list. "kwargs" is any other keyword arguments to pass to the builder
Definition at line 1514 of file fabricate.py.
References after(), makeTrainCVSamples.int, parse_options(), print, printerr(), and split().
Referenced by fabricate_version(), build_template.rebuild(), build_test.rebuild(), and validation.recovalidate().
def fabricate.md5_hasher | ( | filename | ) |
Return MD5 hash of given filename if it is a regular file or a symlink with a hashable target, or the MD5 hash of the target_filename if it is a symlink without a hashable target, or the MD5 hash of the filename if it is a directory, or None if file doesn't exist. Note: Pyhton versions before 3.2 do not support os.readlink on Windows so symlinks without a hashable target fall back to a hash of the filename if the symlink target is a directory, or None if the symlink is broken
Definition at line 211 of file fabricate.py.
References md5func, and open().
def fabricate.memoize | ( | command, | |
kwargs | |||
) |
def fabricate.mtime_hasher | ( | filename | ) |
Return modification time of file, or None if file doesn't exist.
Definition at line 237 of file fabricate.py.
def fabricate.outofdate | ( | command | ) |
Return True if given command is out of date and needs to be run.
Definition at line 1453 of file fabricate.py.
References _set_default_builder().
def fabricate.parse_options | ( | usage = _usage , |
|
extra_options = None , |
|||
command_line = None |
|||
) |
Parse command line options and return (parser, options, args).
Definition at line 1464 of file fabricate.py.
Referenced by main().
def fabricate.printerr | ( | message | ) |
Print given message to stderr with a line feed.
Definition at line 118 of file fabricate.py.
References print.
Referenced by fabricate.StraceRunner._match_line(), _results_handler(), main(), and fabricate.Builder.read_deps().
def fabricate.run | ( | args, | |
kwargs | |||
) |
Run the given command, but only if its dependencies have changed. Uses the default Builder. Return value as per Builder.run(). If there is only one positional argument which is an iterable treat each element as a command, returns a list of returns from Builder.run().
Definition at line 1405 of file fabricate.py.
References _set_default_builder().
def fabricate.setup | ( | builder = None , |
|
default = None , |
|||
kwargs | |||
) |
NOTE: setup functionality is now in main(), setup() is kept for backward compatibility and should not be used in new scripts. Setup the default Builder (or an instance of given builder if "builder" is not None) with the same keyword arguments as for Builder(). "default" is the name of the default function to run when the build script is run with no command line arguments.
Definition at line 1385 of file fabricate.py.
def fabricate.shell | ( | args, | |
kwargs | |||
) |
Definition at line 143 of file fabricate.py.
References _shell().
Referenced by fabricate.AtimesRunner.__call__(), and fabricate.StraceRunner._do_strace().
|
private |
Definition at line 67 of file fabricate.py.
|
private |
Definition at line 26 of file fabricate.py.
|
private |
Definition at line 904 of file fabricate.py.
|
private |
Definition at line 1459 of file fabricate.py.
|
private |
Definition at line 902 of file fabricate.py.
|
private |
Definition at line 906 of file fabricate.py.
|
private |
Definition at line 1381 of file fabricate.py.
|
private |
Definition at line 1382 of file fabricate.py.
|
private |
Definition at line 1383 of file fabricate.py.
|
private |
Definition at line 907 of file fabricate.py.
Definition at line 1462 of file fabricate.py.
fabricate.args |
Definition at line 1612 of file fabricate.py.
fabricate.default_builder = None |
Definition at line 1377 of file fabricate.py.
string fabricate.default_command = 'build' |
Definition at line 1378 of file fabricate.py.
int fabricate.deps_version = 2 |
Definition at line 29 of file fabricate.py.
int fabricate.FAT_atime_resolution = 24 |
Definition at line 79 of file fabricate.py.
int fabricate.FAT_mtime_resolution = 2 |
Definition at line 80 of file fabricate.py.
fabricate.json |
Definition at line 116 of file fabricate.py.
Referenced by samweb_client.admin.getAvailableValues(), samweb_client.admin.listDataDisks(), samweb_client.admin.listParameters(), samweb_client.admin.listValues(), and samweb_client.projects.projectSummary().
fabricate.md5func = hashlib.md5 |
Definition at line 97 of file fabricate.py.
Referenced by md5_hasher().
fabricate.multiprocessing |
Definition at line 51 of file fabricate.py.
float fabricate.NTFS_atime_resolution = 0.0002048 |
Definition at line 85 of file fabricate.py.
float fabricate.NTFS_mtime_resolution = 0.0002048 |
Definition at line 86 of file fabricate.py.
fabricate.options |
Definition at line 1612 of file fabricate.py.
Referenced by demo_nueNumuSysts(), demo_numuOnly(), demoFitContours(), demoFitSlices(), evd::PlotView.Draw(), fake_future_data(), futureSig_getNueNumuSyst(), goodness_of_fit(), tensorflow::TFHandler.Initialize(), joint_fit_2017_contours(), joint_fit_2017_slices(), joint_fit_2018_contours(), joint_fit_2018_slices(), joint_fit_2019_bestfit(), joint_fit_2019_contours(), joint_fit_2019_slices(), joint_fit_future_bestfit_univ(), joint_fit_future_contour_univ(), make_fc_surfaces_2020(), make_fc_surfaces_2020_validation(), median_contours(), nuebar_signif(), plot_joint_fit_2020_contours(), plot_joint_fit_2020_slices(), reach_2018_dCPfractions(), run_joint_fit_2020_bestfit(), run_joint_fit_2020_contours(), run_joint_fit_2020_slices(), Tutorial2019Fit(), Tutorial2019FitContours(), and Tutorial2019FitSlices().
fabricate.parser |
Definition at line 1612 of file fabricate.py.
int fabricate.PY3 = 3 |
Definition at line 54 of file fabricate.py.
int fabricate.status = 0 |
Definition at line 1613 of file fabricate.py.
Referenced by dbutils::daqconfig::BNEVBRunConfig._fetchAllData(), dbutils::daqconfig::DCMConnectConfig._fetchAllData(), dbutils::daqconfig::DCMRunConfig._fetchAllData(), dbutils::daqconfig::DLRunConfig._fetchAllData(), dbutils::daqconfig::DCMHardwareConfig._fetchAllData(), dbutils::daqconfig::DCMHardwareConfig._fetchNamedConfigList(), dbutils::gui::ConfigDataTreeModel._populateSubTree(), dbutils::gui::ConfigDataTreeEditor.addChildRow(), dbutils::gui::ConfigDataTreeModel.addChildRow(), dbutils::gui::CustomTabWidget.addInitialRow(), dbutils::gui::TabbedSetOfTableEditors.addInitialRow(), dbutils::gui::TabbedSetOfTreeEditors.addInitialRow(), dbutils::gui::ConfigDataTableModel.addInitialRow(), dbutils::gui::ConfigDataTreeEditor.addRowAfter(), dbutils::gui::ConfigDataTableModel.addRowAfter(), dbutils::gui::ConfigDataTreeEditor.addRowBefore(), tbana::DetectorRateShutOff.analyze(), dbutils::dcs::APDSettings.APDSettings(), dbutils::daqconfig::BNEVBRunConfig.BNEVBRunConfig(), bsim.calcLocationWeights(), caf::Proxy< caf::SRNuGenParticle >.CheckEquals(), flat::Flat< caf::SRNuGenParticle >.Clear(), gov::fnal::cd::rms::provider::DPSingleton.connect_participant(), dbutils::daqconfig::DDTConnectConfig.DDTConnectConfig(), dbutils::gui::ConfigDataTableModel.deleteRow(), dbutils::daqconfig::DLRunConfig.DLRunConfig(), evd::GeometryDrawer.DrawBadBoxesPretty(), art::productstatus.dropped(), genie::FermiMover.Emit2ndNucleonFromSRC(), util.EnvExpansion(), gibuu::GiBUURegen.ExpandLibraryPath(), flat::Flat< caf::SRNuGenParticle >.Fill(), FindhAFate(), genie::flux::GAstroFlux.GenerateNext(), dbutils::gui::DCSConfigEditorDisplay.generateRecipeScripts(), novadaq::ProcessUtils.getChildProcessIds(), novadaq::ProcessUtils.getDescendantProcessIds(), gov::fnal::cd::rms::provider.getErrorName(), dbutils::dcs::APDSettings.getTemperature(), genie::KNOHadronization.HandleDecays(), tensorflow::TFHandler.Initialize(), dbutils::gui::ConfigDataTableModel.insertRows(), dbutils::gui::ConfigDataTreeModel.insertRows(), load_libs_from_command(), dbutils::gui::CustomTabWidget.loadData(), dbutils::gui::TabbedSetOfTableEditors.loadData(), dbutils::gui::TabbedSetOfTreeEditors.loadData(), loadlibs(), genie::FermiMomentumTablePool.LoadTables(), dbutils::daqconfig::NamedConfigUtils.markConfigDone(), dbutils::daqconfig::NDMRunConfig.NDMRunConfig(), art::productstatus.neverCreated(), NewNearlinePlots(), genie::utils::fragmrec.NParticles(), caf::Proxy< caf::SRNuGenParticle >.operator=(), dbutils::daqconfig::PixelEnableMasks.PixelEnableMasks(), dbutils::daqconfig::PixelThresholds.PixelThresholds(), tensorflow::TFHandler.Predict(), tensorflow::TensorflowHandler.Predict(), art::productstatus.present(), genie::TuneId.Print(), art::Path.process(), gov::fnal::cd::rms::provider::DDSTopicReaderClass< TT_ >.receiveMessage(), gov::fnal::cd::rms::provider::DDSConnection.receiveMessage(), dbutils::gui::ConfigDataTableModel.removeRows(), dbutils::gui::ConfigDataTreeModel.removeRows(), lem::LEMMixer.respondToOpenInputFile(), novadaq::BackgroundProcess.run(), dbutils::gui::CustomTabWidget.saveChanges(), dbutils::gui::TabbedSetOfTableEditors.saveChanges(), dbutils::gui::TabbedSetOfTreeEditors.saveChanges(), dbutils::gui::BasicEditorDisplay.saveChanges(), dbutils::gui::BasicEditorDisplay.saveChangesWithNewName(), set_eventn_status_track(), set_eventn_status_vertex(), art::ProductProvenance.setStatus(), gov::fnal::cd::rms::provider::DDSTopicReaderClass< TT_ >.statusConditionHandler(), novadaq::BackgroundProcess.stop(), nutools::dbi::Table.Tag(), nova::dbi::Table.Tag(), gov::fnal::cd::rms::provider::DDSTopicReaderClass< TT_ >.take_timed_wait(), art::productstatus.uninitialized(), art::productstatus.unknown(), genie::GMCJMonitor.Update(), wildcard(), ana.Wildcard(), novadaq::LocationUtils.wordExpansion(), gov::fnal::cd::rms::provider::DDSTopicWriterClass< TT_ >.write(), nutools::dbi::Table.Write(), nova::dbi::Table.Write(), genie::utils::app_init.XSecTable(), and dbutils::gui::BasicEditorDisplay.~BasicEditorDisplay().
fabricate.string_types = str |
Definition at line 56 of file fabricate.py.
fabricate.threading_condition = threading.Condition |
Definition at line 57 of file fabricate.py.