pybliometrics 4.0__tar.gz → 4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. {pybliometrics-4.0 → pybliometrics-4.2}/.gitignore +3 -0
  2. {pybliometrics-4.0 → pybliometrics-4.2}/CONTRIBUTING.rst +11 -35
  3. {pybliometrics-4.0/pybliometrics.egg-info → pybliometrics-4.2}/PKG-INFO +5 -5
  4. {pybliometrics-4.0 → pybliometrics-4.2}/docs/access/errors.rst +3 -3
  5. {pybliometrics-4.0 → pybliometrics-4.2}/docs/access/general.rst +3 -5
  6. {pybliometrics-4.0 → pybliometrics-4.2}/docs/access/quotas.rst +2 -2
  7. {pybliometrics-4.0 → pybliometrics-4.2}/docs/access.rst +2 -1
  8. pybliometrics-4.2/docs/configuration.rst +91 -0
  9. {pybliometrics-4.0 → pybliometrics-4.2}/docs/index.rst +20 -21
  10. pybliometrics-4.2/docs/reference/sciencedirect/ArticleEntitlement.rst +53 -0
  11. pybliometrics-4.2/docs/reference/sciencedirect/ArticleMetadata.rst +241 -0
  12. pybliometrics-4.2/docs/reference/sciencedirect/ArticleRetrieval.rst +47 -0
  13. pybliometrics-4.2/docs/reference/sciencedirect/ObjectMetadata.rst +156 -0
  14. pybliometrics-4.2/docs/reference/sciencedirect/ObjectRetrieval.rst +48 -0
  15. pybliometrics-4.2/docs/reference/sciencedirect/ScienceDirectSearch.rst +155 -0
  16. pybliometrics-4.2/docs/reference/sciencedirect/SubjectClassifications.rst +75 -0
  17. pybliometrics-4.2/docs/reference/sciencedirect/figures/gr12.jpg +0 -0
  18. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/AbstractRetrieval.rst +9 -11
  19. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/AffiliationRetrieval.rst +3 -3
  20. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/AffiliationSearch.rst +4 -4
  21. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/AuthorRetrieval.rst +5 -5
  22. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/AuthorSearch.rst +4 -4
  23. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/CitationOverview.rst +22 -22
  24. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/PlumXMetrics.rst +3 -3
  25. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/ScopusSearch.rst +108 -102
  26. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/SerialSearch.rst +3 -3
  27. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/SerialTitle.rst +3 -3
  28. {pybliometrics-4.0/docs/classes → pybliometrics-4.2/docs/reference/scopus}/SubjectClassifications.rst +3 -3
  29. pybliometrics-4.2/docs/reference.rst +84 -0
  30. {pybliometrics-4.0 → pybliometrics-4.2}/docs/tips/affiliations.rst +3 -2
  31. {pybliometrics-4.0 → pybliometrics-4.2}/docs/tips/configuration.rst +2 -1
  32. {pybliometrics-4.0 → pybliometrics-4.2}/docs/tips/database.rst +3 -3
  33. {pybliometrics-4.0 → pybliometrics-4.2}/docs/tips/migration1.rst +5 -5
  34. {pybliometrics-4.0 → pybliometrics-4.2}/docs/tips/migration3.rst +2 -2
  35. pybliometrics-4.2/docs/tips/rename.rst +11 -0
  36. {pybliometrics-4.0 → pybliometrics-4.2}/docs/tips/support.rst +3 -3
  37. {pybliometrics-4.0 → pybliometrics-4.2}/docs/tips.rst +2 -1
  38. {pybliometrics-4.0 → pybliometrics-4.2}/meta/AUTHORS.rst +1 -1
  39. {pybliometrics-4.0 → pybliometrics-4.2}/meta/CHANGES.rst +138 -101
  40. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/__init__.py +3 -6
  41. pybliometrics-4.2/pybliometrics/sciencedirect/__init__.py +9 -0
  42. pybliometrics-4.2/pybliometrics/sciencedirect/article_entitlement.py +95 -0
  43. pybliometrics-4.2/pybliometrics/sciencedirect/article_metadata.py +171 -0
  44. pybliometrics-4.2/pybliometrics/sciencedirect/article_retrieval.py +244 -0
  45. pybliometrics-4.2/pybliometrics/sciencedirect/object_metadata.py +70 -0
  46. pybliometrics-4.2/pybliometrics/sciencedirect/object_retrieval.py +54 -0
  47. pybliometrics-4.2/pybliometrics/sciencedirect/sciencedirect_search.py +172 -0
  48. pybliometrics-4.2/pybliometrics/sciencedirect/subject_classifications.py +47 -0
  49. pybliometrics-4.2/pybliometrics/sciencedirect/tests/test_ArticleEntitlement.py +30 -0
  50. pybliometrics-4.2/pybliometrics/sciencedirect/tests/test_ArticleMetadata.py +132 -0
  51. pybliometrics-4.2/pybliometrics/sciencedirect/tests/test_ArticleRetrieval.py +248 -0
  52. pybliometrics-4.2/pybliometrics/sciencedirect/tests/test_ObjectMetadata.py +46 -0
  53. pybliometrics-4.2/pybliometrics/sciencedirect/tests/test_ObjectRetrieval.py +32 -0
  54. pybliometrics-4.2/pybliometrics/sciencedirect/tests/test_ScienceDirectSearch.py +79 -0
  55. pybliometrics-4.2/pybliometrics/sciencedirect/tests/test_ScienceDirectSubjectClassifications.py +58 -0
  56. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/__init__.py +1 -1
  57. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/abstract_citation.py +48 -48
  58. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/abstract_retrieval.py +71 -72
  59. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/affiliation_retrieval.py +6 -6
  60. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/affiliation_search.py +13 -20
  61. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/author_retrieval.py +17 -18
  62. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/author_search.py +7 -16
  63. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/plumx_metrics.py +10 -11
  64. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/scopus_search.py +40 -28
  65. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/serial_search.py +6 -6
  66. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/serial_title.py +23 -20
  67. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/subject_classifications.py +7 -7
  68. pybliometrics-4.2/pybliometrics/scopus/tests/__init__.py +0 -0
  69. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_AbstractRetrieval.py +18 -13
  70. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_AuthorSearch.py +2 -2
  71. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_CitationOverview.py +2 -2
  72. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_ScopusSearch.py +15 -8
  73. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_SerialTitle.py +38 -9
  74. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_SubjectClassifications.py +4 -0
  75. pybliometrics-4.2/pybliometrics/superclasses/__init__.py +3 -0
  76. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics}/superclasses/base.py +28 -20
  77. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics}/superclasses/retrieval.py +8 -9
  78. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics}/superclasses/search.py +11 -14
  79. pybliometrics-4.2/pybliometrics/utils/__init__.py +6 -0
  80. pybliometrics-4.2/pybliometrics/utils/constants.py +120 -0
  81. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics}/utils/create_config.py +30 -17
  82. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics}/utils/get_content.py +59 -28
  83. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics}/utils/parse_content.py +45 -14
  84. pybliometrics-4.2/pybliometrics/utils/startup.py +159 -0
  85. pybliometrics-4.2/pybliometrics/utils/tests/__init__.py +0 -0
  86. pybliometrics-4.2/pybliometrics/utils/tests/test_startup.py +68 -0
  87. {pybliometrics-4.0 → pybliometrics-4.2/pybliometrics.egg-info}/PKG-INFO +5 -5
  88. pybliometrics-4.2/pybliometrics.egg-info/SOURCES.txt +117 -0
  89. {pybliometrics-4.0 → pybliometrics-4.2}/pyproject.toml +4 -7
  90. pybliometrics-4.0/docs/classes.rst +0 -39
  91. pybliometrics-4.0/docs/configuration.rst +0 -95
  92. pybliometrics-4.0/docs/tips/rename.rst +0 -11
  93. pybliometrics-4.0/pybliometrics/scopus/superclasses/__init__.py +0 -3
  94. pybliometrics-4.0/pybliometrics/scopus/utils/__init__.py +0 -6
  95. pybliometrics-4.0/pybliometrics/scopus/utils/constants.py +0 -84
  96. pybliometrics-4.0/pybliometrics/scopus/utils/startup.py +0 -79
  97. pybliometrics-4.0/pybliometrics.egg-info/SOURCES.txt +0 -91
  98. {pybliometrics-4.0 → pybliometrics-4.2}/.github/ISSUE_TEMPLATE/bug.md +0 -0
  99. {pybliometrics-4.0 → pybliometrics-4.2}/.github/ISSUE_TEMPLATE/feature.md +0 -0
  100. {pybliometrics-4.0 → pybliometrics-4.2}/.github/ISSUE_TEMPLATE/question.md +0 -0
  101. {pybliometrics-4.0 → pybliometrics-4.2}/.readthedocs.yaml +0 -0
  102. {pybliometrics-4.0 → pybliometrics-4.2}/CITATION.cff +0 -0
  103. {pybliometrics-4.0 → pybliometrics-4.2}/LICENSE +0 -0
  104. {pybliometrics-4.0 → pybliometrics-4.2}/README.rst +0 -0
  105. {pybliometrics-4.0 → pybliometrics-4.2}/docs/Makefile +0 -0
  106. {pybliometrics-4.0 → pybliometrics-4.2}/docs/_static/custom.css.bak +0 -0
  107. {pybliometrics-4.0 → pybliometrics-4.2}/docs/authors.rst +0 -0
  108. {pybliometrics-4.0 → pybliometrics-4.2}/docs/changelog.rst +0 -0
  109. {pybliometrics-4.0 → pybliometrics-4.2}/docs/conf.py +0 -0
  110. {pybliometrics-4.0 → pybliometrics-4.2}/docs/contributing.rst +0 -0
  111. {pybliometrics-4.0 → pybliometrics-4.2}/docs/installation.rst +0 -0
  112. {pybliometrics-4.0 → pybliometrics-4.2}/docs/make.bat +0 -0
  113. {pybliometrics-4.0 → pybliometrics-4.2}/docs/requirements.txt +0 -0
  114. {pybliometrics-4.0 → pybliometrics-4.2}/meta/1-s2.0-S2352711019300573-main.pdf +0 -0
  115. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics}/exception.py +0 -0
  116. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics/sciencedirect}/tests/__init__.py +0 -0
  117. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/README.md +0 -0
  118. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_AffiliationRetrieval.py +0 -0
  119. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_AffiliationSearch.py +0 -0
  120. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_AuthorRetrieval.py +0 -0
  121. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_PlumXMetrics.py +0 -0
  122. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics/scopus/tests/test_SerialSearch.py +0 -0
  123. {pybliometrics-4.0/pybliometrics/scopus → pybliometrics-4.2/pybliometrics}/utils/checks.py +0 -0
  124. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics.egg-info/dependency_links.txt +0 -0
  125. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics.egg-info/requires.txt +0 -0
  126. {pybliometrics-4.0 → pybliometrics-4.2}/pybliometrics.egg-info/top_level.txt +0 -0
  127. {pybliometrics-4.0 → pybliometrics-4.2}/setup.cfg +0 -0
