fuzzylink-py 0.1.0__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 (32) hide show
  1. fuzzylink_py-0.1.0/.github/FUNDING.yml +1 -0
  2. fuzzylink_py-0.1.0/.github/dependabot.yml +11 -0
  3. fuzzylink_py-0.1.0/.github/release.yml +5 -0
  4. fuzzylink_py-0.1.0/.github/workflows/ci.yml +137 -0
  5. fuzzylink_py-0.1.0/.github/workflows/coverage.yml +35 -0
  6. fuzzylink_py-0.1.0/.gitignore +205 -0
  7. fuzzylink_py-0.1.0/.pre-commit-config.yaml +51 -0
  8. fuzzylink_py-0.1.0/LICENSE +21 -0
  9. fuzzylink_py-0.1.0/PKG-INFO +259 -0
  10. fuzzylink_py-0.1.0/README.md +234 -0
  11. fuzzylink_py-0.1.0/docs/assets/coverage.svg +21 -0
  12. fuzzylink_py-0.1.0/docs/assets/css/extra.css +6 -0
  13. fuzzylink_py-0.1.0/docs/assets/img/logo.png +0 -0
  14. fuzzylink_py-0.1.0/docs/differences.md +18 -0
  15. fuzzylink_py-0.1.0/docs/index.md +228 -0
  16. fuzzylink_py-0.1.0/mkdocs.yml +68 -0
  17. fuzzylink_py-0.1.0/noxfile.py +31 -0
  18. fuzzylink_py-0.1.0/pyproject.toml +72 -0
  19. fuzzylink_py-0.1.0/src/fuzzylink/__init__.py +2 -0
  20. fuzzylink_py-0.1.0/src/fuzzylink/fuzzylink.py +1541 -0
  21. fuzzylink_py-0.1.0/src/fuzzylink/requests.py +492 -0
  22. fuzzylink_py-0.1.0/tests/__init__.py +0 -0
  23. fuzzylink_py-0.1.0/tests/data/test_embeddings.json +3356 -0
  24. fuzzylink_py-0.1.0/tests/data/test_llm_labels.json +108 -0
  25. fuzzylink_py-0.1.0/tests/dev_tests/test_error_handling.py +350 -0
  26. fuzzylink_py-0.1.0/tests/dev_tests/test_fuzzylink.py +378 -0
  27. fuzzylink_py-0.1.0/tests/dev_tests/test_with_big_data.py +634 -0
  28. fuzzylink_py-0.1.0/tests/test_fuzzylink.py +556 -0
  29. fuzzylink_py-0.1.0/tests/test_helper_functions.py +758 -0
  30. fuzzylink_py-0.1.0/tests/test_init.py +222 -0
  31. fuzzylink_py-0.1.0/tests/test_requests.py +1118 -0
  32. fuzzylink_py-0.1.0/uv.lock +2082 -0
