mirror of
				https://github.com/ilri/dspace-statistics-api.git
				synced 2025-10-31 12:51:15 +01:00 
			
		
		
		
	Compare commits
	
		
			51 Commits
		
	
	
		
			v1.4.0
			...
			e70b59ecfe
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e70b59ecfe | |||
| 4d0828b6c0 | |||
| dabc4c0259 | |||
| 4fd8af07c3 | |||
| 4c5326a176 | |||
| 3b1ccafab4 | |||
| 58b5ae82d3 | |||
| 562aaeef7d | |||
| 5cdba6acb1 | |||
| dd0937179c | |||
| f0c6c004db | |||
| 6843f0a8ac | |||
| f5fcfcc05a | |||
| e8ac74b6d1 | |||
| 14fc14daee | |||
| 871aae537a | |||
| 2fada6c6ff | |||
| ef0991e352 | |||
| 4502d6053c | |||
| a524068cf6 | |||
| 964d5dff06 | |||
| a9252d1771 | |||
| a63687d516 | |||
| 73dc3a292e | |||
| 1e742bad41 | |||
| 164008981e | |||
| dd1769b954 | |||
| b009820fb4 | |||
| 9830295978 | |||
| c93a4d7455 | |||
| 2f8e4f8a0a | |||
| 0650c5985e | |||
| d814f1c4f0 | |||
| 00f30591c4 | |||
| acfe87b91a | |||
| bc6d84dda2 | |||
| 889fb2f74a | |||
| c42cd7a818 | |||
| f8bba59d66 | |||
| b8cb752a29 | |||
| 09496aa2b5 | |||
| ff5dc7506d | |||
| 80a11ead97 | |||
| a282c95933 | |||
| fd7cc36306 | |||
| a20ff09570 | |||
| fdc0e73088 | |||
| b15afc9f39 | |||
| 2bc18ef719 | |||
| 49751b53f0 | |||
| d1c177e146 | 
							
								
								
									
										21
									
								
								.build.yml
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								.build.yml
									
									
									
									
									
								
							| @@ -1,21 +0,0 @@ | ||||
| image: archlinux | ||||
| packages: | ||||
|   - python-poetry | ||||
|   - postgresql | ||||
| sources: | ||||
|   - https://git.sr.ht/~alanorth/dspace-statistics-api | ||||
| tasks: | ||||
|   - setup: | | ||||
|       id | ||||
|       psql --version | ||||
|       sudo su - postgres -c "initdb --locale en_US.UTF-8 -E UTF8 -D '/var/lib/postgres/data'" | ||||
|       sudo systemctl start postgresql | ||||
|       createuser -U postgres dspacestatistics | ||||
|       psql -U postgres -c "ALTER USER dspacestatistics WITH PASSWORD 'dspacestatistics'" | ||||
|       createdb -U postgres -O dspacestatistics --encoding=UNICODE dspacestatistics | ||||
|       cd dspace-statistics-api | ||||
|       psql -U postgres -d dspacestatistics < tests/dspacestatistics.sql | ||||
|       poetry install --no-root | ||||
|   - test: | | ||||
|       cd dspace-statistics-api | ||||
|       poetry run pytest | ||||
							
								
								
									
										44
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										44
									
								
								.drone.yml
									
									
									
									
									
								
							| @@ -1,5 +1,44 @@ | ||||
