code stringlengths 1 18.2k |
|---|
def execute(self): """Convert the notebook to a python script and execute it, returning the local context as a dict""" from nbformat import read from nbconvert.exporters import export_script from cStringIO import StringIO notebook = read(StringIO(self.record.unpacked_contents), 4) script, resources = export_script(note... |
def record_to_fs(self): """Create a filesystem file from a File""" fr = self.record if fr.contents: with self._fs.open(self.file_name, 'w', encoding='utf-8') as f: self.record_to_fh(f) |
def import_module(self, module_path = 'ambry.build', **kwargs): """ Import the contents of the file into the ambry.build module :param kwargs: items to add to the module globals :return: """ from fs.errors import NoSysPathError if module_path in sys.modules: module = sys.modules[module_path] else: module = imp.new_modu... |
def import_bundle(self): """Add the filesystem to the Python sys path with an import hook, then import to file as Python""" from fs.errors import NoSysPathError try: import ambry.build module = sys.modules['ambry.build'] except ImportError: module = imp.new_module('ambry.build') sys.modules['ambry.build'] = module bf =... |
def import_lib(self): """Import the lib.py file into the bundle module""" try: import ambry.build module = sys.modules['ambry.build'] except ImportError: module = imp.new_module('ambry.build') sys.modules['ambry.build'] = module bf = self.record if not bf.has_contents: return try: exec (compile(bf.contents, self.path, ... |
def record_to_objects(self): """Create config records to match the file metadata""" from ambry.orm.exc import NotFoundError fr = self.record contents = fr.unpacked_contents if not contents: return # Zip transposes an array when in the form of a list of lists, so this transposes so # each row starts with the heading and... |
if 'order' in d: d['stage'] = d['order'] del d['order'] if 'dest_table' in d: d['dest_table_name'] = d['dest_table'] del d['dest_table'] if 'source_table' in d: d['source_table_name'] = d['source_table'] del d['source_table'] d['d_vid'] = self._dataset.vid d['state'] = 'synced' try: ds = self._dataset.source_file(str(d... |
def record_to_objects(self): """Create config records to match the file metadata""" from ambry.orm import Column, Table, Dataset def _clean_int(i): if i is None: return None elif isinstance(i, int): return i elif isinstance(i, string_types): if len(i) == 0: return None return int(i.strip()) bsfile = self.record content... |
continue if not row.get('column', False): raise ConfigurationError('Row error: no column on line {}'.format(line_no)) if not row.get('table', False): raise ConfigurationError('Row error: no table on line {}'.format(line_no)) if not row.get('datatype', False) and not row.get('valuetype', False): raise ConfigurationError... |
still some old data types hanging around data_type = old_types_map.get(data_type.lower(), data_type) table_name = row['table'] try: table = extant_tables[table_name] except KeyError: table = self._dataset.new_table( table_name, sequence_id=table_number, description=row.get('description') if row['column'] == 'id' else '... |
def record_to_objects(self): """Write from the stored file data to the source records""" from ambry.orm import SourceTable bsfile = self.record failures = set() # Clear out all of the columns from existing tables. We don't clear out the # tables, since they may be referenced by sources for row in bsfile.dict_row_reader... |
def execute(self): """ Executes all sql statements from bundle.sql. """ from ambry.mprlib import execute_sql execute_sql(self._bundle.library, self.record_content) |
def list_records(self, file_const=None): """Iterate through the file records""" for r in self._dataset.files: if file_const and r.minor_type != file_const: continue yield self.instance_from_name(r.path) |
def record_to_objects(self, preference=None): """Create objects from files, or merge the files into the objects. """ from ambry.orm.file import File for f in self.list_records(): pref = preference if preference else f.record.preference if pref == File.PREFERENCE.FILE: self._bundle.logger.debug(' Cleaning objects for fi... |
def objects_to_record(self, preference=None): """Create file records from objects. """ from ambry.orm.file import File raise NotImplementedError("Still uses obsolete file_info_map") for file_const, (file_name, clz) in iteritems(file_info_map): f = self.file(file_const) pref = preference if preference else f.record.pref... |
def set_defaults(self): """Add default content to any file record that is empty""" for const_name, c in file_classes.items(): if c.multiplicity == '1': f = self.file(const_name) if not f.record.unpacked_contents: f.setcontent(f.default) |
def run(host='127.0.0.1', port=8000): """ Run web server. """ print("Server running on {}:{}".format(host, port)) app_router = Router() server = make_server(host, port, app_router) server.serve_forever() |
def main(args=None): """ Create a private key and a certificate and write them to a file. """ if args is None: args = sys.argv[1:] o = Options() try: o.parseOptions(args) except usage.UsageError, e: raise SystemExit(str(e)) else: return createSSLCertificate(o) |
def update(self, f): """Copy another files properties into this one.""" for p in self.__mapper__.attrs: if p.key == 'oid': continue try: setattr(self, p.key, getattr(f, p.key)) except AttributeError: # The dict() method copies data property values into the main dict, # and these don't have associated class properties. ... |
def resetTimeout(self): """Reset the timeout count down""" if self.__timeoutCall is not None and self.timeOut is not None: self.__timeoutCall.reset(self.timeOut) |
def setTimeout(self, period): """Change the timeout period @type period: C{int} or C{NoneType} @param period: The period, in seconds, to change the timeout to, or C{None} to disable the timeout. """ prev = self.timeOut self.timeOut = period if self.__timeoutCall is not None: if period is None: self.__timeoutCall.cancel... |
def _load_controllers(self): """ Load all controllers from folder 'controllers'. Ignore files with leading underscore (for example: controllers/_blogs.py) """ for file_name in os.listdir(os.path.join(self._project_dir, 'controllers')): # ignore disabled controllers if not file_name.startswith('_'): module_name = file_n... |
def _init_view(self): """ Initialize View with project settings. """ views_engine = get_config('rails.views.engine', 'jinja') templates_dir = os.path.join(self._project_dir, "views", "templates") self._view = View(views_engine, templates_dir) |
def get_action_handler(self, controller_name, action_name): """ Return action of controller as callable. If requested controller isn't found - return 'not_found' action of requested controller or Index controller. """ try_actions = [ controller_name + '/' + action_name, controller_name + '/not_found', # call Index cont... |
def command_start(self, daemonize=False): ''' Start a server:: ./manage.py flup:start [--daemonize] ''' if daemonize: safe_makedirs(self.logfile, self.pidfile) flup_fastcgi(self.app, bind=self.bind, pidfile=self.pidfile, logfile=self.logfile, daemonize=daemonize, cwd=self.cwd, umask=self.umask, **self.fastcgi_params) |
def command_stop(self): ''' Stop a server:: ./manage.py flup:stop ''' if self.pidfile: if not os.path.exists(self.pidfile): sys.exit("Pidfile {!r} doesn't exist".format(self.pidfile)) with open(self.pidfile) as pidfile: pid = int(pidfile.read()) for sig in [signal.SIGINT, signal.SIGTERM, signal.SIGKILL]: try: if termin... |
def _preprocess_sqlite_view(asql_query, library, backend, connection): """ Finds view or materialized view in the asql query and converts it to create table/insert rows. Note: Assume virtual tables for all partitions already created. Args: asql_query (str): asql query library (ambry.Library): backend (SQLiteBackend): c... |
instance. alias_to_partition_map = {} # key is alias of ref found in the query, value is Partition instance. # collect sources from select statement of the view. for source in view.sources: partition = library.partition(source.name) ref_to_partition_map[source.name] = partition if source.alias: alias_to_partition_map[s... |
source_alias: partition = alias_to_partition_map[source_alias] for part_column in partition.datafile.reader.columns: if part_column['name'] == column_name: sqlite_type = TYPE_MAP.get(part_column['type']) if not sqlite_type: raise Exception( 'Do not know how to convert {} to sql column.' .format(column['type'])) column_... |
{}' .format(asql_query, new_query)) return new_query or asql_query |
def _preprocess_sqlite_index(asql_query, library, backend, connection): """ Creates materialized view for each indexed partition found in the query. Args: asql_query (str): asql query library (ambry.Library): backend (SQLiteBackend): connection (apsw.Connection): Returns: str: converted asql if it contains index query.... |
def install(self, connection, partition, table_name = None, index_columns=None, materialize=False, logger = None): """ Creates virtual table or read-only table for gion. Args: ref (str): id, vid, name or versioned name of the partition. materialize (boolean): if True, create read-only table. If False create virtual tab... |
view: {}, query: {}' .format(partition.name, table, create_query)) cursor.execute(create_query) # populate just created table with data from virtual table. copy_query = '''INSERT INTO {} SELECT * FROM {};'''.format(table, virtual_table) debug_logger.debug( 'Populating sqlite table with rows from partition mpr.' '\n par... |
def index(self, connection, partition, columns): """ Create an index on the columns. Args: connection (apsw.Connection): connection to sqlite database who stores mpr table or view. partition (orm.Partition): columns (list of str): """ import hashlib query_tmpl = ''' CREATE INDEX IF NOT EXISTS {index_name} ON {table_nam... |
def close(self): """ Closes connection to sqlite database. """ if getattr(self, '_connection', None): logger.debug('Closing sqlite connection.') self._connection.close() self._connection = None |
def _get_mpr_view(self, connection, table): """ Finds and returns view name in the sqlite db represented by given connection. Args: connection: connection to sqlite db where to look for partition table. table (orm.Table): Raises: MissingViewError: if database does not have partition table. Returns: str: database table ... |
def _get_mpr_table(self, connection, partition): """ Returns name of the sqlite table who stores mpr data. Args: connection (apsw.Connection): connection to sqlite database who stores mpr data. partition (orm.Partition): Returns: str: Raises: MissingTableError: if partition table not found in the db. """ # TODO: This i... |
virtual table logger.debug( 'Looking for a virtual table of the partition.\n partition: {}'.format(partition.name)) virtual_exists = self._relation_exists(connection, virtual_table) if virtual_exists: logger.debug( 'Virtual table of the partition found.\n partition: {}, table: {}' .format(partition.name, table)) return... |
def _relation_exists(self, connection, relation): """ Returns True if relation (table or view) exists in the sqlite db. Otherwise returns False. Args: connection (apsw.Connection): connection to sqlite database who stores mpr data. partition (orm.Partition): Returns: boolean: True if relation exists, False otherwise. "... |
def _get_create_query(partition, tablename, include=None): """ Creates and returns `CREATE TABLE ...` sql statement for given mprows. Args: partition (orm.Partition): tablename (str): name of the table in the return create query. include (list of str, optional): list of columns to include to query. Returns: str: create... |
def _get_connection(self): """ Returns connection to sqlite db. Returns: connection to the sqlite db who stores mpr data. """ if getattr(self, '_connection', None): logger.debug('Connection to sqlite db already exists. Using existing one.') else: dsn = self._dsn if dsn == 'sqlite://': dsn = ':memory:' else: dsn = dsn.r... |
def _add_partition(self, connection, partition): """ Creates sqlite virtual table for mpr file of the given partition. Args: connection: connection to the sqlite db who stores mpr data. partition (orm.Partition): """ logger.debug('Creating virtual table for partition.\n partition: {}'.format(partition.name)) sqlite_med... |
def _execute(self, connection, query, fetch=True): """ Executes given query using given connection. Args: connection (apsw.Connection): connection to the sqlite db who stores mpr data. query (str): sql query fetch (boolean, optional): if True, fetch query result and return it. If False, do not fetch. Returns: iterable ... |
def _log_disconnect(self): """ Decrement connection count """ if self.logged: self.server.stats.connectionClosed() self.logged = False |
def enable_cache(self): """ Enable client-side caching for the current request """ self.set_header('Cache-Control', 'max-age=%d, public' % self.CACHE_TIME) now = datetime.datetime.now() expires = now + datetime.timedelta(seconds=self.CACHE_TIME) self.set_header('Expires', expires.strftime('%a, %d %b %Y %H:%M:%S')) self... |
def list_milestones(page_size=200, page_index=0, q="", sort=""): """ List all ProductMilestones """ data = list_milestones_raw(page_size, page_index, sort, q) if data: return utils.format_json_list(data) |
def update_milestone(id, **kwargs): """ Update a ProductMilestone """ data = update_milestone_raw(id, **kwargs) if data: return utils.format_json(data) |
def close_milestone(id, **kwargs): """ Close a milestone. This triggers its release process. The user can optionally specify the release-date, otherwise today's date is used. If the wait parameter is specified and set to True, upon closing the milestone, we'll periodically check that the release being processed is done... |
def init_app(self, app): """ Find and configure the user database from specified file """ app.config.setdefault('FLASK_AUTH_ALL', False) app.config.setdefault('FLASK_AUTH_REALM', 'Login Required') # Default set to bad file to trigger IOError app.config.setdefault('FLASK_HTPASSWD_PATH', '/^^^/^^^') # Load up user databa... |
def check_basic_auth(self, username, password): """ This function is called to check if a username / password combination is valid via the htpasswd file. """ valid = self.users.check_password( username, password ) if not valid: log.warning('Invalid login from %s', username) valid = False return ( valid, username ) |
def get_hashhash(self, username): """ Generate a digest of the htpasswd hash """ return hashlib.sha256( self.users.get_hash(username) ).hexdigest() |
def generate_token(self, username): """ assumes user exists in htpasswd file. Return the token for the given user by signing a token of the username and a hash of the htpasswd string. """ serializer = self.get_signature() return serializer.dumps( { 'username': username, 'hashhash': self.get_hashhash(username) } ).decod... |
def check_token_auth(self, token): """ Check to see who this is and if their token gets them into the system. """ serializer = self.get_signature() try: data = serializer.loads(token) except BadSignature: log.warning('Received bad token signature') return False, None if data['username'] not in self.users.users(): log.w... |
def authenticate(self): """Authenticate user by any means and return either true or false. Args: Returns: tuple (is_valid, username): True is valid user, False if not """ basic_auth = request.authorization is_valid = False user = None if basic_auth: is_valid, user = self.check_basic_auth( basic_auth.username, basic_aut... |
def required(self, func): """ Decorator function with basic and token authentication handler """ @wraps(func) def decorated(*args, **kwargs): """ Actual wrapper to run the auth checks. """ is_valid, user = self.authenticate() if not is_valid: return self.auth_failed() kwargs['user'] = user return func(*args, **kwargs) ... |
def _dict(self, with_name=True): """Returns the identity as a dict. values that are empty are removed """ d = dict([(k, getattr(self, k)) for k, _, _ in self.name_parts]) if with_name: d['name'] = self.name try: d['vname'] = self.vname except ValueError: pass return self.clear_dict(d) |
def source_path(self): """The name in a form suitable for use in a filesystem. Excludes the revision """ # Need to do this to ensure the function produces the # bundle path when called from subclasses names = [k for k, _, _ in self._name_parts] parts = [self.source] if self.bspace: parts.append(self.bspace) parts.appen... |
def cache_key(self): """The name in a form suitable for use as a cache-key""" try: return self.path except TypeError: raise TypeError("self.path is invalild: '{}', '{}'".format(str(self.path), type(self.path))) |
def ver(self, revision): """Clone and change the version.""" c = self.clone() c.version = self._parse_version(self.version) return c |
def as_partition(self, **kwargs): """Return a PartitionName based on this name.""" return PartitionName(**dict(list(self.dict.items()) + list(kwargs.items()))) |
def promote(self, name): """Promote to a PartitionName by combining with a bundle Name.""" return PartitionName(**dict(list(name.dict.items()) + list(self.dict.items()))) |
def path(self): """The path of the bundle source. Includes the revision. """ # Need to do this to ensure the function produces the # bundle path when called from subclasses names = [k for k, _, _ in Name._name_parts] return os.path.join(self.source, self._path_join(names=names, excludes=['source', 'format'], sep=self.N... |
def sub_path(self): """The path of the partition source, excluding the bundle path parts. Includes the revision. """ try: return os.path.join(*(self._local_parts())) except TypeError as e: raise TypeError( "Path failed for partition {} : {}".format( self.name, e.message)) |
def partital_dict(self, with_name=True): """Returns the name as a dict, but with only the items that are particular to a PartitionName.""" d = self._dict(with_name=False) d = {k: d.get(k) for k, _, _ in PartialPartitionName._name_parts if d.get(k, False)} if 'format' in d and d['format'] == Name.DEFAULT_FORMAT: del d['... |
def _dict(self, with_name=True): """Returns the identity as a dict. values that are empty are removed """ d = dict([(k, getattr(self, k)) for k, _, _ in self.name_parts]) return self.clear_dict(d) |
def with_none(self): """Convert the NameQuery.NONE to None. This is needed because on the kwargs list, a None value means the field is not specified, which equates to ANY. The _find_orm() routine, however, is easier to write if the NONE value is actually None. Returns a clone of the origin, with NONE converted to None ... |
def name_parts(self): """Works with PartialNameMixin.clear_dict to set NONE and ANY values.""" default = PartialMixin.ANY np = ([(k, default, True) for k, _, _ in super(NameQuery, self).name_parts] + [(k, default, True) for k, _, _ in Name._generated_names] ) return np |
def name_parts(self): """Works with PartialNameMixin.clear_dict to set NONE and ANY values.""" default = PartialMixin.ANY return ([(k, default, True) for k, _, _ in PartitionName._name_parts] + [(k, default, True) for k, _, _ in Name._generated_names] ) |
def parse(cls, on_str, force_type=None): # @ReservedAssignment """Parse a string into one of the object number classes.""" on_str_orig = on_str if on_str is None: return None if not on_str: raise NotObjectNumberError("Got null input") if not isinstance(on_str, string_types): raise NotObjectNumberError("Must be a string... |
= None on_str = on_str[ds_lengths[0]:] if type_ == cls.TYPE.DATASET: return DatasetNumber(dataset, revision=revision, assignment_class=assignment_class) elif type_ == cls.TYPE.TABLE: table = int(ObjectNumber.base62_decode(on_str)) return TableNumber( DatasetNumber(dataset, assignment_class=assignment_class), table, rev... |
def base62_encode(cls, num): """Encode a number in Base X. `num`: The number to encode `alphabet`: The alphabet to use for encoding Stolen from: http://stackoverflow.com/a/1119769/1144479 """ alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" if num == 0: return alphabet[0] arr = [] base = len(... |
def base62_decode(cls, string): """Decode a Base X encoded string into the number. Arguments: - `string`: The encoded string - `alphabet`: The alphabet to use for encoding Stolen from: http://stackoverflow.com/a/1119769/1144479 """ alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" base = len(a... |
def increment(cls, v): """Increment the version number of an object number of object number string""" if not isinstance(v, ObjectNumber): v = ObjectNumber.parse(v) return v.rev(v.revision+1) |
def rev(self, i): """Return a clone with a different revision.""" on = copy(self) on.revision = i return on |
def from_hex(cls, h, space, assignment_class='self'): """Produce a TopNumber, with a length to match the given assignment class, based on an input hex string. This can be used to create TopNumbers from a hash of a string. """ from math import log # Use the ln(N)/ln(base) trick to find the right number of hext digits # ... |
def from_string(cls, s, space): """Produce a TopNumber by hashing a string.""" import hashlib hs = hashlib.sha1(s).hexdigest() return cls.from_hex(hs, space) |
def classify(cls, o): """Break an Identity name into parts, or describe the type of other forms. Break a name or object number into parts and classify them. Returns a named tuple that indicates which parts of input string are name components, object number and version number. Does not completely parse the name componen... |
o ip.name = None ip.isa = type(ip.on) ip.name_parts = None elif isinstance(o, Name): ip.on = None ip.isa = type(o) ip.name = str(o) ip.name_parts = ip.name.split(Name.NAME_PART_SEP) elif '/' in s: # A cache key ip.cache_key = s.strip() ip.isa = str elif cls.OBJECT_NUMBER_SEP in s: # Must be a fqname ip.name, on_s = s.s... |
aren't vnames you can query except ValueError: pass if ip.version: ip.name_parts.pop() ip.sname = Name.NAME_PART_SEP.join(ip.name_parts) else: ip.sname = ip.name return ip |
def to_meta(self, md5=None, file=None): """Return a dictionary of metadata, for use in the Remote api.""" # from collections import OrderedDict if not md5: if not file: raise ValueError('Must specify either file or md5') md5 = md5_for_file(file) size = os.stat(file).st_size else: size = None return { 'id': self.id_, 'i... |
def names_dict(self): """A dictionary with only the generated names, name, vname and fqname.""" INCLUDE_KEYS = ['name', 'vname', 'vid'] d = {k: v for k, v in iteritems(self.dict) if k in INCLUDE_KEYS} d['fqname'] = self.fqname return d |
def ident_dict(self): """A dictionary with only the items required to specify the identy, excluding the generated names, name, vname and fqname.""" SKIP_KEYS = ['name','vname','fqname','vid','cache_key'] return {k: v for k, v in iteritems(self.dict) if k not in SKIP_KEYS} |
def as_partition(self, partition=0, **kwargs): """Return a new PartitionIdentity based on this Identity. :param partition: Integer partition number for PartitionObjectNumber :param kwargs: """ assert isinstance(self._name, Name), "Wrong type: {}".format(type(self._name)) assert isinstance(self._on, DatasetNumber), "Wro... |
def add_partition(self, p): """Add a partition identity as a child of a dataset identity.""" if not self.partitions: self.partitions = {} self.partitions[p.vid] = p |
def add_file(self, f): """Add a partition identity as a child of a dataset identity.""" if not self.files: self.files = set() self.files.add(f) self.locations.set(f.type_) |
def partition(self): """Convenience function for accessing the first partition in the partitions list, when there is only one.""" if not self.partitions: return None if len(self.partitions) > 1: raise ValueError( "Can't use this method when there is more than one partition") return list(self.partitions.values())[0] |
def rev(self, rev): """Return a new identity with the given revision""" d = self.dict d['revision'] = rev return self.from_dict(d) |
def _info(self): """Returns an OrderedDict of information, for human display.""" d = OrderedDict() d['vid'] = self.vid d['sname'] = self.sname d['vname'] = self.vname return d |
def from_dict(cls, d): """Like Identity.from_dict, but will cast the class type based on the format. i.e. if the format is hdf, return an HdfPartitionIdentity. :param d: :return: """ name = PartitionIdentity._name_class(**d) if 'id' in d and 'revision' in d: # The vid should be constructed from the id and the revision ... |
def as_dataset(self): """Convert this identity to the identity of the corresponding dataset.""" on = self.on.dataset on.revision = self.on.revision name = Name(**self.name.dict) return Identity(name, on) |
def sleep(self): """Wait for the sleep time of the last response, to avoid being rate limited.""" if self.next_time and time.time() < self.next_time: time.sleep(self.next_time - time.time()) |
def root_sync(args, l, config): """Sync with the remote. For more options, use library sync """ from requests.exceptions import ConnectionError all_remote_names = [ r.short_name for r in l.remotes ] if args.all: remotes = all_remote_names else: remotes = args.refs prt("Sync with {} remotes or bundles ".format(len(remot... |
def _CaptureException(f, *args, **kwargs): """Decorator implementation for capturing exceptions.""" from ambry.dbexceptions import LoggedException b = args[0] # The 'self' argument try: return f(*args, **kwargs) except Exception as e: raise try: b.set_error_state() b.commit() except Exception as e2: b.log('Failed to se... |
def set_file_system(self, source_url=False, build_url=False): """Set the source file filesystem and/or build file system""" assert isinstance(source_url, string_types) or source_url is None or source_url is False assert isinstance(build_url, string_types) or build_url is False if source_url: self._source_url = source_u... |
def clear_file_systems(self): """Remove references to build and source file systems, reverting to the defaults""" self._source_url = None self.dataset.config.library.source.url = None self._source_fs = None self._build_url = None self.dataset.config.library.build.url = None self._build_fs = None self.dataset.commit() |
def cast_to_subclass(self): """ Load the bundle file from the database to get the derived bundle class, then return a new bundle built on that class :return: """ self.import_lib() self.load_requirements() try: self.commit() # To ensure the rollback() doesn't clear out anything important bsf = self.build_source_files.fi... |
def load_requirements(self): """If there are python library requirements set, append the python dir to the path.""" for module_name, pip_name in iteritems(self.metadata.requirements): extant = self.dataset.config.requirements[module_name].url force = (extant and extant != pip_name) self._library.install_packages(module... |
def dep(self, source_name): """Return a bundle dependency from the sources list :param source_name: Source name. The URL field must be a bundle or partition reference :return: """ from ambry.orm.exc import NotFoundError from ambry.dbexceptions import ConfigurationError source = self.source(source_name) ref = source.url... |
def documentation(self): """Return the documentation, from the documentation.md file, with template substitutions""" # Return the documentation as a scalar term, which has .text() and .html methods to do # metadata substitution using Jinja s = '' rc = self.build_source_files.documentation.record_content if rc: s += rc ... |
def progress(self): """Returned a cached ProcessLogger to record build progress """ if not self._progress: # If won't be building, only use one connection new_connection = False if self._library.read_only else True self._progress = ProcessLogger(self.dataset, self.logger, new_connection=new_connection) return self._pro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.