deepsights-api 1.2.1__tar.gz → 1.2.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 (85) hide show
  1. deepsights_api-1.2.2/.github/workflows/build_docs.yml +49 -0
  2. deepsights_api-1.2.2/.github/workflows/run_pylint.yml +24 -0
  3. deepsights_api-1.2.2/.github/workflows/run_tests.yml +35 -0
  4. deepsights_api-1.2.2/.gitignore +167 -0
  5. deepsights_api-1.2.2/.pylintrc +643 -0
  6. deepsights_api-1.2.2/.python-version +1 -0
  7. deepsights_api-1.2.2/.vscode/settings.json +7 -0
  8. deepsights_api-1.2.2/CHANGELOG.md +63 -0
  9. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/PKG-INFO +16 -11
  10. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/utils/model.py +10 -2
  11. deepsights_api-1.2.2/docs/.gitkeep +0 -0
  12. deepsights_api-1.2.2/main.py +119 -0
  13. deepsights_api-1.2.2/pyproject.toml +51 -0
  14. deepsights_api-1.2.1/deepsights_api.egg-info/requires.txt → deepsights_api-1.2.2/requirements.txt +1 -1
  15. deepsights_api-1.2.2/setup.py +19 -0
  16. deepsights_api-1.2.2/tests/contentstore/test_news_search.py +538 -0
  17. deepsights_api-1.2.2/tests/contentstore/test_secondary_search.py +527 -0
  18. deepsights_api-1.2.2/tests/data/test_data.json +1546 -0
  19. deepsights_api-1.2.2/tests/data/test_presentation.pdf +0 -0
  20. deepsights_api-1.2.2/tests/data/test_text.txt +1 -0
  21. deepsights_api-1.2.2/tests/deepsights/identity/test_mip_identity.py +50 -0
  22. deepsights_api-1.2.2/tests/deepsights/quota/test_quota.py +70 -0
  23. deepsights_api-1.2.2/tests/deepsights/userclient/test_userclient.py +49 -0
  24. deepsights_api-1.2.2/tests/documentstore/test_download.py +75 -0
  25. deepsights_api-1.2.2/tests/documentstore/test_lifecycle.py +108 -0
  26. deepsights_api-1.2.2/tests/documentstore/test_list.py +40 -0
  27. deepsights_api-1.2.2/tests/documentstore/test_load.py +140 -0
  28. deepsights_api-1.2.2/tests/documentstore/test_search.py +188 -0
  29. deepsights_api-1.2.2/tests/userclient/answersV2/test_answersV2.py +123 -0
  30. deepsights_api-1.2.2/tests/userclient/reports/test_reports.py +100 -0
  31. deepsights_api-1.2.2/uv.lock +248 -0
  32. deepsights_api-1.2.1/deepsights_api.egg-info/PKG-INFO +0 -126
  33. deepsights_api-1.2.1/deepsights_api.egg-info/SOURCES.txt +0 -55
  34. deepsights_api-1.2.1/deepsights_api.egg-info/dependency_links.txt +0 -1
  35. deepsights_api-1.2.1/deepsights_api.egg-info/top_level.txt +0 -1
  36. deepsights_api-1.2.1/setup.cfg +0 -4
  37. deepsights_api-1.2.1/setup.py +0 -58
  38. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/LICENSE +0 -0
  39. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/README.md +0 -0
  40. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/__init__.py +0 -0
  41. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/api/__init__.py +0 -0
  42. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/api/api.py +0 -0
  43. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/api/resource.py +0 -0
  44. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/contentstore/__init__.py +0 -0
  45. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/contentstore/contentstore.py +0 -0
  46. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/contentstore/resources/__init__.py +0 -0
  47. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/contentstore/resources/_model.py +0 -0
  48. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/contentstore/resources/_search.py +0 -0
  49. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/contentstore/resources/news.py +0 -0
  50. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/contentstore/resources/secondary.py +0 -0
  51. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/deepsights/__init__.py +0 -0
  52. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/deepsights/_mip_identity.py +0 -0
  53. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/deepsights/deepsights.py +0 -0
  54. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/deepsights/resources/__init__.py +0 -0
  55. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/deepsights/resources/quota/__init__.py +0 -0
  56. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/deepsights/resources/quota/_model.py +0 -0
  57. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/deepsights/resources/quota/quota.py +0 -0
  58. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/__init__.py +0 -0
  59. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/documentstore.py +0 -0
  60. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/__init__.py +0 -0
  61. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/__init__.py +0 -0
  62. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_cache.py +0 -0
  63. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_delete.py +0 -0
  64. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_download.py +0 -0
  65. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_list.py +0 -0
  66. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_load.py +0 -0
  67. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_model.py +0 -0
  68. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_search.py +0 -0
  69. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_segmenter.py +0 -0
  70. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/_upload.py +0 -0
  71. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/documentstore/resources/documents/documents.py +0 -0
  72. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/__init__.py +0 -0
  73. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/resources/__init__.py +0 -0
  74. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/resources/_model.py +0 -0
  75. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/resources/answersV2/__init__.py +0 -0
  76. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/resources/answersV2/_model.py +0 -0
  77. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/resources/answersV2/answerV2.py +0 -0
  78. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/resources/reports/__init__.py +0 -0
  79. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/resources/reports/_model.py +0 -0
  80. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/resources/reports/report.py +0 -0
  81. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/userclient/userclient.py +0 -0
  82. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/utils/__init__.py +0 -0
  83. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/utils/_cache.py +0 -0
  84. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/utils/_ranking.py +0 -0
  85. {deepsights_api-1.2.1 → deepsights_api-1.2.2}/deepsights/utils/_utils.py +0 -0
