ci_mapping/run_pipeline.py
def open_access_journals(self):
        """Tag journals as open access based on a seed list."""
        # Connect to postgresql
        s = self._create_session()
        # Delete rows in OpenAccess
        s.query(OpenAccess).delete()
        s.commit()

        # Get journal names and IDs
        journal_access = [
            {"id": id, "open_access": self._is_open_access(journal_name)}
            for (id, journal_name) in s.query(Journal.id, Journal.journal_name)
            .distinct()
            .all()
        ]

        logger.info(f"{len(journal_access)}")

        # Store journal types
        s.bulk_insert_mappings(OpenAccess, journal_access)
        s.commit()

        self.next(self.affiliation_type)
Tag journals as open access based on a seed list.
Tag journals as open access based on a seed list.
Tag journals as open access based on a seed list .
def open_access_journals(self):
        s = self._create_session()
        s.query(OpenAccess).delete()
        s.commit()
        journal_access = [
            {"id": id, "open_access": self._is_open_access(journal_name)}
            for (id, journal_name) in s.query(Journal.id, Journal.journal_name)
            .distinct()
            .all()
        ]
        logger.info(f"{len(journal_access)}")
        s.bulk_insert_mappings(OpenAccess, journal_access)
        s.commit()
        self.next(self.affiliation_type)
def open_access_journals ( self ) : s = self . _create_session ( ) s . query ( OpenAccess ) . delete ( ) s . commit ( ) journal_access = [ { "id" : id , "open_access" : self . _is_open_access ( journal_name ) } for ( id , journal_name ) in s . query ( Journal . id , Journal . journal_name ) . distinct ( ) . all ( ) ] logger . info ( f"{len(journal_access)}" ) s . bulk_insert_mappings ( OpenAccess , journal_access ) s . commit ( ) self . next ( self . affiliation_type )
Tag journals as open access based on a seed list.
Tag journals as open access based on a seed list .
"""Tag journals as open access based on a seed list.""" # Connect to postgresql # Delete rows in OpenAccess # Get journal names and IDs # Store journal types
self