How to use the hepcrawl.utils.strict_kwargs function in hepcrawl

To help you get started, we’ve selected a few hepcrawl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github inspirehep / hepcrawl / hepcrawl / spiders / phenix_spider.py View on Github external
    @strict_kwargs
    def __init__(self, source_file=None, *args, **kwargs):
        """Construct PHENIX spider"""
        super(PhenixSpider, self).__init__(*args, **kwargs)
        self.source_file = source_file
github inspirehep / hepcrawl / hepcrawl / spiders / arxiv_spider.py View on Github external
    @strict_kwargs
    def __init__(
            self,
            url='http://export.arxiv.org/oai2',
            format='arXiv',
            sets=None,
            from_date=None,
            until_date=None,
            **kwargs
    ):
        super(ArxivSpider, self).__init__(
            url=url,
            format=format,
            sets=sets,
            from_date=from_date,
            until_date=until_date,
            **kwargs
github inspirehep / hepcrawl / hepcrawl / spiders / aps_spider.py View on Github external
    @strict_kwargs
    def __init__(self, from_date=None, until_date=None,
                 date="published", sets=None, per_page=100,
                 **kwargs):
        """Construct APS spider."""
        super(APSSpider, self).__init__(**kwargs)
        self.set = sets
        self.from_date = from_date
        self.until_date = until_date
        self.per_page = per_page
        self.date = date
github inspirehep / hepcrawl / hepcrawl / spiders / infn_spider.py View on Github external
    @strict_kwargs
    def __init__(self, source_file=None, year=today, *args, **kwargs):
        """Construct INFN spider"""
        super(InfnSpider, self).__init__(*args, **kwargs)
        self.source_file = source_file
        self.year = year
github inspirehep / hepcrawl / hepcrawl / spiders / desy_spider.py View on Github external
    @strict_kwargs
    def __init__(
        self,
        source_folder=None,
        ftp_folder='/DESY',
        ftp_host=None,
        ftp_netrc=None,
        destination_folder='/tmp/DESY',
        *args,
        **kwargs
    ):
        super(DesySpider, self).__init__(*args, **kwargs)
        self.ftp_folder = ftp_folder
        self.ftp_host = ftp_host
        self.ftp_netrc = ftp_netrc
        self.source_folder = source_folder
        self.destination_folder = destination_folder
github inspirehep / hepcrawl / hepcrawl / spiders / phil_spider.py View on Github external
    @strict_kwargs
    def __init__(self, source_file=None, *args, **kwargs):
        """Construct Phil spider."""
        super(PhilSpider, self).__init__(*args, **kwargs)
        self.source_file = source_file
github inspirehep / hepcrawl / hepcrawl / spiders / crossref_spider.py View on Github external
    @strict_kwargs
    def __init__(self, doi, url='https://api.crossref.org/works/',
                 **kwargs):
        """Construct Crossref spider."""
        super(CrossrefSpider, self).__init__(**kwargs)
        #if not doi:
        #	raise ValueError("No argument DOI given")
        self.url = url + doi
github inspirehep / hepcrawl / hepcrawl / spiders / wsp_spider.py View on Github external
    @strict_kwargs
    def __init__(
        self,
        local_package_dir=None,
        ftp_folder="WSP",
        ftp_host=None,
        ftp_netrc=None,
        destination_folder='/tmp/WSP',
        *args,
        **kwargs
    ):
        """Construct WSP spider."""
        super(WorldScientificSpider, self).__init__(*args, **kwargs)
        self.ftp_folder = ftp_folder
        self.ftp_host = ftp_host
        self.ftp_netrc = ftp_netrc
        self.destination_folder = (
github inspirehep / hepcrawl / hepcrawl / spiders / dnb_spider.py View on Github external
    @strict_kwargs
    def __init__(self, source_file=None, *args, **kwargs):
        """Construct DNB spider."""
        super(DNBSpider, self).__init__(*args, **kwargs)
        self.source_file = source_file
github inspirehep / hepcrawl / hepcrawl / spiders / alpha_spider.py View on Github external
    @strict_kwargs
    def __init__(self, source_file=None, *args, **kwargs):
        """Construct Alpha spider"""
        super(AlphaSpider, self).__init__(*args, **kwargs)
        self.source_file = source_file