@@ -48,3 +48,6 @@ coverage.xml
48
48
 
49
49
  # Sphinx documentation
50
50
  docs/_build/
51
+
52
+ # Dont't track test config file
53
+ *test_config.cfg
@@ -2,16 +2,12 @@
2
2
  Contributing
3
3
  ============
4
4
 
5
- Contributions are welcome, and they are greatly appreciated! Every
6
- little bit helps, and credit will always be given.
5
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
7
6
 
8
7
  You can contribute in many ways:
9
8
 
10
- Types of Contributions
11
- ----------------------
12
-
13
9
  Submit Feedback
14
- ~~~~~~~~~~~~~~~
10
+ ---------------
15
11
 
16
12
  The best way to send feedback is to file an issue at https://github.com/pybliometrics-dev/pybliometrics/issues.
17
13
 
@@ -22,7 +18,7 @@ If you are proposing a feature:
22
18
  * Respect the `Python Code of Conduct <https://www.python.org/psf/codeofconduct/>`_
23
19
 
24
20
  Report Bugs
25
- ~~~~~~~~~~~
21
+ -----------
26
22
 
27
23
  Before are reporting a bug, please
28
24
 
@@ -36,40 +32,23 @@ Report bugs at https://github.com/pybliometrics-dev/pybliometrics/issues. Pleas
36
32
  * Detailed steps to reproduce the bug.