| kind: pipeline | ||||
| type: docker | ||||
| name: python310 | ||||
|  | ||||
| steps: | ||||
| - name: setup | ||||
|   image: postgres:10-alpine | ||||
|   environment: | ||||
|     PGPASSWORD: postgres | ||||
|   commands: | ||||
|   - id | ||||
|   - psql --version | ||||
|   - sleep 5 | ||||
|   - pg_isready -h database -U postgres -d dspacestatistics | ||||
|   - createuser -h database -U postgres dspacestatistics | ||||
|   - psql -h database -U postgres -c "ALTER USER dspacestatistics WITH PASSWORD 'dspacestatistics'" | ||||
|   - psql -h database -U postgres -d dspacestatistics < tests/dspacestatistics.sql | ||||
|  | ||||
| - name: test | ||||
|   image: python:3.10-slim | ||||
|   environment: | ||||
|     PGPASSWORD: dspacestatistics | ||||
|     DATABASE_HOST: database | ||||
|   commands: | ||||
|   - id | ||||
|   - python -V | ||||
|   - apt update && apt install -y gcc git libpq-dev | ||||
|   - pip install -r requirements-dev.txt | ||||
|   - pytest | ||||
|  | ||||
| services: | ||||
| - name: database | ||||
|   image: postgres:10-alpine | ||||
|   environment: | ||||
|     POSTGRES_USER: postgres | ||||
|     POSTGRES_PASSWORD: postgres | ||||
|     POSTGRES_DB: dspacestatistics | ||||
|  | ||||
| --- | ||||
| kind: pipeline | ||||
| type: docker | ||||
| name: python39 | ||||
|  | ||||
| steps: | ||||
| @@ -24,7 +63,7 @@ steps: | ||||
|   commands: | ||||
|   - id | ||||
|   - python -V | ||||
|   - apt update && apt install -y gcc | ||||
|   - apt update && apt install -y gcc git libpq-dev | ||||
|   - pip install -r requirements-dev.txt | ||||
|   - pytest | ||||
|  | ||||
| @@ -71,6 +110,7 @@ steps: | ||||
|   commands: | ||||
|   - id | ||||
|   - python -V | ||||
|   - apt update && apt install -y gcc git libpq-dev | ||||
|   - pip install -r requirements-dev.txt | ||||
|   - pytest | ||||
|  | ||||
| @@ -109,6 +149,7 @@ steps: | ||||
|   commands: | ||||
|   - id | ||||
|   - python -V | ||||
|   - apt update && apt install -y gcc git libpq-dev | ||||
|   - pip install -r requirements-dev.txt | ||||
|   - pytest | ||||
|  | ||||
| @@ -147,6 +188,7 @@ steps: | ||||
|   commands: | ||||
|   - id | ||||
|   - python -V | ||||
|   - apt update && apt install -y gcc git libpq-dev | ||||
|   - pip install -r requirements-dev.txt | ||||
|   - pytest | ||||
|  | ||||
|   | ||||
							
								
								
									
										61
									
								
								.github/workflows/python-app.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								.github/workflows/python-app.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | ||||
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | ||||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||||
|  | ||||
| name: Build and Test | ||||
|  | ||||
| on: ['push', 'pull_request'] | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|  | ||||
|     runs-on: ubuntu-latest | ||||
|  | ||||
|     services: | ||||
|       database: | ||||
|         image: postgres:10-alpine | ||||
|         env: | ||||
|           # password for postgres user in the Docker container | ||||
|           POSTGRES_PASSWORD: postgres | ||||
|           # default database to create | ||||
|           POSTGRES_DB: dspacestatistics | ||||
|         options: >- | ||||
|           --health-cmd pg_isready | ||||
|           --health-interval 10s | ||||
|           --health-timeout 5s | ||||
|           --health-retries 5 | ||||
|         ports: | ||||
|           - 5432:5432 | ||||
|  | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - name: Set up Python 3.9 | ||||
|       uses: actions/setup-python@v2 | ||||
|       with: | ||||
|         python-version: 3.9 | ||||
|     - name: Install dependencies | ||||
|       run: | | ||||
|         python -m pip install --upgrade pip | ||||
|         pip install flake8 pytest | ||||
|         if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||||
|         if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | ||||
|     - name: Lint with flake8 | ||||
|       run: | | ||||
|         # stop the build if there are Python syntax errors or undefined names | ||||
|         flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||||
|         # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||||
|         flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||||
|     - name: Set up PostgreSQL | ||||
|       run: | | ||||
|         pg_isready -U postgres -d dspacestatistics | ||||
|         createuser -U postgres dspacestatistics | ||||
|         psql -U postgres -c "ALTER USER dspacestatistics WITH PASSWORD 'dspacestatistics'" | ||||
|         psql -U postgres -d dspacestatistics < tests/dspacestatistics.sql | ||||
|       env: | ||||
|         PGHOST: localhost | ||||
|         PGPASSWORD: postgres | ||||
|     - name: Test with pytest | ||||
|       run: | | ||||
|         pytest | ||||
|       env: | ||||
|         PGHOST: localhost | ||||
|         PGPASSWORD: dspacestatistics | ||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,2 +1,3 @@ | ||||
| __pycache__ | ||||
| venv | ||||
| *.egg-info | ||||
|   | ||||
							
								
								
									
										23
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file. | ||||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||||
|  | ||||
| ## 1.4.2 - 2021-04-14 | ||||
| ### Updated | ||||
| - Update dependencies with `poetry update` | ||||
| - Falcon 3.0.0, a minor change for us, but good to be using a current upstream | ||||
| version | ||||
|  | ||||
| ### Fixed | ||||
| - Bug in several of the "valid page" tests | ||||
|  | ||||
| ### Added | ||||
| - GitHub Actions workflow to build and test the API | ||||
|  | ||||
| ## [1.4.1] - 2021-01-14 | ||||
| ### Changed | ||||
| - Limit Solr query to UUIDs to avoid errors with unmigrated legacy stats (https://github.com/ilri/dspace-statistics-api/issues/12) | ||||
|  | ||||
| ### Updated | ||||
| - Dev dependencies | ||||
|  | ||||
| ## [1.4.0] - 2020-12-27 | ||||
| ### Added | ||||
| - indexer.py now indexes views and downloads for communities and collections | ||||
| @@ -72,7 +91,7 @@ and gunicorn 20.0.4 | ||||
| - Minor syntax issues highlighted by flake8 | ||||
|  | ||||
| ## [1.1.0] - 2019-05-05 | ||||
| ## Updated | ||||
| ### Updated | ||||
| - Falcon 2.0.0 (@alanorth) | ||||
|  | ||||
| ## [1.0.0] - 2019-04-15 | ||||
| @@ -90,7 +109,7 @@ and gunicorn 20.0.4 | ||||
| ## [0.9.0] - 2019-01-22 | ||||
| ### Updated | ||||
| - pytest version 4.0.0 | ||||
| - Fix indexing of sharded statistics cores ([#10)) | ||||
| - Fix indexing of sharded statistics cores (#10) | ||||
| - Handle case of missing views/downloads gracefully | ||||
|  | ||||
| ## [0.8.1] - 2018-11-14 | ||||
|   | ||||
							
								
								
									
										21
									
								
								Pipfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Pipfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| [[source]] | ||||
| url = "https://pypi.org/simple" | ||||
| verify_ssl = true | ||||
| name = "pypi" | ||||
|  | ||||
| [packages] | ||||
| gunicorn = "~=20.1.0" | ||||
| falcon = "~=3.0.0" | ||||
| psycopg2 = "~=2.9.1" | ||||
| requests = "~=2.26.0" | ||||
| falcon-swagger-ui = {editable = true, ref = "falcon3-update-swagger-ui", git = "https://github.com/alanorth/falcon-swagger-ui.git"} | ||||
|  | ||||
| [dev-packages] | ||||
| ipython = "*" | ||||
| black = "*" | ||||
| flake8 = "*" | ||||
| isort = "*" | ||||
| pytest = "~=6.2.0" | ||||
|  | ||||
| [requires] | ||||
| python_version = "3.9" | ||||
							
								
								
									
										533
									
								
								Pipfile.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										533
									
								
								Pipfile.lock
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,533 @@ | ||||
| { | ||||
|     "_meta": { | ||||
|         "hash": { | ||||
|             "sha256": "e69befc3b17e1f3029b1aab75ad40af8aebfb7f4f8a883f21b7d6bf193a07575" | ||||
|         }, | ||||
|         "pipfile-spec": 6, | ||||
|         "requires": { | ||||
|             "python_version": "3.9" | ||||
|         }, | ||||
|         "sources": [ | ||||
|             { | ||||
|                 "name": "pypi", | ||||
|                 "url": "https://pypi.org/simple", | ||||
|                 "verify_ssl": true | ||||
|             } | ||||
|         ] | ||||
|     }, | ||||
|     "default": { | ||||
|         "certifi": { | ||||
|             "hashes": [ | ||||
|                 "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872", | ||||
|                 "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569" | ||||
|             ], | ||||
|             "version": "==2021.10.8" | ||||
|         }, | ||||
|         "charset-normalizer": { | ||||
|             "hashes": [ | ||||
|                 "sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0", | ||||
|                 "sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b" | ||||
|             ], | ||||
|             "markers": "python_version >= '3'", | ||||
|             "version": "==2.0.7" | ||||
|         }, | ||||
|         "falcon": { | ||||
|             "hashes": [ | ||||
|                 "sha256:0212df91414c13c08a9cf4023488b2d47956712f712332f420bb0c7bdf39c6fa", | ||||
|                 "sha256:085b30b09ff4bdb31fda0a83a65f427d8dd4b5b5b21058781c38aff9747b5991", | ||||
|                 "sha256:0df4dee0ef89b4de5e2ba4402ac249942b09758a0decdc7a63d5edb3792c4c1c", | ||||
|                 "sha256:16f8735512af3f52473e3eda37e75bf697f6ced5afc3e9dc7110c430777823ab", | ||||
|                 "sha256:1bdf8085877bd049f799a34680d42fa82e2b93dcf8320d092f7e75933d0afcee", | ||||
|                 "sha256:260645c13d477af434fc200ec67734efc41e620b3f6e0479e722897511166b46", | ||||
|                 "sha256:3710b051f54c158310b45b1432a993803cdccb3e167d3e89aa93076ff77d2673", | ||||
|                 "sha256:485ef504d196390ebc0974cefd3f5fab4ad8a3ede4e5a7c0a803f555bcd8da45", | ||||
|                 "sha256:514dee9b6d66408e43fcef9aef2436004cd2e3163625f194dd064fce67269cce", | ||||
|                 "sha256:56b267fa2df7e0400a639cf40a994baac19170425b0b8bbad5a8a81e07f9717d", | ||||
|                 "sha256:65b1798026e3dbd2d323fa9b03f90e3827be4fe0d3c1f9e3ba3d4a7a001de566", | ||||
|                 "sha256:93ec7fc600ffee2377beeeeca32d8171ff305e9267bcd37bba5a7ce8af1e177f", | ||||
|                 "sha256:94fb4582212768ac425d023b7884e60d09a0bd4c5cd50ca8af0272af1cba5da6", | ||||
|                 "sha256:a70fc0f9f115e763effdf9fc6140a2b5df9f37bd2707f3b29e0a1357dbf53784", | ||||
|                 "sha256:a95b6a373b8f6014b0bc7090b1de031c9d237007211ef55a19b60241cf728e61", | ||||
|                 "sha256:a9d5be8902e977ac93aeebf2b8959e2c3d82783d7ea6a1fc80cef5352b83549b", | ||||
|                 "sha256:b1280db58c2af48b1ba24e39674fb6d84389eff5c4772a327a5af606eeead272", | ||||
|                 "sha256:c3abcd37545de531e7dada4113c88f01e86c7596c7c59300769d64ea7771a75e", | ||||
|                 "sha256:c41d84db325881a870e8b7129d5ecfd972fa4323cf77b7119a1d2a21966ee681", | ||||
|                 "sha256:c9a3cf58f9f3c9769bff3b24037b150c9f6658df4c899d68fa433f5acdfdb004", | ||||
|                 "sha256:ce052e91b8325a76ddc2066e35bb032e0be4671cd824f027d1826c68a0fd09e3", | ||||
|                 "sha256:d6c7f9b2063a4c0ac2516df014c5299ae098579e83025d342f31fe1ef8e994d7", | ||||
|                 "sha256:e6afb13a80b6a4383a66093af7bb0e8e02433ca5ebc7516842a6a3f112c844ae", | ||||
|                 "sha256:ee78a9934f8143c5eef9bfe949044c7eab3fef80a51cbc67cf6cb6b34c5613ce", | ||||
|                 "sha256:f1f70c6f086c53b0cc819a0725d3814ad62e105b62d4c4e2c46322f13e7910e7", | ||||
|                 "sha256:fa46751209af4f4882d3d60e430ea586e170bc03e1bd5b08cb16f6b96068febc", | ||||
|                 "sha256:ff4672f3549b00b62e710d3169903d14e37726f04045a0563b56d9af3fba271d" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==3.0.1" | ||||
|         }, | ||||
|         "falcon-swagger-ui": { | ||||
|             "editable": true, | ||||
|             "git": "https://github.com/alanorth/falcon-swagger-ui.git", | ||||
|             "ref": "c019c270b479c03d9276e20fd95488495b0943f6" | ||||
|         }, | ||||
|         "gunicorn": { | ||||
|             "hashes": [ | ||||
|                 "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e", | ||||
|                 "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==20.1.0" | ||||
|         }, | ||||
|         "idna": { | ||||
|             "hashes": [ | ||||
|                 "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", | ||||
|                 "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" | ||||
|             ], | ||||
|             "markers": "python_version >= '3'", | ||||
|             "version": "==3.3" | ||||
|         }, | ||||
|         "jinja2": { | ||||
|             "hashes": [ | ||||
|                 "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8", | ||||
|                 "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==3.0.3" | ||||
|         }, | ||||
|         "markupsafe": { | ||||
|             "hashes": [ | ||||
|                 "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298", | ||||
|                 "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64", | ||||
|                 "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b", | ||||
|                 "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194", | ||||
|                 "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567", | ||||
|                 "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff", | ||||
|                 "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724", | ||||
|                 "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74", | ||||
|                 "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646", | ||||
|                 "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35", | ||||
|                 "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6", | ||||
|                 "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a", | ||||
|                 "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6", | ||||
|                 "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad", | ||||
|                 "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26", | ||||
|                 "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38", | ||||
|                 "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac", | ||||
|                 "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7", | ||||
|                 "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6", | ||||
|                 "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047", | ||||
|                 "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75", | ||||
|                 "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f", | ||||
|                 "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b", | ||||
|                 "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135", | ||||
|                 "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8", | ||||
|                 "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a", | ||||
|                 "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a", | ||||
|                 "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1", | ||||
|                 "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9", | ||||
|                 "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864", | ||||
|                 "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914", | ||||
|                 "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee", | ||||
|                 "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f", | ||||
|                 "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18", | ||||
|                 "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8", | ||||
|                 "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2", | ||||
|                 "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d", | ||||
|                 "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b", | ||||
|                 "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b", | ||||
|                 "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86", | ||||
|                 "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6", | ||||
|                 "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f", | ||||
|                 "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb", | ||||
|                 "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833", | ||||
|                 "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28", | ||||
|                 "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e", | ||||
|                 "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415", | ||||
|                 "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902", | ||||
|                 "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f", | ||||
|                 "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d", | ||||
|                 "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9", | ||||
|                 "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d", | ||||
|                 "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145", | ||||
|                 "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066", | ||||
|                 "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c", | ||||
|                 "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1", | ||||
|                 "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a", | ||||
|                 "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207", | ||||
|                 "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f", | ||||
|                 "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53", | ||||
|                 "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd", | ||||
|                 "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134", | ||||
|                 "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85", | ||||
|                 "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9", | ||||
|                 "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5", | ||||
|                 "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94", | ||||
|                 "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509", | ||||
|                 "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51", | ||||
|                 "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==2.0.1" | ||||
|         }, | ||||
|         "psycopg2": { | ||||
|             "hashes": [ | ||||
|                 "sha256:079d97fc22de90da1d370c90583659a9f9a6ee4007355f5825e5f1c70dffc1fa", | ||||
|                 "sha256:2087013c159a73e09713294a44d0c8008204d06326006b7f652bef5ace66eebb", | ||||
|                 "sha256:25615574419dd9bda6fdfdcd58afb22e721f5b807cb3d5e62f488c8acf8cb754", | ||||
|                 "sha256:2c992196719fadda59f72d44603ee1a2fdcc67de097eea38d41c7ad9ad246e62", | ||||
|                 "sha256:7640e1e4d72444ef012e275e7b53204d7fab341fb22bc76057ede22fe6860b25", | ||||
|                 "sha256:7f91312f065df517187134cce8e395ab37f5b601a42446bdc0f0d51773621854", | ||||
|                 "sha256:830c8e8dddab6b6716a4bf73a09910c7954a92f40cf1d1e702fb93c8a919cc56", | ||||
|                 "sha256:89409d369f4882c47f7ea20c42c5046879ce22c1e4ea20ef3b00a4dfc0a7f188", | ||||
|                 "sha256:bf35a25f1aaa8a3781195595577fcbb59934856ee46b4f252f56ad12b8043bcf", | ||||
|                 "sha256:de5303a6f1d0a7a34b9d40e4d3bef684ccc44a49bbe3eb85e3c0bffb4a131b7c", | ||||
|                 "sha256:e5a8ed9dbfca8dc162c4ada5ab017e10d5a66c542b4c73569f103fa5f342f498" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==2.9.1" | ||||
|         }, | ||||
|         "requests": { | ||||
|             "hashes": [ | ||||
|                 "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24", | ||||
|                 "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==2.26.0" | ||||
|         }, | ||||
|         "setuptools": { | ||||
|             "hashes": [ | ||||
|                 "sha256:a481fbc56b33f5d8f6b33dce41482e64c68b668be44ff42922903b03872590bf", | ||||
|                 "sha256:dae6b934a965c8a59d6d230d3867ec408bb95e73bd538ff77e71fedf1eaca729" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==58.5.3" | ||||
|         }, | ||||
|         "urllib3": { | ||||
|             "hashes": [ | ||||
|                 "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece", | ||||
|                 "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844" | ||||
|             ], | ||||
|             "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", | ||||
|             "version": "==1.26.7" | ||||
|         } | ||||
|     }, | ||||
|     "develop": { | ||||
|         "attrs": { | ||||
|             "hashes": [ | ||||
|                 "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1", | ||||
|                 "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb" | ||||
|             ], | ||||
|             "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", | ||||
|             "version": "==21.2.0" | ||||
|         }, | ||||
|         "backcall": { | ||||
|             "hashes": [ | ||||
|                 "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e", | ||||
|                 "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255" | ||||
|             ], | ||||
|             "version": "==0.2.0" | ||||
|         }, | ||||
|         "black": { | ||||
|             "hashes": [ | ||||
|                 "sha256:6eb7448da9143ee65b856a5f3676b7dda98ad9abe0f87fce8c59291f15e82a5b", | ||||
|                 "sha256:a9952229092e325fe5f3dae56d81f639b23f7131eb840781947e4b2886030f33" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==21.10b0" | ||||
|         }, | ||||
|         "click": { | ||||
|             "hashes": [ | ||||
|                 "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3", | ||||
|                 "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==8.0.3" | ||||
|         }, | ||||
|         "decorator": { | ||||
|             "hashes": [ | ||||
|                 "sha256:7b12e7c3c6ab203a29e157335e9122cb03de9ab7264b137594103fd4a683b374", | ||||
|                 "sha256:e59913af105b9860aa2c8d3272d9de5a56a4e608db9a2f167a8480b323d529a7" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.5'", | ||||
|             "version": "==5.1.0" | ||||
|         }, | ||||
|         "flake8": { | ||||
|             "hashes": [ | ||||
|                 "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d", | ||||
|                 "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==4.0.1" | ||||
|         }, | ||||
|         "iniconfig": { | ||||
|             "hashes": [ | ||||
|                 "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3", | ||||
|                 "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32" | ||||
|             ], | ||||
|             "version": "==1.1.1" | ||||
|         }, | ||||
|         "ipython": { | ||||
|             "hashes": [ | ||||
|                 "sha256:4f69d7423a5a1972f6347ff233e38bbf4df6a150ef20fbb00c635442ac3060aa", | ||||
|                 "sha256:a658beaf856ce46bc453366d5dc6b2ddc6c481efd3540cb28aa3943819caac9f" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==7.29.0" | ||||
|         }, | ||||
|         "isort": { | ||||
|             "hashes": [ | ||||
|                 "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7", | ||||
|                 "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==5.10.1" | ||||
|         }, | ||||
|         "jedi": { | ||||
|             "hashes": [ | ||||
|                 "sha256:18456d83f65f400ab0c2d3319e48520420ef43b23a086fdc05dff34132f0fb93", | ||||
|                 "sha256:92550a404bad8afed881a137ec9a461fed49eca661414be45059329614ed0707" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==0.18.0" | ||||
|         }, | ||||
|         "matplotlib-inline": { | ||||
|             "hashes": [ | ||||
|                 "sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee", | ||||
|                 "sha256:aed605ba3b72462d64d475a21a9296f400a19c4f74a31b59103d2a99ffd5aa5c" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.5'", | ||||
|             "version": "==0.1.3" | ||||
|         }, | ||||
|         "mccabe": { | ||||
|             "hashes": [ | ||||
|                 "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", | ||||
|                 "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" | ||||
|             ], | ||||
|             "version": "==0.6.1" | ||||
|         }, | ||||
|         "mypy-extensions": { | ||||
|             "hashes": [ | ||||
|                 "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d", | ||||
|                 "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8" | ||||
|             ], | ||||
|             "version": "==0.4.3" | ||||
|         }, | ||||
|         "packaging": { | ||||
|             "hashes": [ | ||||
|                 "sha256:096d689d78ca690e4cd8a89568ba06d07ca097e3306a4381635073ca91479966", | ||||
|                 "sha256:14317396d1e8cdb122989b916fa2c7e9ca8e2be9e8060a6eff75b6b7b4d8a7e0" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==21.2" | ||||
|         }, | ||||
|         "parso": { | ||||
|             "hashes": [ | ||||
|                 "sha256:12b83492c6239ce32ff5eed6d3639d6a536170723c6f3f1506869f1ace413398", | ||||
|                 "sha256:a8c4922db71e4fdb90e0d0bc6e50f9b273d3397925e5e60a717e719201778d22" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==0.8.2" | ||||
|         }, | ||||
|         "pathspec": { | ||||
|             "hashes": [ | ||||
|                 "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a", | ||||
|                 "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1" | ||||
|             ], | ||||
|             "version": "==0.9.0" | ||||
|         }, | ||||
|         "pexpect": { | ||||
|             "hashes": [ | ||||
|                 "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937", | ||||
|                 "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" | ||||
|             ], | ||||
|             "markers": "sys_platform != 'win32'", | ||||
|             "version": "==4.8.0" | ||||
|         }, | ||||
|         "pickleshare": { | ||||
|             "hashes": [ | ||||
|                 "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", | ||||
|                 "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56" | ||||
|             ], | ||||
|             "version": "==0.7.5" | ||||
|         }, | ||||
|         "platformdirs": { | ||||
|             "hashes": [ | ||||
|                 "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2", | ||||
|                 "sha256:8868bbe3c3c80d42f20156f22e7131d2fb321f5bc86a2a345375c6481a67021d" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==2.4.0" | ||||
|         }, | ||||
|         "pluggy": { | ||||
|             "hashes": [ | ||||
|                 "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159", | ||||
|                 "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==1.0.0" | ||||
|         }, | ||||
|         "prompt-toolkit": { | ||||
|             "hashes": [ | ||||
|                 "sha256:449f333dd120bd01f5d296a8ce1452114ba3a71fae7288d2f0ae2c918764fa72", | ||||
|                 "sha256:48d85cdca8b6c4f16480c7ce03fd193666b62b0a21667ca56b4bb5ad679d1170" | ||||
|             ], | ||||
|             "markers": "python_full_version >= '3.6.2'", | ||||
|             "version": "==3.0.22" | ||||
|         }, | ||||
|         "ptyprocess": { | ||||
|             "hashes": [ | ||||
|                 "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", | ||||
|                 "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" | ||||
|             ], | ||||
|             "version": "==0.7.0" | ||||
|         }, | ||||
|         "py": { | ||||
|             "hashes": [ | ||||
|                 "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719", | ||||
|                 "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378" | ||||
|             ], | ||||
|             "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", | ||||
|             "version": "==1.11.0" | ||||
|         }, | ||||
|         "pycodestyle": { | ||||
|             "hashes": [ | ||||
|                 "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20", | ||||
|                 "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f" | ||||
|             ], | ||||
|             "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", | ||||
|             "version": "==2.8.0" | ||||
|         }, | ||||
|         "pyflakes": { | ||||
|             "hashes": [ | ||||
|                 "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c", | ||||
|                 "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e" | ||||
|             ], | ||||
|             "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", | ||||
|             "version": "==2.4.0" | ||||
|         }, | ||||
|         "pygments": { | ||||
|             "hashes": [ | ||||
|                 "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380", | ||||
|                 "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.5'", | ||||
|             "version": "==2.10.0" | ||||
|         }, | ||||
|         "pyparsing": { | ||||
|             "hashes": [ | ||||
|                 "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", | ||||
|                 "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" | ||||
|             ], | ||||
|             "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", | ||||
|             "version": "==2.4.7" | ||||
|         }, | ||||
|         "pytest": { | ||||
|             "hashes": [ | ||||
|                 "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89", | ||||
|                 "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==6.2.5" | ||||
|         }, | ||||
|         "regex": { | ||||
|             "hashes": [ | ||||
|                 "sha256:00a3e774de2c1f20006ee440eaab61c5ee3bcc5abc99e671a6b6069886c1e667", | ||||
|                 "sha256:019b20a3abbcbad704172f8bb168e08774e86ef422a2e5921aad27fa3597662a", | ||||
|                 "sha256:03248f5a7831c7dfd8f4806115e2cc034c5caf90a54c5ede643e10369b656c52", | ||||
|                 "sha256:03a8c698aa4eaa26bcebd94676db345206677422a32b6269bd67502291b3f5a4", | ||||
|                 "sha256:045d5208cb78cde5a3eec57f4792d2bce8cb591a3aa00897973a44d53a72cb54", | ||||
|                 "sha256:050a0cd770946666cf2f596e591d4e31ce40831c722fa81cdc77098248788fd8", | ||||
|                 "sha256:0bd28cbb1ec25dacdf90773f9d67a2bf8d5e28a1174334b4051e8316624dc6ad", | ||||
|                 "sha256:0c4b7b5c3d604f3fda1d8a3a70cfa94471ff0f15c87cb31aea1d1ac6009b84f6", | ||||
|                 "sha256:107032d37826480a8be6d986d26f714ea1e5d7bd42940ce0275ac3cddb2f242b", | ||||
|                 "sha256:15c74124502d75dd3e625879441981e4c00ef7b256ea5312edeef236943fe260", | ||||
|                 "sha256:2fb0d986bf28e3841f8c618b296cb8f94628d6b0f330bd7208300b5b439a6d08", | ||||
|                 "sha256:363c744622796f4018be80fcba705de9061df9ad2b67eb74227be25bc1d757ff", | ||||
|                 "sha256:51d9dac6382992dd7ca8f05a95cb15635dc25141250f152b1844460cd4dc2000", | ||||
|                 "sha256:52a681f3bf97f7b2284b3e70876899d56289d3d4f33da970bc1ac775ca95ad5b", | ||||
|                 "sha256:546167b64c7679bd247c43be665df0993241ee529e902edfd7fc4f7fc43fa859", | ||||
|                 "sha256:55315f5b7b51034584b70bc90595957e66c9c28acc0d947ab9e03db73788f328", | ||||
|                 "sha256:5ae92b925ca6a63bf40666d63f674452eed83684fde2346e02671b9825139e67", | ||||
|                 "sha256:5b4dc0bacdf01b3a8e493ba6d58fc1bae2a12664af56bc75b704a5a8af0f1c09", | ||||
|                 "sha256:635e0dd3fff4b8583578c35821107ad99c17d96de4ba6c7a3ac8a600a49c7bbe", | ||||
|                 "sha256:63b60bedf3f13c725277cfbcef4ff6fda45d17197091dff4c1480f686485efa2", | ||||
|                 "sha256:6d2ec8751d43b02905195302fd759595a00aa0865c6d811dedafafc1aa6564c9", | ||||
|                 "sha256:6df323051b17539c6256978b6414f90e06e8e9148743eba747f7a7d21a609c17", | ||||
|                 "sha256:6e9ce3b19d9a9260b68f9654b39d493df79c44752f1a7a1274afefa03919736e", | ||||
|                 "sha256:6ffd0122ef77c41dc87da03feac5105532e4b4ea07e91d4da80f64d033a6328d", | ||||
|                 "sha256:70a43db5faf490c0f14cb3dce6c56c2895a8adcdffc8a9bf21264105f321ac5b", | ||||
|                 "sha256:872fbe9363ac94a84bfee8c417c47fd66225b427c830aa7bcbd6b6a7d129780e", | ||||
|                 "sha256:90a2bf9770e3f964a61aa62b24e7f1d328d8a1e020b81240ab7d908ab54aa218", | ||||
|                 "sha256:983f0953523e763931197a8a966b6d9ca21834a57ff5316d2938aa26b5b1f5e2", | ||||
|                 "sha256:9b036a0ece4ca8b7ffe6edeb2db06f041eadbe0cc80d8b8f671aececd0ea1bfb", | ||||
|                 "sha256:9bd530355e16bf4b98a62f54110fdddb3317df45427edc21f1d0252fd951b842", | ||||
|                 "sha256:9e9f3ded639a0f8033f2b1ea819f9eb42218212176f3590dcaeef884f3f9c8c8", | ||||
|                 "sha256:aabd4b197aa3ba60144ce5eef6f320d30641b7085535bbe0e8c29458ab5c910a", | ||||
|                 "sha256:b0870a30090f3674eabf28457048033871e8d7695c25efe90aa755fc987e3658", | ||||
|                 "sha256:b2e961ecdea069a40e481613c545679e0d09af56c8913263c519393367449a52", | ||||
|                 "sha256:b37e60e25564f6c407933cf60836b67f5351233c3f2f26b8f7a6415dc96f04f7", | ||||
|                 "sha256:ca5226d0c9aa96678df8aff72ad39b6cfc433ba98ad19617074ac7d76e0b0818", | ||||
|                 "sha256:cfacb18b4c8b9adbe50aafe5b903bf8283c48106b9696ec68a185029a6f0d071", | ||||
|                 "sha256:d6be76a690c3dfae0c1bd6b880475897fca565f85a00946ef8955c73e6a9ba0b", | ||||
|                 "sha256:d7bedd6aff103c6f0cf2c7bc6e5504008f2d1e4c55b3e95b8bad514f1ddb85aa", | ||||
|                 "sha256:d9cb902c00f66ae8e070f0734826f6d22e9f66089cfdf1fbed0cb7227b114c66", | ||||
|                 "sha256:ddbab7617ea6d64028e0cd431ef1ade6043edae8c991b9340a49ee3b3fe3dcc0", | ||||
|                 "sha256:e84ba3c37f2f00f0cc207d8c32c06a557fe39eda90ee2e8b0e952bc81f6ac4a4", | ||||
|                 "sha256:e85e14e408b50bb0ebfd2ba1949055e2940863e4ce84641d58df384c42120e79", | ||||
|                 "sha256:e93f50833189cb6b83aaaac557d358ca0d3d7ae5963bee1e352c235affcb2cf5", | ||||
|                 "sha256:ee60b70e19e61c4772418349bc28c1b81f1e7de47f710f457fb4bea0b616a4b3", | ||||
|                 "sha256:ef109a3be5e317fe105907177e2ffbe5ecb343a8f04f89d949aaa716019c740b", | ||||
|                 "sha256:f0254e03b091132f5bac8b1a977b6084694356c8b5ce8144f1ca283ec106792a", | ||||
|                 "sha256:f3ce348049e6ed09c0d5f79634501c2f0f888f381034107f3ec9b64c2f0da6d1", | ||||
|                 "sha256:f45d669c75451c8c9f8309a5e1294f9386911b287a544d4f286f4911bb07408c" | ||||
|             ], | ||||
|             "version": "==2021.11.9" | ||||
|         }, | ||||
|         "setuptools": { | ||||
|             "hashes": [ | ||||
|                 "sha256:a481fbc56b33f5d8f6b33dce41482e64c68b668be44ff42922903b03872590bf", | ||||
|                 "sha256:dae6b934a965c8a59d6d230d3867ec408bb95e73bd538ff77e71fedf1eaca729" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==58.5.3" | ||||
|         }, | ||||
|         "toml": { | ||||
|             "hashes": [ | ||||
|                 "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", | ||||
|                 "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" | ||||
|             ], | ||||
|             "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", | ||||
|             "version": "==0.10.2" | ||||
|         }, | ||||
|         "tomli": { | ||||
|             "hashes": [ | ||||
|                 "sha256:c6ce0015eb38820eaf32b5db832dbc26deb3dd427bd5f6556cf0acac2c214fee", | ||||
|                 "sha256:f04066f68f5554911363063a30b108d2b5a5b1a010aa8b6132af78489fe3aade" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.6'", | ||||
|             "version": "==1.2.2" | ||||
|         }, | ||||
|         "traitlets": { | ||||
|             "hashes": [ | ||||
|                 "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7", | ||||
|                 "sha256:2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033" | ||||
|             ], | ||||
|             "markers": "python_version >= '3.7'", | ||||
|             "version": "==5.1.1" | ||||
|         }, | ||||
|         "typing-extensions": { | ||||
|             "hashes": [ | ||||
|                 "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e", | ||||
|                 "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7", | ||||
|                 "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34" | ||||
|             ], | ||||
|             "version": "==3.10.0.2" | ||||
|         }, | ||||
|         "wcwidth": { | ||||
|             "hashes": [ | ||||
|                 "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784", | ||||
|                 "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" | ||||
|             ], | ||||
|             "version": "==0.2.5" | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -1,8 +1,9 @@ | ||||
| # DSpace Statistics API [](https://ci.mjanja.ch/alanorth/dspace-statistics-api) [](https://builds.sr.ht/~alanorth/dspace-statistics-api?) | ||||
| # DSpace Statistics API [](https://ci.mjanja.ch/alanorth/dspace-statistics-api) [](https://github.com/ilri/dspace-statistics-api/actions/workflows/python-app.yml) | ||||
| DSpace stores item view and download events in a Solr "statistics" core. This information is available for use in the various DSpace user interfaces, but is not exposed externally via any APIs. The DSpace 4/5/6 [REST API](https://wiki.lyrasis.org/display/DSDOC5x/REST+API), for example, only exposes _metadata_ about communities, collections, items, and bitstreams. | ||||
|  | ||||
| - If your DSpace is version 4 or 5, use [dspace-statistics-api v1.1.1](https://github.com/ilri/dspace-statistics-api/releases/tag/v1.1.1) | ||||
| - If your DSpace is version 6+, use [dspace-statistics-api v1.2.0 or greater](https://github.com/ilri/dspace-statistics-api/releases/tag/v1.2.0) | ||||
|   - Please make sure your statistics have been migrated from integers to UUIDs with the [solr-upgrade-statistics-6x](https://wiki.lyrasis.org/display/DSDOC6x/SOLR+Statistics+Maintenance) command | ||||
|  | ||||
| This project contains an indexer and a [Falcon-based](https://falcon.readthedocs.io/) web application to make the item, community, and collection statistics available via a simple REST API. You can read more about the Solr queries used to gather the item view and download statistics on the [DSpace wiki](https://wiki.lyrasis.org/display/DSPACE/Solr). | ||||
|  | ||||
| @@ -119,7 +120,6 @@ The id is the *internal* UUID for an item, community, or collection. You can get | ||||
| - Use JSON in PostgreSQL | ||||
| - Add top items endpoint, perhaps `/top/items` or `/items/top`? | ||||
|   - Actually we could add `/items?limit=10&sort=views` | ||||
| - Add Swagger with OpenAPI 3.0.x with [falcon-swagger-ui](https://github.com/rdidyk/falcon-swagger-ui) | ||||
|  | ||||
| ## License | ||||
| This work is licensed under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html). | ||||
|   | ||||
| @@ -1,3 +1,5 @@ | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| import json | ||||
| import math | ||||
|  | ||||
| @@ -29,7 +31,7 @@ class RootResource: | ||||
|             "</html" | ||||
|         ) | ||||
|  | ||||
|         resp.body = docs_html | ||||
|         resp.text = docs_html | ||||
|  | ||||
|  | ||||
| class StatusResource: | ||||
| @@ -61,7 +63,7 @@ class OpenAPIJSONResource: | ||||
|             # Set the version in the schema so Swagger UI can display it | ||||
|             data["info"]["version"] = VERSION | ||||
|  | ||||
|             resp.body = json.dumps(data) | ||||
|             resp.text = json.dumps(data) | ||||
|  | ||||
|  | ||||
| class AllStatisticsResource: | ||||
| @@ -213,24 +215,24 @@ class SingleStatisticsResource: | ||||
|                     resp.media = statistics | ||||
|  | ||||
|  | ||||
| api = application = falcon.API() | ||||
| api.add_route("/", RootResource()) | ||||
| api.add_route("/status", StatusResource()) | ||||
| app = application = falcon.App() | ||||
| app.add_route("/", RootResource()) | ||||
| app.add_route("/status", StatusResource()) | ||||
|  | ||||
| # Item routes | ||||
| api.add_route("/items", AllStatisticsResource()) | ||||
| api.add_route("/item/{id_:uuid}", SingleStatisticsResource()) | ||||
| app.add_route("/items", AllStatisticsResource()) | ||||
| app.add_route("/item/{id_:uuid}", SingleStatisticsResource()) | ||||
|  | ||||
| # Community routes | ||||
| api.add_route("/communities", AllStatisticsResource()) | ||||
| api.add_route("/community/{id_:uuid}", SingleStatisticsResource()) | ||||
| app.add_route("/communities", AllStatisticsResource()) | ||||
| app.add_route("/community/{id_:uuid}", SingleStatisticsResource()) | ||||
|  | ||||
| # Collection routes | ||||
| api.add_route("/collections", AllStatisticsResource()) | ||||
| api.add_route("/collection/{id_:uuid}", SingleStatisticsResource()) | ||||
| app.add_route("/collections", AllStatisticsResource()) | ||||
| app.add_route("/collection/{id_:uuid}", SingleStatisticsResource()) | ||||
|  | ||||
| # Route to the Swagger UI OpenAPI schema | ||||
| api.add_route("/docs/openapi.json", OpenAPIJSONResource()) | ||||
| # Route to the Swagger UI Openapp schema | ||||
| app.add_route("/docs/openapi.json", OpenAPIJSONResource()) | ||||
|  | ||||
| # Path to host the Swagger UI. Keep in mind that Falcon will add a route for | ||||
| # this automatically when we register Swagger and the path will be relative | ||||
| @@ -240,12 +242,12 @@ SWAGGERUI_PATH = "/swagger" | ||||
| # The *absolute* path to the OpenJSON schema. This must be absolute because | ||||
| # it will be requested by the client and must resolve absolutely. Note: the | ||||
| # name of this variable is misleading because it is actually the schema URL | ||||
| # but we pass it into the register_swaggerui_app() function as the api_url | ||||
| # but we pass it into the register_swaggerui_app() function as the app_url | ||||
| # parameter. | ||||
| SWAGGERUI_API_URL = f"{DSPACE_STATISTICS_API_URL}/docs/openapi.json" | ||||
|  | ||||
| register_swaggerui_app( | ||||
|     api, | ||||
|     app, | ||||
|     SWAGGERUI_PATH, | ||||
|     SWAGGERUI_API_URL, | ||||
|     config={ | ||||
|   | ||||
| @@ -1,3 +1,5 @@ | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| import os | ||||
|  | ||||
| # Check if Solr connection information was provided in the environment | ||||
| @@ -16,6 +18,6 @@ DATABASE_PORT = os.environ.get("DATABASE_PORT", "5432") | ||||
| # the vanilla DSpace REST API. | ||||
| DSPACE_STATISTICS_API_URL = os.environ.get("DSPACE_STATISTICS_API_URL", "") | ||||
|  | ||||
| VERSION = "1.4.0" | ||||
| VERSION = "1.4.3-dev" | ||||
|  | ||||
| # vim: set sw=4 ts=4 expandtab: | ||||
|   | ||||
| @@ -1,3 +1,5 @@ | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| import falcon | ||||
| import psycopg2 | ||||
| import psycopg2.extras | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| { | ||||
|   "openapi": "3.0.3", | ||||
|   "info": { | ||||
|     "version": "1.4.0", | ||||
|     "version": "1.4.3-dev", | ||||
|     "title": "DSpace Statistics API", | ||||
|     "description": "A [Falcon-based](https://falcon.readthedocs.io/) web application to make DSpace's item, community, and collection statistics available via a simple REST API. This Swagger interface is powered by [falcon-swagger-ui](https://github.com/rdidyk/falcon-swagger-ui).", | ||||
|     "license": { | ||||
| @@ -613,4 +613,4 @@ | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -1,23 +1,7 @@ | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
| # | ||||
| # indexer.py | ||||
| # | ||||
| # Copyright 2018 Alan Orth. | ||||
| # | ||||
| # This program is free software: you can redistribute it and/or modify | ||||
| # it under the terms of the GNU General Public License as published by | ||||
| # the Free Software Foundation, either version 3 of the License, or | ||||
| # (at your option) any later version. | ||||
| # | ||||
| # This program is distributed in the hope that it will be useful, | ||||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
| # GNU General Public License for more details. | ||||
| # | ||||
| # You should have received a copy of the GNU General Public License | ||||
| # along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||
| # | ||||
| # --- | ||||
| # | ||||
| # Connects to a DSpace Solr statistics core and ingests views and downloads for | ||||
| # communities, collections, and items into a PostgreSQL database. | ||||
| # | ||||
| @@ -47,7 +31,7 @@ def index_views(indexType: str, facetField: str): | ||||
|     # | ||||
|     # see: https://lucene.apache.org/solr/guide/6_6/the-stats-component.html | ||||
|     solr_query_params = { | ||||
|         "q": "type:2", | ||||
|         "q": f"type:2 AND {facetField}:/.{{36}}/", | ||||
|         "fq": "-isBot:true AND statistics_type:view", | ||||
|         "fl": facetField, | ||||
|         "facet": "true", | ||||
| @@ -94,7 +78,7 @@ def index_views(indexType: str, facetField: str): | ||||
|                 ) | ||||
|  | ||||
|                 solr_query_params = { | ||||
|                     "q": "type:2", | ||||
|                     "q": f"type:2 AND {facetField}:/.{{36}}/", | ||||
|                     "fq": "-isBot:true AND statistics_type:view", | ||||
|                     "fl": facetField, | ||||
|                     "facet": "true", | ||||
| @@ -130,7 +114,7 @@ def index_views(indexType: str, facetField: str): | ||||
| def index_downloads(indexType: str, facetField: str): | ||||
|     # get the total number of distinct facets for items with at least 1 download | ||||
|     solr_query_params = { | ||||
|         "q": "type:0", | ||||
|         "q": f"type:0 AND {facetField}:/.{{36}}/", | ||||
|         "fq": "-isBot:true AND statistics_type:view AND bundleName:ORIGINAL", | ||||
|         "fl": facetField, | ||||
|         "facet": "true", | ||||
| @@ -176,7 +160,7 @@ def index_downloads(indexType: str, facetField: str): | ||||
|                 ) | ||||
|  | ||||
|                 solr_query_params = { | ||||
|                     "q": "type:0", | ||||
|                     "q": f"type:0 AND {facetField}:/.{{36}}/", | ||||
|                     "fq": "-isBot:true AND statistics_type:view AND bundleName:ORIGINAL", | ||||
|                     "fl": facetField, | ||||
|                     "facet": "true", | ||||
|   | ||||
| @@ -1,3 +1,5 @@ | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| import requests | ||||
|  | ||||
| from .config import SOLR_SERVER | ||||
|   | ||||
| @@ -1,3 +1,5 @@ | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| import datetime | ||||
| import json | ||||
| import re | ||||
|   | ||||
							
								
								
									
										799
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										799
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,6 +1,6 @@ | ||||
| [tool.poetry] | ||||
| name = "dspace-statistics-api" | ||||
| version = "1.4.0" | ||||
| version = "1.4.3-dev" | ||||
| description = "A simple REST API to expose Solr view and download statistics for items, communities, and collections in a DSpace repository." | ||||
| authors = ["Alan Orth <aorth@mjanja.ch>"] | ||||
| license = "GPL-3.0-only" | ||||
| @@ -8,17 +8,17 @@ license = "GPL-3.0-only" | ||||
| [tool.poetry.dependencies] | ||||
| python = "^3.6" | ||||
| gunicorn = "^20.0.4" | ||||
| falcon = "^2.0.0" | ||||
| psycopg2-binary = "^2.8.6" | ||||
| falcon = "3.0.0" | ||||
| psycopg2 = "^2.9.1" | ||||
| requests = "^2.24.0" | ||||
| falcon-swagger-ui = {git = "https://github.com/alanorth/falcon-swagger-ui.git"} | ||||
| falcon-swagger-ui = {git = "https://github.com/alanorth/falcon-swagger-ui.git", rev="falcon3-update-swagger-ui"} | ||||
|  | ||||
| [tool.poetry.dev-dependencies] | ||||
| ipython = { version = "^7.18.1", python = "^3.7" } | ||||
| flake8 = "^3.8.4" | ||||
| pytest = "^6.1.1" | ||||
| isort = "^5.5.4" | ||||
| black = "^20.8b1" | ||||
| black = {version = "^21.6b0", python = ">=3.6.2"} | ||||
| isort = {version = "^5.9.1", python = ">=3.6.1"} | ||||
|  | ||||
| [build-system] | ||||
| requires = ["poetry>=0.12"] | ||||
|   | ||||
| @@ -1,51 +1,57 @@ | ||||
| appdirs==1.4.4 | ||||
| appnope==0.1.2; python_version >= "3.7" and python_version < "4.0" and sys_platform == "darwin" | ||||
| atomicwrites==1.4.0; sys_platform == "win32" | ||||
| attrs==20.3.0 | ||||
| backcall==0.2.0; python_version >= "3.7" and python_version < "4.0" | ||||
| black==20.8b1 | ||||
| certifi==2020.12.5 | ||||
| chardet==4.0.0 | ||||
| click==7.1.2 | ||||
| colorama==0.4.4; python_version >= "3.7" and python_version < "4.0" and sys_platform == "win32" or sys_platform == "win32" | ||||
| dataclasses==0.6; python_version < "3.7" | ||||
| decorator==4.4.2; python_version >= "3.7" and python_version < "4.0" | ||||
| falcon==2.0.0 | ||||
| -e git+https://github.com/alanorth/falcon-swagger-ui.git@a44244c85dceccfcd249b62fea4ee82a8221e3d2#egg=falcon-swagger-ui | ||||
| flake8==3.8.4 | ||||
| gunicorn==20.0.4 | ||||
| idna==2.10 | ||||
| importlib-metadata==3.3.0; python_version < "3.8" | ||||
| # | ||||
| # These requirements were autogenerated by pipenv | ||||
| # To regenerate from the project's Pipfile, run: | ||||
| # | ||||
| #    pipenv lock --requirements --dev | ||||
| # | ||||
|  | ||||
| # Note: in pipenv 2020.x, "--dev" changed to emit both default and development | ||||
| # requirements. To emit only development requirements, pass "--dev-only". | ||||
|  | ||||
| -i https://pypi.org/simple | ||||
| -e git+https://github.com/alanorth/falcon-swagger-ui.git@c019c270b479c03d9276e20fd95488495b0943f6#egg=falcon-swagger-ui | ||||
| attrs==21.2.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' | ||||
| backcall==0.2.0 | ||||
| black==21.10b0 | ||||
| certifi==2021.10.8 | ||||
| charset-normalizer==2.0.7; python_version >= '3' | ||||
| click==8.0.3; python_version >= '3.6' | ||||
| decorator==5.1.0; python_version >= '3.5' | ||||
| falcon==3.0.1 | ||||
| flake8==4.0.1 | ||||
| gunicorn==20.1.0 | ||||
| idna==3.3; python_version >= '3' | ||||
| iniconfig==1.1.1 | ||||
| ipython==7.19.0; python_version >= "3.7" and python_version < "4.0" | ||||
| ipython-genutils==0.2.0; python_version >= "3.7" and python_version < "4.0" | ||||
| isort==5.6.4 | ||||
| jedi==0.17.2; python_version >= "3.7" and python_version < "4.0" | ||||
| jinja2==2.11.2 | ||||
| markupsafe==1.1.1 | ||||
| ipython==7.29.0 | ||||
| isort==5.10.1 | ||||
| jedi==0.18.0; python_version >= '3.6' | ||||
| jinja2==3.0.3; python_version >= '3.6' | ||||
| markupsafe==2.0.1; python_version >= '3.6' | ||||
| matplotlib-inline==0.1.3; python_version >= '3.5' | ||||
| mccabe==0.6.1 | ||||
| mypy-extensions==0.4.3 | ||||
| packaging==20.8 | ||||
| parso==0.7.1; python_version >= "3.7" and python_version < "4.0" | ||||
| pathspec==0.8.1 | ||||
| pexpect==4.8.0; python_version >= "3.7" and python_version < "4.0" and sys_platform != "win32" | ||||
| pickleshare==0.7.5; python_version >= "3.7" and python_version < "4.0" | ||||
| pluggy==0.13.1 | ||||
| prompt-toolkit==3.0.8; python_version >= "3.7" and python_version < "4.0" | ||||
| psycopg2-binary==2.8.6 | ||||
| ptyprocess==0.6.0; python_version >= "3.7" and python_version < "4.0" and sys_platform != "win32" | ||||
| py==1.10.0 | ||||
| pycodestyle==2.6.0 | ||||
| pyflakes==2.2.0 | ||||
| pygments==2.7.3; python_version >= "3.7" and python_version < "4.0" | ||||
| pyparsing==2.4.7 | ||||
| pytest==6.2.1 | ||||
| regex==2020.11.13 | ||||
| requests==2.25.1 | ||||
| toml==0.10.2 | ||||
| traitlets==5.0.5; python_version >= "3.7" and python_version < "4.0" | ||||
| typed-ast==1.4.1 | ||||
| typing-extensions==3.7.4.3 | ||||
| urllib3==1.26.2 | ||||
| wcwidth==0.2.5; python_version >= "3.7" and python_version < "4.0" | ||||
| zipp==3.4.0; python_version < "3.8" | ||||
| packaging==21.2; python_version >= '3.6' | ||||
| parso==0.8.2; python_version >= '3.6' | ||||
| pathspec==0.9.0 | ||||
| pexpect==4.8.0; sys_platform != 'win32' | ||||
| pickleshare==0.7.5 | ||||
| platformdirs==2.4.0; python_version >= '3.6' | ||||
| pluggy==1.0.0; python_version >= '3.6' | ||||
| prompt-toolkit==3.0.22; python_full_version >= '3.6.2' | ||||
| psycopg2==2.9.1 | ||||
| ptyprocess==0.7.0 | ||||
| py==1.11.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' | ||||
| pycodestyle==2.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' | ||||
| pyflakes==2.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' | ||||
| pygments==2.10.0; python_version >= '3.5' | ||||
| pyparsing==2.4.7; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' | ||||
| pytest==6.2.5 | ||||
| regex==2021.11.9 | ||||
| requests==2.26.0 | ||||
| setuptools==58.5.3; python_version >= '3.6' | ||||
| toml==0.10.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' | ||||
| tomli==1.2.2; python_version >= '3.6' | ||||
| traitlets==5.1.1; python_version >= '3.7' | ||||
| typing-extensions==3.10.0.2 | ||||
| urllib3==1.26.7; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4' | ||||
| wcwidth==0.2.5 | ||||
|   | ||||
| @@ -1,11 +1,20 @@ | ||||
| certifi==2020.12.5 | ||||
| chardet==4.0.0 | ||||
| falcon==2.0.0 | ||||
| -e git+https://github.com/alanorth/falcon-swagger-ui.git@a44244c85dceccfcd249b62fea4ee82a8221e3d2#egg=falcon-swagger-ui | ||||
| gunicorn==20.0.4 | ||||
| idna==2.10 | ||||
| jinja2==2.11.2 | ||||
| markupsafe==1.1.1 | ||||
| psycopg2-binary==2.8.6 | ||||
| requests==2.25.1 | ||||
| urllib3==1.26.2 | ||||
| # | ||||
| # These requirements were autogenerated by pipenv | ||||
| # To regenerate from the project's Pipfile, run: | ||||
| # | ||||
| #    pipenv lock --requirements | ||||
| # | ||||
|  | ||||
| -i https://pypi.org/simple | ||||
| -e git+https://github.com/alanorth/falcon-swagger-ui.git@c019c270b479c03d9276e20fd95488495b0943f6#egg=falcon-swagger-ui | ||||
| certifi==2021.10.8 | ||||
| charset-normalizer==2.0.7; python_version >= '3' | ||||
| falcon==3.0.1 | ||||
| gunicorn==20.1.0 | ||||
| idna==3.3; python_version >= '3' | ||||
| jinja2==3.0.3; python_version >= '3.6' | ||||
| markupsafe==2.0.1; python_version >= '3.6' | ||||
| psycopg2==2.9.1 | ||||
| requests==2.26.0 | ||||
| setuptools==58.5.3; python_version >= '3.6' | ||||
| urllib3==1.26.7; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4' | ||||
|   | ||||
| @@ -1,14 +1,17 @@ | ||||
| from falcon import testing | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| import json | ||||
| import pytest | ||||
| from unittest.mock import patch | ||||
|  | ||||
| from dspace_statistics_api.app import api | ||||
| import pytest | ||||
| from falcon import testing | ||||
|  | ||||
| from dspace_statistics_api.app import app | ||||
|  | ||||
|  | ||||
| @pytest.fixture | ||||
| def client(): | ||||
|     return testing.TestClient(api) | ||||
|     return testing.TestClient(app) | ||||
|  | ||||
|  | ||||
| def test_get_collection(client): | ||||
| @@ -309,7 +312,7 @@ def test_post_collections_valid_page(client): | ||||
|     assert response.status_code == 200 | ||||
|     assert response.json["limit"] == 100 | ||||
|     assert response.json["currentPage"] == 0 | ||||
|     assert response.json["totalPages"] == 0 | ||||
|     assert response.json["totalPages"] == 1 | ||||
|     assert len(response.json["statistics"]) == 2 | ||||
|     assert isinstance(response.json["statistics"][0]["views"], int) | ||||
|     assert isinstance(response.json["statistics"][0]["downloads"], int) | ||||
|   | ||||
| @@ -1,14 +1,17 @@ | ||||
| from falcon import testing | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| import json | ||||
| import pytest | ||||
| from unittest.mock import patch | ||||
|  | ||||
| from dspace_statistics_api.app import api | ||||
| import pytest | ||||
| from falcon import testing | ||||
|  | ||||
| from dspace_statistics_api.app import app | ||||
|  | ||||
|  | ||||
| @pytest.fixture | ||||
| def client(): | ||||
|     return testing.TestClient(api) | ||||
|     return testing.TestClient(app) | ||||
|  | ||||
|  | ||||
| def test_get_community(client): | ||||
| @@ -309,7 +312,7 @@ def test_post_communities_valid_page(client): | ||||
|     assert response.status_code == 200 | ||||
|     assert response.json["limit"] == 100 | ||||
|     assert response.json["currentPage"] == 0 | ||||
|     assert response.json["totalPages"] == 0 | ||||
|     assert response.json["totalPages"] == 1 | ||||
|     assert len(response.json["statistics"]) == 2 | ||||
|     assert isinstance(response.json["statistics"][0]["views"], int) | ||||
|     assert isinstance(response.json["statistics"][0]["downloads"], int) | ||||
|   | ||||
| @@ -1,12 +1,14 @@ | ||||
| from falcon import testing | ||||
| import pytest | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| from dspace_statistics_api.app import api | ||||
| import pytest | ||||
| from falcon import testing | ||||
|  | ||||
| from dspace_statistics_api.app import app | ||||
|  | ||||
|  | ||||
| @pytest.fixture | ||||
| def client(): | ||||
|     return testing.TestClient(api) | ||||
|     return testing.TestClient(app) | ||||
|  | ||||
|  | ||||
| def test_get_docs(client): | ||||
|   | ||||
| @@ -1,14 +1,17 @@ | ||||
| from falcon import testing | ||||
| # SPDX-License-Identifier: GPL-3.0-only | ||||
|  | ||||
| import json | ||||
| import pytest | ||||
| from unittest.mock import patch | ||||
|  | ||||
| from dspace_statistics_api.app import api | ||||
| import pytest | ||||
| from falcon import testing | ||||
|  | ||||
| from dspace_statistics_api.app import app | ||||
|  | ||||
|  | ||||
| @pytest.fixture | ||||
| def client(): | ||||
|     return testing.TestClient(api) | ||||
|     return testing.TestClient(app) | ||||
|  | ||||
|  | ||||
| def test_get_item(client): | ||||
| @@ -309,7 +312,7 @@ def test_post_items_valid_page(client): | ||||
|     assert response.status_code == 200 | ||||
|     assert response.json["limit"] == 100 | ||||
|     assert response.json["currentPage"] == 0 | ||||
|     assert response.json["totalPages"] == 0 | ||||
|     assert response.json["totalPages"] == 1 | ||||
|     assert len(response.json["statistics"]) == 2 | ||||
|     assert isinstance(response.json["statistics"][0]["views"], int) | ||||
|     assert isinstance(response.json["statistics"][0]["downloads"], int) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user