@@ -0,0 +1,49 @@
1
+ name: deepsights-generate-docs
2
+
3
+ # build the documentation whenever there are new commits on main
4
+ on:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ # security: restrict permissions for CI jobs.
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ # Build the documentation and upload the static HTML files as an artifact.
15
+ build:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: actions/setup-python@v5
20
+ with:
21
+ python-version: '3.12'
22
+
23
+ # install all dependencies (including pdoc)
24
+ - run: |
25
+ python -m pip install --upgrade pip
26
+ pip install uv
27
+ uv pip install --system ".[docs]"
28
+
29
+ # build documentation into docs/
30
+ - run: pdoc -o docs/ deepsights
31
+
32
+ - uses: actions/upload-pages-artifact@v3
33
+ with:
34
+ path: docs/
35
+
36
+ # Deploy the artifact to GitHub pages.
37
+ # This is a separate job so that only actions/deploy-pages has the necessary permissions.
38
+ deploy:
39
+ needs: build
40
+ runs-on: ubuntu-latest
41
+ permissions:
42
+ pages: write
43
+ id-token: write
44
+ environment:
45
+ name: github-pages
46
+ url: ${{ steps.deployment.outputs.page_url }}
47
+ steps:
48
+ - id: deployment
49
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,24 @@
1
+ name: deepsights-pylint
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ python-version: ["3.10", "3.11", "3.12"]
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - name: Set up Python ${{ matrix.python-version }}
14
+ uses: actions/setup-python@v5
15
+ with:
16
+ python-version: ${{ matrix.python-version }}
17
+ - name: Install dependencies
18
+ run: |
19
+ python -m pip install --upgrade pip
20
+ pip install uv
21
+ uv pip install --system ".[lint]"
22
+ - name: Analysing the code with pylint
23
+ run: |
24
+ pylint $(git ls-files '*.py')
@@ -0,0 +1,35 @@
1
+ name: deepsights-run-tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.10", "3.11", "3.12"]
13
+
14
+ env:
15
+ PYTHONPATH: ${{ github.workspace }}
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ pip install uv
27
+ uv pip install --system ".[test]"
28
+ - name: Test with pytest
29
+ env:
30
+ DEEPSIGHTS_API_KEY: ${{ secrets.DEEPSIGHTS_API_KEY }}
31
+ CONTENTSTORE_API_KEY: ${{ secrets.CONTENTSTORE_API_KEY }}
32
+ MIP_API_KEY: ${{ secrets.MIP_API_KEY }}
33
+ MIP_IDENTITY_VALID_EMAIL: ${{ secrets.MIP_IDENTITY_VALID_EMAIL }}
34
+ run: |
35
+ pytest
@@ -0,0 +1,167 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+
5
+ # C extensions
6
+ *.so
7
+
8
+ # Distribution / packaging
9
+ .Python
10
+ build/
11
+ develop-eggs/
12
+ dist/
13
+ downloads/
14
+ eggs/
15
+ .eggs/
16
+ lib/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ share/python-wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .nox/
42
+ .coverage
43
+ .coverage.*
44
+ .cache
45
+ nosetests.xml
46
+ coverage.xml
47
+ *.cover
48
+ *.py,cover
49
+ .hypothesis/
50
+ .pytest_cache/
51
+ cover/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+ db.sqlite3
61
+ db.sqlite3-journal
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ .pybuilder/
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ # For a library or package, you might want to ignore these files since the code is
86
+ # intended to run in multiple environments; otherwise, check them in:
87
+ # .python-version
88
+
89
+ # pipenv
90
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
92
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
93
+ # install all needed dependencies.
94
+ #Pipfile.lock
95
+
96
+ # poetry
97
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
98
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
99
+ # commonly ignored for libraries.
100
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
101
+ #poetry.lock
102
+
103
+ # pdm
104
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
105
+ #pdm.lock
106
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
107
+ # in version control.
108
+ # https://pdm.fming.dev/#use-with-ide
109
+ .pdm.toml
110
+
111
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
112
+ __pypackages__/
113
+
114
+ # Celery stuff
115
+ celerybeat-schedule
116
+ celerybeat.pid
117
+
118
+ # SageMath parsed files
119
+ *.sage.py
120
+
121
+ # Environments
122
+ .env
123
+ .venv
124
+ env/
125
+ venv/
126
+ ENV/
127
+ env.bak/
128
+ venv.bak/
129
+
130
+ # Spyder project settings
131
+ .spyderproject
132
+ .spyproject
133
+
134
+ # Rope project settings
135
+ .ropeproject
136
+
137
+ # mkdocs documentation
138
+ /site
139
+
140
+ # mypy
141
+ .mypy_cache/
142
+ .dmypy.json
143
+ dmypy.json
144
+
145
+ # Pyre type checker
146
+ .pyre/
147
+
148
+ # pytype static type analyzer
149
+ .pytype/
150
+
151
+ # Cython debug symbols
152
+ cython_debug/
153
+
154
+ # PyCharm
155
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
156
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
157
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
158
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
159
+ #.idea/
160
+
161
+ # Mac
162
+ .DS_Store
163
+ .env
164
+ .vscode/launch.json
165
+ docs/*
166
+ !docs/.gitkeep
167
+ todo.txt