37
33
  * If you have a mere question on how to do things, please rather pose your question on `StackOverflow.com <https://stackoverflow.com/>`_ using the `#pybliometrics <https://stackoverflow.com/questions/tagged/pybliometrics>`_ tag.
38
34
 
39
- Fix Bugs
40
- ~~~~~~~~
41
-
42
- Look through the GitHub issues for bugs. Anything tagged with "bug"
43
- is open to whoever wants to fix it.
44
-
45
- Implement Features
46
- ~~~~~~~~~~~~~~~~~~
47
-
48
- Look through the GitHub issues for features. Anything tagged with "enhancement"
49
- is open to whoever wants to implement it.
35
+ Fix bugs and implement features
36
+ -------------------------------
50
37
 
51
- Write Documentation
52
- ~~~~~~~~~~~~~~~~~~~
38
+ If you found a bug and know how to fix it: Why not suggest a pull request right away? We commit to review it soon.
53
39
 
54
- This repo could always use more documentation, whether as part of the
55
- official pybliometrics docs, in docstrings, or even on the web in blog posts,
56
- articles, and such.
57
-
58
- Get Started!
59
- ------------
60
-
61
- Ready to contribute? Here's how to set up `pybliometrics` for local development.
40
+ Here's how to set up `pybliometrics` for local development:
62
41
 
63
42
  1. Fork the `pybliometrics` repo on GitHub.
64
43
  2. Clone your fork locally::
65
44
 
66
- $ git clone https@github.com:your_name_here/pybliometrics.git
45
+ $ git clone https://github.com/your_username_here/pybliometrics.git
67
46
 
68
47
  3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
69
48
 
70
49
  $ mkvirtualenv pybliometrics
71
50
  $ cd pybliometrics/
72
- $ python setup.py develop
51
+ $ pip install -e .
73
52
 
74
53
  4. Create a branch for local development::
75
54
 
@@ -85,11 +64,8 @@ Ready to contribute? Here's how to set up `pybliometrics` for local development.
85
64
 
86
65
  6. Submit a pull request through the GitHub website.
87
66
 
88
- Pull Request Guidelines
89
- -----------------------
90
-
91
67
  Before you submit a pull request, check that it meets these guidelines:
92
68
 
93
- 1. Adhere to `PEP8 <https://www.python.org/dev/peps/pep-0008/>`_
69
+ 1. Adhere to `PEP8 <https://www.python.org/dev/peps/pep-0008/>`_.
94
70
  2. Run tests locally `python -m pytest --verbose` (on Windows) or `pytest pybliometrics/scopus/tests/ --verbose`.
95
- 3. The pull request should work for Python 3.X.
71
+ 3. The pull request should work for all currently active python versions.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pybliometrics
3
- Version: 4.0
3
+ Version: 4.2
4
4
  Summary: Python-based API-Wrapper to access Scopus
5
5
  Author-email: "'John Kitchin and Michael E. Rose" <Michael.Ernst.Rose@gmail.com>
6
6
  Maintainer-email: "Michael E. Rose" <Michael.Ernst.Rose@gmail.com>
@@ -16,15 +16,15 @@ Classifier: Intended Audience :: Developers
16
16
  Classifier: License :: OSI Approved :: MIT License
17
17
  Classifier: Natural Language :: English
18
18
  Classifier: Operating System :: OS Independent
19
- Classifier: Programming Language :: Python :: 3.6
20
- Classifier: Programming Language :: Python :: 3.7
21
- Classifier: Programming Language :: Python :: 3.8
22
19
  Classifier: Programming Language :: Python :: 3.9
23
20
  Classifier: Programming Language :: Python :: 3.10
24
21
  Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
25
24
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
25
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
27
26
  Classifier: Topic :: Documentation :: Sphinx
27
+ Requires-Python: <=3.13,>=3.9
28
28
  Description-Content-Type: text/x-rst
29
29
  License-File: LICENSE
30
30
  Requires-Dist: requests
