Skip to content
Snippets Groups Projects
Select Git revision
  • c35bf9cbdde3386f4377b27e8737e32b27f13a55
  • master default protected
  • L2SS-1914-fix_job_dispatch
  • TMSS-3170
  • TMSS-3167
  • TMSS-3161
  • TMSS-3158-Front-End-Only-Allow-Changing-Again
  • TMSS-3133
  • TMSS-3319-Fix-Templates
  • test-fix-deploy
  • TMSS-3134
  • TMSS-2872
  • defer-state
  • add-custom-monitoring-points
  • TMSS-3101-Front-End-Only
  • TMSS-984-choices
  • SDC-1400-Front-End-Only
  • TMSS-3079-PII
  • TMSS-2936
  • check-for-max-244-subbands
  • TMSS-2927---Front-End-Only-PXII
  • Before-Remove-TMSS
  • LOFAR-Release-4_4_318 protected
  • LOFAR-Release-4_4_317 protected
  • LOFAR-Release-4_4_316 protected
  • LOFAR-Release-4_4_315 protected
  • LOFAR-Release-4_4_314 protected
  • LOFAR-Release-4_4_313 protected
  • LOFAR-Release-4_4_312 protected
  • LOFAR-Release-4_4_311 protected
  • LOFAR-Release-4_4_310 protected
  • LOFAR-Release-4_4_309 protected
  • LOFAR-Release-4_4_308 protected
  • LOFAR-Release-4_4_307 protected
  • LOFAR-Release-4_4_306 protected
  • LOFAR-Release-4_4_304 protected
  • LOFAR-Release-4_4_303 protected
  • LOFAR-Release-4_4_302 protected
  • LOFAR-Release-4_4_301 protected
  • LOFAR-Release-4_4_300 protected
  • LOFAR-Release-4_4_299 protected
41 results

fakedata.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    repo_processing.py 1.04 KiB
    from neo4j import Driver
    from graph_creation.cwl_parsing import get_cwl_from_repo
    from graph_creation.cwl_processing import process_cwl_inputs, process_cwl_outputs, process_cwl_steps
    from neo4j_queries.node_queries import ensure_component_node
    
    def process_repos(repo_list: list[str], driver: Driver) -> None:
        """
        Given a list of paths to local repositories and a Neo4j driver,
        the function parses the CWL files and turns them into a Neo4j dependency graph.
    
        Parameters:
        repo_list (list[str]): a list of paths to local repositories
        driver (Driver): a Neo4j driver
        """
        cwl_entities = {}
        for repo in repo_list:
            # Parse CWL files
            cwl_entities[repo]= get_cwl_from_repo(repo)
            for entity in cwl_entities[repo]:
                component_id = entity['path']
                ensure_component_node(driver, component_id)
                process_cwl_inputs(driver, entity)
                process_cwl_outputs(driver, entity)
                if entity['class'] == 'Workflow':
                    process_cwl_steps(driver, entity, repo)