Skip to content

Commit

Permalink
global: uniform __future__ imports
Browse files Browse the repository at this point in the history
* Adds: uniform `__future__` imports.
* Adds: update copyright year.
* Removes: unused imports

Closes #103

Signed-off-by: Spiros Delviniotis <[email protected]>
  • Loading branch information
spirosdelviniotis committed May 11, 2017
1 parent 0c0fdf1 commit b3126a8
Show file tree
Hide file tree
Showing 88 changed files with 163 additions and 130 deletions.
2 changes: 1 addition & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
hepcrawl is free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License quoted below.

Copyright (c) 2015, 2016 CERN.
Copyright (c) 2015, 2016, 2017 CERN.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion RELEASE-NOTES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.deps.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016, 2017 CERN.
# Copyright (C) 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
unit:
image: hepcrawl_base
environment: *env_variables
command: bash -c "py.test tests/unit && sphinx-build -nNW docs docs/_build/html && python setup.py sdist && ls dist/*"
command: bash -c "py.test tests/unit -vv && sphinx-build -nNW docs docs/_build/html && python setup.py sdist && ls dist/*"
volumes: *common_volumes

doc:
Expand Down
11 changes: 10 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Makefile for Sphinx documentation
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

# Makefile for Sphinx documentation


# You can set these variables from the command line.
SPHINXOPTS =
Expand Down
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2016 CERN.
Copyright (C) 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/authors.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# HEPCrawl documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 2 13:24:46 2016.
# sphinx-quickstart on Thu Jun 2 13:24:46 2016 - 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/guide.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2016 CERN.
Copyright (C) 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ License
hepcrawl is free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License quoted below.

Copyright (c) 2015, 2016 CERN.
Copyright (c) 2015, 2016, 2017 CERN.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion docs/operations.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2016 CERN.
Copyright (C) 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/overview.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
2 changes: 1 addition & 1 deletion docs/releasenotes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of hepcrawl.
Copyright (C) 2015, 2016 CERN.
Copyright (C) 2015, 2016, 2017 CERN.
hepcrawl is a free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License; see LICENSE file for
Expand Down
3 changes: 2 additions & 1 deletion hepcrawl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Call a crawler from Python."""

from __future__ import absolute_import, division, print_function

from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings
Expand Down
2 changes: 2 additions & 0 deletions hepcrawl/crawler2hep.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
"""

from __future__ import absolute_import, division, print_function

from inspire_schemas.api import LiteratureBuilder


Expand Down
2 changes: 1 addition & 1 deletion hepcrawl/dateutils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2016 CERN.
# Copyright (C) 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
Expand Down
4 changes: 3 additions & 1 deletion hepcrawl/extensions.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2016 CERN.
# Copyright (C) 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Define extensions here."""

from __future__ import absolute_import, division, print_function

from scrapy import signals


Expand Down
4 changes: 3 additions & 1 deletion hepcrawl/extractors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Contains common extractor mixins for use in spiders."""

from __future__ import absolute_import, division, print_function
4 changes: 2 additions & 2 deletions hepcrawl/extractors/jats.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Common extraction from the JATS XML format."""

from __future__ import absolute_import, print_function
from __future__ import absolute_import, division, print_function

import datetime

Expand Down
4 changes: 2 additions & 2 deletions hepcrawl/extractors/nlm.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2016 CERN.
# Copyright (C) 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Common extraction from the NLM XML format."""

from __future__ import absolute_import, print_function
from __future__ import absolute_import, division, print_function


class NLM(object):
Expand Down
5 changes: 3 additions & 2 deletions hepcrawl/inputs.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Define your input and output processors here."""

import datetime
from __future__ import absolute_import, division, print_function

import re

from w3lib.html import (
Expand Down
4 changes: 3 additions & 1 deletion hepcrawl/items.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
Expand All @@ -13,6 +13,8 @@
http://doc.scrapy.org/en/latest/topics/items.html
"""

from __future__ import absolute_import, division, print_function

import scrapy


Expand Down
4 changes: 3 additions & 1 deletion hepcrawl/loaders.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
Expand All @@ -13,6 +13,8 @@
See documentation in: http://doc.scrapy.org/en/latest/topics/items.html
"""

from __future__ import absolute_import, division, print_function

from scrapy.loader import ItemLoader
from scrapy.loader.processors import Join, MapCompose, TakeFirst
from scrapy.utils.url import canonicalize_url
Expand Down
3 changes: 2 additions & 1 deletion hepcrawl/mappings.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Contains mappings."""

from __future__ import absolute_import, division, print_function

COMMON_ACRONYMS = [
'LHC',
Expand Down
3 changes: 2 additions & 1 deletion hepcrawl/middlewares.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2016 CERN.
# Copyright (C) 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Define middlewares here."""

from __future__ import absolute_import, division, print_function

class ErrorHandlingMiddleware(object):

Expand Down
3 changes: 2 additions & 1 deletion hepcrawl/outputs.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# -*- coding: utf-8 -*-
#
# This file is part of hepcrawl.
# Copyright (C) 2015, 2016 CERN.
# Copyright (C) 2015, 2016, 2017 CERN.
#
# hepcrawl is a free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.

"""Define output processors here."""

from __future__ import absolute_import, division, print_function

class FreeKeywords(object):

Expand Down
Loading

0 comments on commit b3126a8

Please sign in to comment.