@@ -0,0 +1 @@
1
+ # open_collective: blackfish
@@ -0,0 +1,11 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: github-actions
5
+ directory: "/"
6
+ schedule:
7
+ interval: weekly
8
+ groups:
9
+ actions:
10
+ patterns:
11
+ - "*"
@@ -0,0 +1,5 @@
1
+ changelog:
2
+ exclude:
3
+ authors:
4
+ - dependabot
5
+ - pre-commit-ci
@@ -0,0 +1,137 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches: ["main"]
5
+ tags: [ 'v*.*.*' ]
6
+ pull_request:
7
+ branches: ["main"]
8
+ env:
9
+ FORCE_COLOR: "1"
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+ permissions:
14
+ contents: write
15
+ jobs:
16
+
17
+ lint:
18
+ name: Lint code 🧹
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: wntrblm/nox@main
23
+ - name: Set up Python 3.x
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.x"
27
+ - name: Install Project
28
+ run: |
29
+ python -m pip install --disable-pip-version-check .
30
+ - name: Lint
31
+ run: nox --non-interactive --error-on-missing-interpreters --session "lint"
32
+
33
+ tests:
34
+ name: Run tests 🧪
35
+ runs-on: ${{ matrix.os }}
36
+ strategy:
37
+ matrix:
38
+ os: [ubuntu-latest, macos-latest]
39
+ python-version: ["3.12", "3.13"]
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - uses: wntrblm/nox@main
43
+ - name: Set up Python ${{ matrix.python-version }}
44
+ uses: actions/setup-python@v5
45
+ with:
46
+ python-version: ${{ matrix.python-version }}
47
+ - name: Install Project
48
+ run: |
49
+ python -m pip install --disable-pip-version-check .
50
+ - name: Run tests on ${{ matrix.os }}
51
+ run: nox --non-interactive --error-on-missing-interpreters --session "tests-${{ matrix.python-version }}" -- --full-trace
52
+
53
+ docs-preview:
54
+ name: Preview documentation 📖
55
+ runs-on: ubuntu-latest
56
+ if: github.event_name == 'pull_request'
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ - name: Configure Git Credentials
60
+ run: |
61
+ git config user.name github-actions[bot]
62
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
63
+ - name: Checkout PR branch
64
+ run: |
65
+ git fetch origin
66
+ git checkout ${{ github.event.pull_request.head.ref }}
67
+ - uses: actions/setup-python@v5
68
+ with:
69
+ python-version: 3.x
70
+ - run: pip install mkdocs-material mkdocstrings 'mkdocstrings[python]' mkdocs-swagger-ui-tag mike
71
+ - name: Build and deploy documentation
72
+ run: mike deploy --push --allow-empty --deploy-prefix pr-preview pr-${{ github.event.number }} --message "Deploying docs preview for PR ${{ github.event.number }} 🛫"
73
+
74
+ docs:
75
+ name: Deploy documentation 📚
76
+ runs-on: ubuntu-latest
77
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
78
+ steps:
79
+ - uses: actions/checkout@v4
80
+ - name: Configure Git Credentials
81
+ run: |
82
+ git config user.name github-actions[bot]
83
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
84
+ - name: Checkout merge branch
85
+ run: |
86
+ git fetch origin
87
+ git checkout ${{ github.ref_name }}
88
+ - uses: actions/setup-python@v5
89
+ with:
90
+ python-version: 3.x
91
+ - run: pip install mkdocs-material mkdocstrings 'mkdocstrings[python]' mkdocs-swagger-ui-tag mike
92
+ - name: Build and deploy documentation
93
+ run: mike deploy --push --update-aliases --allow-empty ${{ github.ref_name }} latest --message "Deploying docs version ${{ github.ref_name }} 🛫"
94
+
95
+ build:
96
+ name: Build distribution 📦
97
+ runs-on: ubuntu-latest
98
+
99
+ steps:
100
+ - uses: actions/checkout@v4
101
+ with:
102
+ persist-credentials: false
103
+ - name: Set up Python 3.x
104
+ uses: actions/setup-python@v5
105
+ with:
106
+ python-version: 3.x
107
+ - name: Install uv (latest)
108
+ uses: astral-sh/setup-uv@v6
109
+ - name: Build wheel
110
+ run: uv build
111
+ - name: Store distribution packages
112
+ uses: actions/upload-artifact@v4
113
+ with:
114
+ name: python-package-distributions
115
+ path: dist/
116
+
117
+ publish:
118
+ name: Publish to PyPI 🎉
119
+ needs: build
120
+ runs-on: ubuntu-latest
121
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
122
+ environment:
123
+ name: pypi
124
+ url: https://pypi.org/p/${{ github.repository }}
125
+ permissions:
126
+ id-token: write
127
+
128
+ steps:
129
+ - name: Download distributions
130
+ uses: actions/download-artifact@v4
131
+ with:
132
+ name: python-package-distributions
133
+ path: dist/
134
+ - name: Publish distributions to PyPI
135
+ uses: pypa/gh-action-pypi-publish@release/v1
136
+ with:
137
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,35 @@
1
+ name: Test Coverage
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+ permissions:
11
+ contents: write
12
+ jobs:
13
+ coverage:
14
+ name: Test Coverage
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python 3.x
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.x"
22
+ - name: Install project
23
+ run: |
24
+ python -m pip install --disable-pip-version-check .
25
+ - name: Install dependencies
26
+ run: pip install pytest pytest-cov coverage-badge setuptools==69.0.3
27
+ - name: Test and coverage
28
+ run: python -m pytest --cov --cov-report json
29
+ - name: Generate badge
30
+ run: coverage-badge -f -o docs/assets/coverage.svg
31
+ - name: Commit and push badge
32
+ uses: EndBug/add-and-commit@v9
33
+ with:
34
+ add: 'docs/assets/coverage.svg'
35
+ message: 'Update coverage badge'
@@ -0,0 +1,205 @@
1
+ *.txt
2
+ *.RData
3
+ *.DS_Store
4
+ *.Rhistory
5
+ Ceda_and_l2_embeddings.json
6
+ tests/data/Ceda_and_l2_llm_labels.json
7
+ tests/data/CHANGES_R_ALIGNMENT.md
8
+ tests/data/Ceda_and_l2_llm_labels_test_budget_growth.json
9
+ tests/data/rate_limiting_explanation.md
10
+ tests/data/Ceda_and_l2_llm_labels_new_format.json
11
+
12
+ # Byte-compiled / optimized / DLL files
13
+ __pycache__/
14
+ *.py[cod]
15
+ *$py.class
16
+
17
+ # C extensions
18
+ *.so
19
+
20
+ # Distribution / packaging
21
+ .Python
22
+ build/
23
+ develop-eggs/
24
+ dist/
25
+ downloads/
26
+ eggs/
27
+ .eggs/
28
+ lib/
29
+ lib64/
30
+ parts/
31
+ sdist/
32
+ var/
33
+ wheels/
34
+ share/python-wheels/
35
+ *.egg-info/
36
+ .installed.cfg
37
+ *.egg
38
+ MANIFEST
39
+
40
+ # PyInstaller
41
+ # Usually these files are written by a python script from a template
42
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
43
+ *.manifest
44
+ *.spec
45
+
46
+ # Installer logs
47
+ pip-log.txt
48
+ pip-delete-this-directory.txt
49
+
50
+ # Unit test / coverage reports
51
+ htmlcov/
52
+ .tox/
53
+ .nox/
54
+ .coverage
55
+ .coverage.*
56
+ .cache
57
+ nosetests.xml
58
+ coverage.xml
59
+ *.cover
60
+ *.py,cover
61
+ .hypothesis/
62
+ .pytest_cache/
63
+ cover/
64
+
65
+ # Translations
66
+ *.mo
67
+ *.pot
68
+
69
+ # Django stuff:
70
+ *.log
71
+ local_settings.py
72
+ db.sqlite3
73
+ db.sqlite3-journal
74
+
75
+ # Flask stuff:
76
+ instance/
77
+ .webassets-cache
78
+
79
+ # Scrapy stuff:
80
+ .scrapy
81
+
82
+ # Sphinx documentation
83
+ docs/_build/
84
+
85
+ # PyBuilder
86
+ .pybuilder/
87
+ target/
88
+
89
+ # Jupyter Notebook
90
+ .ipynb_checkpoints
91
+
92
+ # IPython
93
+ profile_default/
94
+ ipython_config.py
95
+
96
+ # pyenv
97
+ # For a library or package, you might want to ignore these files since the code is
98
+ # intended to run in multiple environments; otherwise, check them in:
99
+ # .python-version
100
+
101
+ # pipenv
102
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
103
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
104
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
105
+ # install all needed dependencies.
106
+ #Pipfile.lock
107
+
108
+ # UV
109
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
110
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
111
+ # commonly ignored for libraries.
112
+ #uv.lock
113
+
114
+ # poetry
115
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
116
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
117
+ # commonly ignored for libraries.
118
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
119
+ #poetry.lock
120
+
121
+ # pdm
122
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
123
+ #pdm.lock
124
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
125
+ # in version control.
126
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
127
+ .pdm.toml
128
+ .pdm-python
129
+ .pdm-build/
130
+
131
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
132
+ __pypackages__/
133
+
134
+ # Celery stuff
135
+ celerybeat-schedule
136
+ celerybeat.pid
137
+
138
+ # SageMath parsed files
139
+ *.sage.py
140
+
141
+ # Environments
142
+ .env
143
+ .venv
144
+ env/
145
+ venv/
146
+ ENV/
147
+ env.bak/
148
+ venv.bak/
149
+
150
+ # Spyder project settings
151
+ .spyderproject
152
+ .spyproject
153
+
154
+ # Rope project settings
155
+ .ropeproject
156
+
157
+ # mkdocs documentation
158
+ /site
159
+
160
+ # mypy
161
+ .mypy_cache/
162
+ .dmypy.json
163
+ dmypy.json
164
+
165
+ # Pyre type checker
166
+ .pyre/
167
+
168
+ # pytype static type analyzer
169
+ .pytype/
170
+
171
+ # Cython debug symbols
172
+ cython_debug/
173
+
174
+ # PyCharm
175
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
176
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
177
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
178
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
179
+ #.idea/
180
+
181
+ # Abstra
182
+ # Abstra is an AI-powered process automation framework.
183
+ # Ignore directories containing user credentials, local state, and settings.
184
+ # Learn more at https://abstra.io/docs
185
+ .abstra/
186
+
187
+ # Visual Studio Code
188
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
189
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
190
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
191
+ # you could uncomment the following to ignore the enitre vscode folder
192
+ # .vscode/
193
+
194
+ # Ruff stuff:
195
+ .ruff_cache/
196
+
197
+ # PyPI configuration file
198
+ .pypirc
199
+
200
+ # Cursor
201
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
202
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
203
+ # refer to https://docs.cursor.com/context/ignore-files
204
+ .cursorignore
205
+ .cursorindexingignore
@@ -0,0 +1,51 @@
1
+ ci:
2
+ autoupdate_commit_msg: "chore: update pre-commit hooks"
3
+ autoupdate_schedule: weekly
4
+ autofix_commit_msg: "style: pre-commit fixes"
5
+
6
+ exclude: 'build/'
7
+
8
+ repos:
9
+ - repo: https://github.com/pre-commit/pre-commit-hooks
10
+ rev: v5.0.0
11
+ hooks:
12
+ - id: check-added-large-files
13
+ - id: check-case-conflict
14
+ - id: check-merge-conflict
15
+ - id: check-yaml
16
+ - id: debug-statements
17
+ - id: end-of-file-fixer
18
+ - id: mixed-line-ending
19
+ - id: requirements-txt-fixer
20
+ - id: trailing-whitespace
21
+ - repo: https://github.com/tox-dev/pyproject-fmt
22
+ rev: v2.5.0
23
+ hooks:
24
+ - id: pyproject-fmt
25
+ - repo: https://github.com/astral-sh/ruff-pre-commit
26
+ rev: v0.9.1
27
+ hooks:
28
+ - id: ruff
29
+ args: ["--fix", "--show-fixes"]
30
+ - id: ruff-format
31
+ - repo: https://github.com/pre-commit/mirrors-mypy
32
+ rev: v1.14.1
33
+ hooks:
34
+ - id: mypy
35
+ files: ^(src/)
36
+ args: [
37
+ --strict,
38
+ --ignore-missing-imports,
39
+ ]
40
+ additional_dependencies: [types-requests]
41
+ - repo: https://github.com/codespell-project/codespell
42
+ rev: v2.2.2
43
+ hooks:
44
+ - id: codespell
45
+ - repo: https://github.com/pre-commit/pygrep-hooks
46
+ rev: v1.10.0
47
+ hooks:
48
+ - id: python-use-type-annotations
49
+ - id: python-no-log-warn
50
+ - id: python-check-mock-methods
51
+ - id: python-no-eval
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Princeton DDSS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.