@@ -1,5 +1,5 @@
1
1
  Error message hierarchy
2
- ~~~~~~~~~~~~~~~~~~~~~~~
2
+ -----------------------
3
3
 
4
4
  `pybliometrics` raises exceptions if the download status is not ok. To allow for error-specific handling, `pybliometrics` employs the following exception hierarchy:
5
5
 
@@ -21,9 +21,9 @@ Error message hierarchy
21
21
 
22
22
  .. _Scopus429Error:
23
23
 
24
- * `pybliometrics.scopus.exception.Scopus429Error: QUOTA EXCEEDED`: Your provided API key's weekly quota has been depleted. If you provided multiple keys in your :doc:`configuration file <../configuration>`, this means all your keys are depleted. In this case, wait up to week until your API key's quota has been reset.
24
+ * `pybliometrics.scopus.exception.Scopus429Error: QUOTA EXCEEDED`: Your provided API key's weekly quota has been depleted. If you provided multiple keys in your :doc:`configuration file <../configuration>`, this means all your keys are depleted. In this case, wait up to a week until your API key's quota has been reset.
25
25
 
26
- * `pybliometrics.scopus.exception.ScopusServerError`: General exception related to all Server-related exceptions defined below. This may happen for various reasons (the internet is a noisy medium); usually it helps to wait few seconds before the next query. Server errors are also raised if you use a non-existent fieldname in searches. Verify that your query works in Scopus' `Advanced Search <https://www.scopus.com/search/form.uri?display=advanced>`_. Previously `pybliometrics` used more fine-grained exceptions in the 5xx space, namely "Scopus500Error", "Scopus502Error" and "Scopus504Error". These are deprecated, use "ScopusServerError" instead.
26
+ * `pybliometrics.scopus.exception.ScopusServerError`: General exception related to all Server-related exceptions defined below. This may happen for various reasons (the internet is a noisy medium); usually it helps to wait a few seconds before the next query. Server errors are also raised if you use a non-existent field name in searches. Verify that your query works in Scopus' `Advanced Search <https://www.scopus.com/search/form.uri?display=advanced>`_. Previously `pybliometrics` used more fine-grained exceptions in the 5xx space, namely "Scopus500Error", "Scopus502Error" and "Scopus504Error". These are deprecated, use "ScopusServerError" instead.
27
27
 
28
28
  If queries break for other reasons, exceptions of type `requests.exceptions <https://requests.readthedocs.io/en/latest/api/?highlight=exceptions#exceptions>`_ are raised, such as:
29
29
 
@@ -1,5 +1,5 @@
1
1
  How to access Scopus
2
- ~~~~~~~~~~~~~~~~~~~~
2
+ --------------------
3
3
 
4
4
  To access Scopus via its API, you need two things. First, your institution needs to be a subscriber (not only to Scopus, but really to its API); second, you need to register API keys at https://dev.elsevier.com/apikey/manage. For each profile, you may register 10 keys.
5
5
 
@@ -13,8 +13,6 @@ Option 1 is easy and the most common.
13
13
 
14
14
  Option 2 might require you to additionally set a proxy. You can do so in the :doc:`configuration file <../configuration>`.
15
15
 
16
- Option 3 is rare. An InstToken is provided directly by Scopus/Elsevier to allow remote access in the absence of a VPN. It is cupled directly to a key. If you have an InstToken, please provide it during the setup when `pybliometrics` prompts you for it. Alternatively, add it to the :doc:`configuration file <../configuration>` manually. You may also set the InstToken via `insttoken="XYZ"` in any class. This is the preferred solution if you possess multiple keys.
16
+ Option 3 is rare. An InstToken is provided directly by Scopus/Elsevier to allow remote access in the absence of a VPN. It is coupled directly to a key. If you have an InstToken, please provide it during the setup when `pybliometrics` prompts you for it. Alternatively, add it to the :doc:`configuration file <../configuration>` manually. Remember to remove them (or comment out) when you're in your VPN again.
17
17
 
18
- There are only three Scopus APIs that you can access without your institution subscribing to it: The Abstract Retrieval API, the Scopus Search API and the Subject Classifications API.
19
-
20
- As a non-subscriber, use `view=META` in the :doc:`AbstractRetrieval() <../classes/ScopusSearch>` class. To search for for documents via the Scopus Search API as a non-subscriber, set `subscriber=False` in the :doc:`ScopusSearch() <../classes/ScopusSearch>` (you will retrieve less information however). The Subject Classifications API is the same for subscribers and non-subscribers.
18
+ There are only three Scopus APIs that you can access without your institution subscribing to it: The Abstract Retrieval API through :doc:`AbstractRetrieval(..., view=META) <../reference/scopus/ScopusSearch>`, the Scopus Search API through doc:`ScopusSearch(..., subscriber=False) <../reference/scopus/ScopusSearch>`, and the Subject Classifications API doc:`SubjectClassification() <../reference/scopus/SubjectClassification>` without special parameters.
@@ -1,5 +1,5 @@
1
1
  API Key quotas and 429 error
2
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2
+ ----------------------------
3
3
 
4
4
  Each API key has a certain usage limit for different Scopus APIs which are reset weekly. See https://dev.elsevier.com/api_key_settings.html for the list; for example, a key allows for 5,000 retrieval requests, or 20,000 search requests via the Scopus Search API.
5
5
 
@@ -7,4 +7,4 @@ The usage limits for each key are reset weekly, one week after their first usage
7
7
 
8
8
  `pybliometrics` will use all the keys provided in the :doc:`configuration file <../configuration>` when one key exceeded its quota for the given API. Be sure to put all keys in the config.ini.
9
9
 
10
- When the last key has been depleted as well, `pybliometrics` throws an a :ref:`pybliometrics.scopus.exception.Scopus429Error <Scopus429Error>`. In this case you need to restart the application one week after it has been started.
10
+ When the last key has been depleted as well, `pybliometrics` throws a :ref:`pybliometrics.scopus.exception.Scopus429Error <Scopus429Error>`. In this case you need to restart the application one week after it has been started.
@@ -1,5 +1,6 @@
1
+ ======
1
2
  Access
2
- ------
3
+ ======
3
4
 
4
5
  .. include:: access/general.rst
5
6
  .. include:: access/quotas.rst
@@ -0,0 +1,91 @@
1
+ =============
2
+ Configuration
3
+ =============
4
+
5
+ pybliometrics.cfg
6
+ -----------------
7
+ `pybliometrics` stores values it needs for operation in a configuration file called `pybliometrics.cfg`. The config file saves credentials as well as directory names for folders that store downloaded results. `pybliometrics` reads this file on startup.
8
+
9
+ The structure of the file is the following:
10
+
11
+ .. code-block:: none
12
+
13
+ [Directories]
14
+ AbstractRetrieval = PPP/.cache/pybliometrics/Scopus/abstract_retrieval
15
+ AffiliationRetrieval = PPP/.cache/.pybliometrics/Scopus/affiliation_retrieval
16
+ AffiliationSearch = PPP/.cache/.pybliometrics/Scopus/affiliation_search
17
+ AuthorRetrieval = PPP/.cache/.pybliometrics/Scopus/author_retrieval
18
+ AuthorSearch = PPP/.cache/.pybliometrics/Scopus/author_search
19
+ CitationOverview = PPP/.cache/.pybliometrics/Scopus/citation_overview
20
+ ScopusSearch = PPP/.cache/.pybliometrics/Scopus/scopus_search
21
+ SerialSearch = PPP/.cache/.pybliometrics/Scopus/serial_search
22
+ SerialTitle = PPP/.cache/.pybliometrics/Scopus/serial_title
23
+ PlumXMetrics = PPP/.cache/.pybliometrics/Scopus/plumx
24
+ SubjectClassifications = PPP/.cache/.pybliometrics/Scopus/subject_classification
25
+
26
+ [Authentication]
27
+ APIKey = Key1, Key2, Key3
28
+ InstToken = Token for Key1, Token for Key2, Token for Key3
29
+
30
+ [Proxy]
31
+ http = http://127.0.0.1:1234
32
+ https = https://127.0.0.1:1234
33
+
34
+ [Requests]
35
+ Timeout = 20
36
+ Retries = 5
37
+
38
+
39
+ Section `[Directories]` contains the paths where `pybliometrics` should store (cache) downloaded files. `pybliometrics` will create them if necessary. "PPP" is the extended version of `~/`, your private home directory or home path. The default paths are entered automatically. To set different paths, edit the config file manually. Under `pybliometrics` 2.x and before, the default paths used to be `~/.pybliometrics/abstract_retrieval` or `~/.scopus/abstract_retrieval`. You can safely rename and move the cache folder, but remember to change the paths in the configuration file, too.
40
+
41
+ Section `[Authentication]` contains the API keys which you obtain from http://dev.elsevier.com/myapikey.html. If you provide multiple (separated by a comma), `pybliometrics` automatically replaces a depleted key with another one at random at runtime until all of them are depleted. Remember that you can register multiple keys for the same email address, and you may use multiple email addresses which do not need to be associated to the institution through which you access Scopus. Some users need InstToken, which allow for access outside a specific network. They are tied to one particular API keys of yours, and must be passed in the same order. Most users do not use InstTokens though.
42
+
43
+ Section `[Proxy]` will be used when it exists; therefore remember to remove or comment out when you do not need it.
44
+
45
+ Section `[Requests]` stores parameters passed on to `requests` (see their `advanced documentation<https://requests.readthedocs.io/en/latest/user/advanced/>_`).
46
+
47
+ Simply edit this file using a simple text editor; changes will take effect the next time you start pybliometrics. Remember to indent multi-line statements.
48
+
49
+
50
+ Start-up
51
+ --------
52
+
53
+ You initalize `pybliometrics` like so:
54
+
55
+ .. code-block:: python
56
+
57
+ >>> import pybliometrics
58
+
59
+ >>> pybliometrics.init()
60
+
61
+
62
+ This attempts to read the configuration from the default locations.
63
+
64
+ If the configuration file does not exist, `pybliometrics` will prompt you to provide the configuration values the first time you execute `init()`.
65
+
66
+ There are two consecutive prompts: For your API Key(s) and the corresponding InstToken(s). The InstToken enables or facilitates access from outside your institution network, and you request it from Elsevier's Integration Support. If you don't use InstToken, hit enter on the second prompt:
67
+
68
+ .. code-block:: none
69
+
70
+ Creating config file at C:\Users\rosm\.config\pybliometrics.cfg with default paths...
71
+ Please enter your API Key(s), obtained from http://dev.elsevier.com/myapikey.html. Separate multiple keys by comma:
72
+ xxx
73
+ API Keys are sufficient for most users. If you have an InstToken, please enter the tokens pair now. Separate multiple tokens by a comma. The correspondig key's position should match the position of the token.If you don't have tokens, just press Enter:
74
+ yyy
75
+
76
+ The :ref:`function <doc-init>` accepts three parameters: A custom location `config_path` (str or `pathlib.Path() <https://docs.python.org/3/library/pathlib.html>`_, a list of `keys`, and a list of `inst_tokens`. The order of the provided InstTokens must match that of the provided API Keys. This is relevant for users who build `pybliometrics` using CI or who work on a server where prompts aren't possible.
77
+
78
+
79
+ Default location
80
+ ----------------
81
+ By default, the configuration file is located at `~/.config/`. `~/` refers to your private home directory or home path. On many Windows machines this defaults to `C:/Document and Settings/<Your User Name>`.
82
+
83
+ To see the location of the configuration file your current `pybliometrics` instance is using, execute this:
84
+
85
+ .. code-block:: python
86
+
87
+ >>> import pybliometrics
88
+
89
+ >>> print(pybliometrics.utils.constants.CONFIG_FILE)
90
+
91
+ If you started with versions older than 3.5, the file was called `config.ini` and located either in `~/.pybliometrics/` or (for very old installations) in `~/.scopus/`. You can safely move and rename the file. Those locations always take precedence.
@@ -1,7 +1,8 @@
1
+ ########################################################
1
2
  pybliometrics: Python-based API-Wrapper to access Scopus
2
- ========================================================
3
+ ########################################################
3
4
 
4
- pybliometrics is an easy to use Python library to pull, cache and extract data from the Scopus database.
5
+ pybliometrics is an easy to use Python library to pull, cache and extract data from the Scopus database. It provides one class per `API Access Point <https://dev.elsevier.com/api_docs.html>`_:
5
6
 
6
7
  .. include:: ../README.rst
7
8
  :start-after: example-begin
@@ -9,27 +10,25 @@ pybliometrics is an easy to use Python library to pull, cache and extract data f
9
10
 
10
11
  .. include:: installation.rst
11
12
 
12
- =======
13
- Classes
14
- =======
13
+ ========================================
14
+ Classes to interact with the Scopus APIs
15
+ ========================================
15
16
 
16
- pybliometrics provides one class per Scopus API Access Point (see https://dev.elsevier.com/api_docs.html):
17
-
18
- .. currentmodule:: pybliometrics
17
+ .. currentmodule:: pybliometrics.scopus
19
18
 
20
19
  .. autosummary::
21
20
 
22
- scopus.AbstractRetrieval
23
- scopus.AffiliationRetrieval
24
- scopus.AffiliationSearch
25
- scopus.AuthorRetrieval
26
- scopus.AuthorSearch
27
- scopus.CitationOverview
28
- scopus.PlumXMetrics
29
- scopus.ScopusSearch
30
- scopus.SerialSearch
31
- scopus.SerialTitle
32
- scopus.SubjectClassifications
21
+ AbstractRetrieval
22
+ AffiliationRetrieval
23
+ AffiliationSearch
24
+ AuthorRetrieval
25
+ AuthorSearch
26
+ CitationOverview
27
+ PlumXMetrics
28
+ ScopusSearch
29
+ SerialSearch
30
+ SerialTitle
31
+ SubjectClassifications
33
32
 
34
33
  ========
35
34
  Citation
@@ -51,10 +50,10 @@ Indices and tables
51
50
 
52
51
  .. Hidden links for Navigation side panel
53
52
  .. toctree::
54
- :maxdepth: 3
53
+ :maxdepth: 4
55
54
  :hidden:
56
55
 
57
- classes
56
+ reference
58
57
  access
59
58
  configuration
60
59
  tips
@@ -0,0 +1,53 @@
1
+ pybliometrics.sciencedirect.ArticleEntitlement
2
+ ==============================================
3
+
4
+ `ArticleEntitlement()` implements the `ScienceDirect Article Entitlement API <https://dev.elsevier.com/documentation/ArticleEntitlementAPI.wadl>`_.
5
+
6
+ The Article Entitlement API allows you to check whether you have access to a specific document. Further, it let's you retrieve the identifiers of a document like the EID, DOI, PII, Scopus ID and Pubmed ID. The 'FULL' view is the default and only view available.
7
+
8
+ .. currentmodule:: pybliometrics.sciencedirect
9
+ .. contents:: Table of Contents
10
+ :local:
11
+
12
+ Documentation
13
+ -------------
14
+
15
+ .. autoclass:: ArticleEntitlement
16
+ :members:
17
+ :inherited-members:
18
+
19
+ Examples
20
+ --------
21
+ You initialize the class with an ID that ScienceDirect uses, e.g. the DOI:
22
+
23
+ .. code-block:: python
24
+
25
+ >>> from pybliometrics.sciencedirect import ArticleEntitlement, init
26
+ >>> init()
27
+ >>> ae = ArticleEntitlement('10.1016/j.reseneeco.2015.06.001')
28
+
29
+ To check whether a document exists and whether you have access to it, you can use the `status` and `entitled` properties.
30
+
31
+ .. code-block:: python
32
+
33
+ >>> ae.status
34
+ 'found'
35
+ >>> ae.entitled
36
+ True
37
+
38
+ In addition to the entitlement status, `ArticleEntitlement` contains information about the document's identifiers:
39
+
40
+ .. code-block:: python
41
+
42
+ >>> ae.eid
43
+ '1-s2.0-S092876551500038X'
44
+ >>> ae.doi
45
+ '10.1016/j.reseneeco.2015.06.001'
46
+ >>> ae.pii
47
+ 'S0928-7655(15)00038-X'
48
+ >>> ae.pii_norm
49
+ 'S092876551500038X'
50
+ >>> ae.scopus_id
51
+ '84935028440'
52
+ >>> ae.pubmed_id
53
+ None
@@ -0,0 +1,241 @@
1
+ pybliometrics.sciencedirect.ArticleMetadata
2
+ ===========================================
3
+
4
+ `ArticleMetadata()` implements the `ScienceDirect Article Metadata API <https://dev.elsevier.com/documentation/ArticleMetadataAPI.wadl>`_.
5
+
6
+ The Article Metadata API allows users to search for documents using a Boolean syntax. It offers two views: 'STANDARD' and 'COMPLETE', with the 'COMPLETE' view providing more detailed data.
7
+
8
+ For a guide on how to query, check the `ScienceDirect Article Metadata Guide <https://dev.elsevier.com/sd_article_meta_tips.html>`_.
9
+
10
+ .. currentmodule:: pybliometrics.sciencedirect
11
+ .. contents:: Table of Contents
12
+ :local:
13
+
14
+ Documentation
15
+ -------------
16
+
17
+ .. autoclass:: ArticleMetadata
18
+ :members:
19
+ :inherited-members:
20
+
21
+ Examples
22
+ --------
23
+ To use the class provide a query. An invalid search query will result in an error.
24
+
25
+ .. code-block:: python
26
+
27
+ >>> import pandas as pd
28
+ >>> from pybliometrics.sciencedirect import ArticleMetadata, init
29
+ >>> init()
30
+ >>> am = ArticleMetadata('TITLE("Bayesian Network") AND YEAR(2015)')
31
+
32
+ The `results` property contains a list of the metadata of the documents found.
33
+ The available fields and a description can be found in the `Article Metadata Views <https://dev.elsevier.com/sd_article_meta_tips.html>`_.
34
+
35
+ .. code-block:: python
36
+
37
+ >>> am.results
38
+ [Document(authorKeywords='Flight control system ...', authors='Zhong, Lu;Haijun, Zeng', ...),
39
+ Document(authorKeywords='Bayesian network infer...', authors='Kissinger, Jessica ...', ...),
40
+ Document(authorKeywords='Bayesian networks | Pa...', authors='Druzdzel, Marek J.', ...),
41
+ ...]
42
+
43
+ The field `teaser` from the first document can be accessed as follows:
44
+
45
+ .. code-block:: python
46
+
47
+ >>> am_first_document = am.results[0]
48
+ >>> am_first_document.teaser
49
+ 'Traditional probabilistic safety analysis methods are not suitable for modern flight control system with multi-state probability. In this papera Bayesian Network based probabilistic safety model is...'
50
+
51
+ The `results` can be casted to a pandas DataFrame:
52
+
53
+ .. code-block:: python
54
+
55
+ >>> df = pd.DataFrame(am.results)
56
+ >>> # Print retrieved fields
57
+ >>> df.columns
58
+ Index(['authorKeywords', 'authors', 'available_online_date', 'first_author',
59
+ 'abstract_text', 'doi', 'title', 'eid', 'link', 'openArchiveArticle',
60
+ 'openaccess_status', 'openaccessArticle', 'openaccessUserLicense',
61
+ 'pii', 'aggregationType', 'copyright', 'coverDate', 'coverDisplayDate',
62
+ 'edition', 'endingPage', 'isbn', 'publicationName', 'startingPage',
63
+ 'teaser', 'api_link', 'publicationType', 'vor_available_online_date'],
64
+ dtype='object')
65
+ >>> # Print shape of the dataframe (rows x columns)
66
+ >>> df.shape
67
+ (71, 27)
68
+ >>> # Print first 5 rows
69
+ >>> df.head()
70
+
71
+ .. raw:: html
72
+
73
+ <div style="overflow-x:auto; border:1px solid #ddd; padding:10px;">
74
+ <style scoped>
75
+ .dataframe tbody tr th:only-of-type {
76
+ vertical-align: middle;
77
+ }
78
+
79
+ .dataframe tbody tr th {
80
+ vertical-align: top;
81
+ }
82
+
83
+ .dataframe thead th {
84
+ text-align: right;
85
+ }
86
+ .dataframe{
87
+ font-size: 12px;
88
+ }
89
+ </style>
90
+ <table border="1" class="dataframe">
91
+ <thead>
92
+ <tr style="text-align: right;">
93
+ <th></th>
94
+ <th>authorKeywords</th>
95
+ <th>authors</th>
96
+ <th>available_online_date</th>
97
+ <th>first_author</th>
98
+ <th>abstract_text</th>
99
+ <th>doi</th>
100
+ <th>title</th>
101
+ <th>eid</th>
102
+ <th>link</th>
103
+ <th>openArchiveArticle</th>
104
+ <th>...</th>
105
+ <th>coverDisplayDate</th>
106
+ <th>edition</th>
107
+ <th>endingPage</th>
108
+ <th>isbn</th>
109
+ <th>publicationName</th>
110
+ <th>startingPage</th>
111
+ <th>teaser</th>
112
+ <th>api_link</th>
113
+ <th>publicationType</th>
114
+ <th>vor_available_online_date</th>
115
+ </tr>
116
+ </thead>
117
+ <tbody>
118
+ <tr>
119
+ <th>0</th>
120
+ <td>Flight control system | Bayesian network | Uni...</td>
121
+ <td>Zhong, Lu;Haijun, Zeng</td>
122
+ <td>2015-02-14</td>
123
+ <td>Kang, Chen</td>
124
+ <td>Traditional probabilistic safety analysis meth...</td>
125
+ <td>10.1016/j.proeng.2014.12.523</td>
126
+ <td>Research on Probabilistic Safety Analysis Appr...</td>
127
+ <td>1-s2.0-S1877705814036376</td>
128
+ <td>https://www.sciencedirect.com/science/article/...</td>
129
+ <td>False</td>
130
+ <td>...</td>
131
+ <td>2015</td>
132
+ <td>None</td>
133
+ <td>184</td>
134
+ <td>None</td>
135
+ <td>Procedia Engineering</td>
136
+ <td>180</td>
137
+ <td>Traditional probabilistic safety analysis meth...</td>
138
+ <td>https://api.elsevier.com/content/article/pii/S...</td>
139
+ <td>fla</td>
140
+ <td>None</td>
141
+ </tr>
142
+ <tr>
143
+ <th>1</th>
144
+ <td>Bayesian network inference | Large-scale data ...</td>
145
+ <td>Kissinger, Jessica C.;Moreno, Alberto;Galinski...</td>
146
+ <td>2015-06-17</td>
147
+ <td>Yin, Weiwei</td>
148
+ <td>High-throughput, genome-scale data present a u...</td>
149
+ <td>10.1016/j.mbs.2015.06.006</td>
150
+ <td>From genome-scale data to models of infectious...</td>
151
+ <td>1-s2.0-S0025556415001248</td>
152
+ <td>https://www.sciencedirect.com/science/article/...</td>
153
+ <td>False</td>
154
+ <td>...</td>
155
+ <td>December 2015</td>
156
+ <td>None</td>
157
+ <td>168</td>
158
+ <td>None</td>
159
+ <td>Mathematical Biosciences</td>
160
+ <td>156</td>
161
+ <td>•A generalized workflow for driving model deve...</td>
162
+ <td>https://api.elsevier.com/content/article/pii/S...</td>
163
+ <td>fla</td>
164
+ <td>2015-12-02</td>
165
+ </tr>
166
+ <tr>
167
+ <th>2</th>
168
+ <td>Bayesian networks | Parameter learning | EM al...</td>
169
+ <td>Druzdzel, Marek J.</td>
170
+ <td>2015-03-18</td>
171
+ <td>Ratnapinda, Parot</td>
172
+ <td>We compare three approaches to learning numeri...</td>
173
+ <td>10.1016/j.jal.2015.03.007</td>
174
+ <td>Learning discrete Bayesian network parameters ...</td>
175
+ <td>1-s2.0-S1570868315000464</td>
176
+ <td>https://www.sciencedirect.com/science/article/...</td>
177
+ <td>True</td>
178
+ <td>...</td>
179
+ <td>December 2015</td>
180
+ <td>None</td>
181
+ <td>642</td>
182
+ <td>None</td>
183
+ <td>Journal of Applied Logic</td>
184
+ <td>628</td>
185
+ <td>We compare three approaches to learning numeri...</td>
186
+ <td>https://api.elsevier.com/content/article/pii/S...</td>
187
+ <td>fla</td>
188
+ <td>2015-11-14</td>
189
+ </tr>
190
+ <tr>
191
+ <th>3</th>
192
+ <td>None</td>
193
+ <td>Xie, Ashleigh;Tsai, Yi-Chin;Black, Deborah;Di ...</td>
194
+ <td>2015-05-01</td>
195
+ <td>Phan, Kevin</td>
196
+ <td>None</td>
197
+ <td>10.1016/j.hlc.2014.12.097</td>
198
+ <td>Ministernotomy or minithoracotomy for minimall...</td>
199
+ <td>1-s2.0-S1443950614009111</td>
200
+ <td>https://www.sciencedirect.com/science/article/...</td>
201
+ <td>False</td>
202
+ <td>...</td>
203
+ <td>2015</td>
204
+ <td>None</td>
205
+ <td>e47</td>
206
+ <td>None</td>
207
+ <td>Heart, Lung and Circulation</td>
208
+ <td>e46</td>
209
+ <td>None</td>
210
+ <td>https://api.elsevier.com/content/article/pii/S...</td>
211
+ <td>abs</td>
212
+ <td>None</td>
213
+ </tr>
214
+ <tr>
215
+ <th>4</th>
216
+ <td>Bayesian Network | Structural Learning Algorit...</td>
217
+ <td>HENRY, Sébastien;OUZROUT, Yacine</td>
218
+ <td>2015-08-31</td>
219
+ <td>DIALLO, Thierno M.L.</td>
220
+ <td>This paper presents the CBNB (Causal Bayesian ...</td>
221
+ <td>10.1016/j.ifacol.2015.06.449</td>
222
+ <td>Bayesian Network Building for Diagnosis in Ind...</td>
223
+ <td>1-s2.0-S2405896315006886</td>
224
+ <td>https://www.sciencedirect.com/science/article/...</td>
225
+ <td>False</td>
226
+ <td>...</td>
227
+ <td>2015</td>
228
+ <td>None</td>
229
+ <td>2416</td>
230
+ <td>None</td>
231
+ <td>IFAC-PapersOnLine</td>
232
+ <td>2411</td>
233
+ <td>This paper presents the CBNB (Causal Bayesian ...</td>
234
+ <td>https://api.elsevier.com/content/article/pii/S...</td>
235
+ <td>fla</td>
236
+ <td>2015-08-31</td>
237
+ </tr>
238
+ </tbody>
239
+ </table>
240
+ <p>5 rows × 27 columns</p>
241
+ </div>