buscar 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.
- buscar-0.1.0/.github/dependabot.yml +40 -0
- buscar-0.1.0/.github/release-drafter.yml +18 -0
- buscar-0.1.0/.github/workflows/ci.yml +93 -0
- buscar-0.1.0/.github/workflows/draft-release.yml +16 -0
- buscar-0.1.0/.github/workflows/publish-pypi.yml +70 -0
- buscar-0.1.0/.gitignore +189 -0
- buscar-0.1.0/.pre-commit-config.yaml +83 -0
- buscar-0.1.0/CITATION.cff +24 -0
- buscar-0.1.0/CONTRIBUTING.md +109 -0
- buscar-0.1.0/LICENSE +28 -0
- buscar-0.1.0/MANIFEST.in +4 -0
- buscar-0.1.0/PKG-INFO +145 -0
- buscar-0.1.0/README.md +111 -0
- buscar-0.1.0/pyproject.toml +83 -0
- buscar-0.1.0/setup.cfg +4 -0
- buscar-0.1.0/src/buscar/__init__.py +18 -0
- buscar-0.1.0/src/buscar/checks.py +27 -0
- buscar-0.1.0/src/buscar/metrics.py +508 -0
- buscar-0.1.0/src/buscar/signatures.py +499 -0
- buscar-0.1.0/src/buscar.egg-info/PKG-INFO +145 -0
- buscar-0.1.0/src/buscar.egg-info/SOURCES.txt +28 -0
- buscar-0.1.0/src/buscar.egg-info/dependency_links.txt +1 -0
- buscar-0.1.0/src/buscar.egg-info/requires.txt +9 -0
- buscar-0.1.0/src/buscar.egg-info/scm_file_list.json +34 -0
- buscar-0.1.0/src/buscar.egg-info/scm_version.json +8 -0
- buscar-0.1.0/src/buscar.egg-info/top_level.txt +1 -0
- buscar-0.1.0/tests/conftest.py +93 -0
- buscar-0.1.0/tests/test_checks.py +27 -0
- buscar-0.1.0/tests/test_metrics.py +200 -0
- buscar-0.1.0/tests/test_signatures.py +78 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# GitHub Dependabot configuration
|
|
2
|
+
# Note: this configuration controls Dependabot version updates. Dependabot security
|
|
3
|
+
# updates are configured separately in the repository security settings.
|
|
4
|
+
# See:
|
|
5
|
+
# https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates
|
|
6
|
+
|
|
7
|
+
version: 2
|
|
8
|
+
updates:
|
|
9
|
+
# GitHub Actions workflow dependencies under .github/workflows.
|
|
10
|
+
# See:
|
|
11
|
+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates
|
|
12
|
+
- package-ecosystem: "github-actions"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
# Check for GitHub Actions updates every week.
|
|
16
|
+
interval: "monthly"
|
|
17
|
+
|
|
18
|
+
# Python project dependencies managed by uv.
|
|
19
|
+
# Dependabot's uv ecosystem updates uv.lock for projects using uv.
|
|
20
|
+
# See:
|
|
21
|
+
# https://docs.github.com/en/code-security/dependabot/ecosystems-supported-by-dependabot/supported-ecosystems-and-repositories
|
|
22
|
+
- package-ecosystem: "uv"
|
|
23
|
+
directory: "/"
|
|
24
|
+
schedule:
|
|
25
|
+
# Check for project dependency updates every month.
|
|
26
|
+
interval: "monthly"
|
|
27
|
+
groups:
|
|
28
|
+
python-packages:
|
|
29
|
+
patterns:
|
|
30
|
+
- "*"
|
|
31
|
+
update-types:
|
|
32
|
+
- "minor"
|
|
33
|
+
- "patch"
|
|
34
|
+
|
|
35
|
+
# Pre-commit hook revisions in .pre-commit-config.yaml.
|
|
36
|
+
- package-ecosystem: "pre-commit"
|
|
37
|
+
directory: "/"
|
|
38
|
+
schedule:
|
|
39
|
+
# Check for pre-commit hook updates every week.
|
|
40
|
+
interval: "weekly"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION'
|
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
|
3
|
+
version-resolver:
|
|
4
|
+
major:
|
|
5
|
+
labels:
|
|
6
|
+
- release-major
|
|
7
|
+
minor:
|
|
8
|
+
labels:
|
|
9
|
+
- release-minor
|
|
10
|
+
patch:
|
|
11
|
+
labels:
|
|
12
|
+
- release-patch
|
|
13
|
+
default: patch
|
|
14
|
+
change-template: '- $TITLE (@$AUTHOR via #$NUMBER)'
|
|
15
|
+
template: |
|
|
16
|
+
## Changes
|
|
17
|
+
|
|
18
|
+
$CHANGES
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
pre-commit:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v7
|
|
16
|
+
|
|
17
|
+
- name: Run pre-commit (required)
|
|
18
|
+
uses: pre-commit/action@v3.0.1
|
|
19
|
+
with:
|
|
20
|
+
extra_args: --all-files --show-diff-on-failure
|
|
21
|
+
|
|
22
|
+
test:
|
|
23
|
+
needs: pre-commit
|
|
24
|
+
runs-on: ${{ matrix.os }}
|
|
25
|
+
strategy:
|
|
26
|
+
fail-fast: false
|
|
27
|
+
matrix:
|
|
28
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
29
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout
|
|
33
|
+
uses: actions/checkout@v7
|
|
34
|
+
- name: Set up Python
|
|
35
|
+
uses: actions/setup-python@v7.0.0
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python-version }}
|
|
38
|
+
|
|
39
|
+
- name: Set up uv
|
|
40
|
+
uses: astral-sh/setup-uv@v10.2.0
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: uv sync --group dev --frozen
|
|
44
|
+
|
|
45
|
+
- name: Run tests with coverage (Ubuntu 3.12)
|
|
46
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
47
|
+
run: uv run --frozen pytest --cov=buscar --cov-report=term-missing --cov-report=xml --cov-report=html
|
|
48
|
+
|
|
49
|
+
- name: Upload coverage artifact
|
|
50
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
51
|
+
uses: actions/upload-artifact@v7.0.1
|
|
52
|
+
with:
|
|
53
|
+
name: coverage-xml
|
|
54
|
+
path: coverage.xml
|
|
55
|
+
|
|
56
|
+
- name: Upload HTML coverage artifact
|
|
57
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
58
|
+
uses: actions/upload-artifact@v7.0.1
|
|
59
|
+
with:
|
|
60
|
+
name: coverage-html
|
|
61
|
+
path: htmlcov
|
|
62
|
+
|
|
63
|
+
- name: Run tests
|
|
64
|
+
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.12'
|
|
65
|
+
run: uv run --frozen pytest
|
|
66
|
+
|
|
67
|
+
build:
|
|
68
|
+
needs: test
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
|
|
71
|
+
steps:
|
|
72
|
+
- name: Checkout
|
|
73
|
+
uses: actions/checkout@v7
|
|
74
|
+
|
|
75
|
+
- name: Set up Python
|
|
76
|
+
uses: actions/setup-python@v7.0.0
|
|
77
|
+
with:
|
|
78
|
+
python-version: "3.12"
|
|
79
|
+
|
|
80
|
+
- name: Set up uv
|
|
81
|
+
uses: astral-sh/setup-uv@v10.2.0
|
|
82
|
+
|
|
83
|
+
- name: Install dependencies
|
|
84
|
+
run: uv sync --group dev --frozen
|
|
85
|
+
|
|
86
|
+
- name: Build package
|
|
87
|
+
run: uv build
|
|
88
|
+
|
|
89
|
+
- name: Validate wheel import
|
|
90
|
+
shell: bash
|
|
91
|
+
run: |
|
|
92
|
+
uv run --isolated --no-project --with ./dist/buscar-*.whl -- \
|
|
93
|
+
python -c "import buscar; print(buscar.__name__, buscar.__version__)"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Draft release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
draft-release:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
pull-requests: read
|
|
13
|
+
steps:
|
|
14
|
+
- uses: release-drafter/release-drafter@34d80673e067bdc0c24568d3af899c216adcfaa9
|
|
15
|
+
env:
|
|
16
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Publish PyPI release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout release tag and history
|
|
16
|
+
uses: actions/checkout@v7
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
persist-credentials: false
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v7.0.0
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
|
|
26
|
+
- name: Set up uv
|
|
27
|
+
uses: astral-sh/setup-uv@v10.2.0
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: false
|
|
30
|
+
|
|
31
|
+
- name: Build package
|
|
32
|
+
run: uv build
|
|
33
|
+
|
|
34
|
+
- name: Validate wheel import
|
|
35
|
+
shell: bash
|
|
36
|
+
run: |
|
|
37
|
+
uv run --isolated --no-project --with ./dist/buscar-*.whl -- \
|
|
38
|
+
python -c "import buscar; print(buscar.__name__, buscar.__version__)"
|
|
39
|
+
|
|
40
|
+
# Jobs run on separate runners, so pass the validated distributions to
|
|
41
|
+
# the publish job as an artifact instead of rebuilding them there.
|
|
42
|
+
- name: Upload package distributions
|
|
43
|
+
uses: actions/upload-artifact@v7.0.1
|
|
44
|
+
with:
|
|
45
|
+
name: python-package-distributions
|
|
46
|
+
path: dist/
|
|
47
|
+
if-no-files-found: error
|
|
48
|
+
|
|
49
|
+
pypi-publish:
|
|
50
|
+
name: Upload release to PyPI
|
|
51
|
+
needs: build
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
environment:
|
|
54
|
+
name: release
|
|
55
|
+
url: https://pypi.org/project/buscar/
|
|
56
|
+
# PyPI verifies this workflow run through OpenID Connect.
|
|
57
|
+
permissions:
|
|
58
|
+
contents: read
|
|
59
|
+
id-token: write
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
# Retrieve the exact distributions built and validated by the build job.
|
|
63
|
+
- name: Download package distributions
|
|
64
|
+
uses: actions/download-artifact@v8.0.1
|
|
65
|
+
with:
|
|
66
|
+
name: python-package-distributions
|
|
67
|
+
path: dist/
|
|
68
|
+
|
|
69
|
+
- name: Publish package distributions to PyPI
|
|
70
|
+
uses: pypa/gh-action-pypi-publish@v1.14.2
|
buscar-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
110
|
+
.pdm.toml
|
|
111
|
+
.pdm-python
|
|
112
|
+
.pdm-build/
|
|
113
|
+
|
|
114
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
115
|
+
__pypackages__/
|
|
116
|
+
|
|
117
|
+
# Celery stuff
|
|
118
|
+
celerybeat-schedule
|
|
119
|
+
celerybeat.pid
|
|
120
|
+
|
|
121
|
+
# SageMath parsed files
|
|
122
|
+
*.sage.py
|
|
123
|
+
|
|
124
|
+
# Environments
|
|
125
|
+
.env
|
|
126
|
+
.venv
|
|
127
|
+
env/
|
|
128
|
+
venv/
|
|
129
|
+
ENV/
|
|
130
|
+
env.bak/
|
|
131
|
+
venv.bak/
|
|
132
|
+
|
|
133
|
+
# Spyder project settings
|
|
134
|
+
.spyderproject
|
|
135
|
+
.spyproject
|
|
136
|
+
|
|
137
|
+
# Rope project settings
|
|
138
|
+
.ropeproject
|
|
139
|
+
|
|
140
|
+
# mkdocs documentation
|
|
141
|
+
/site
|
|
142
|
+
|
|
143
|
+
# mypy
|
|
144
|
+
.mypy_cache/
|
|
145
|
+
.dmypy.json
|
|
146
|
+
dmypy.json
|
|
147
|
+
|
|
148
|
+
# Pyre type checker
|
|
149
|
+
.pyre/
|
|
150
|
+
|
|
151
|
+
# pytype static type analyzer
|
|
152
|
+
.pytype/
|
|
153
|
+
|
|
154
|
+
# Cython debug symbols
|
|
155
|
+
cython_debug/
|
|
156
|
+
|
|
157
|
+
# PyCharm
|
|
158
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
159
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
160
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
161
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
162
|
+
#.idea/
|
|
163
|
+
|
|
164
|
+
# prevent storing large datasets
|
|
165
|
+
data/
|
|
166
|
+
|
|
167
|
+
# ignoring prototype files
|
|
168
|
+
_*
|
|
169
|
+
!**/__init__.py
|
|
170
|
+
!**/__main__.py
|
|
171
|
+
|
|
172
|
+
# ignoring results files as they are generated when running the notebooks
|
|
173
|
+
# also to prevent storing large datasets
|
|
174
|
+
results/
|
|
175
|
+
|
|
176
|
+
# remove background jobs
|
|
177
|
+
*nohup.out
|
|
178
|
+
|
|
179
|
+
# ignore .vscode settings
|
|
180
|
+
.vscode/
|
|
181
|
+
|
|
182
|
+
# ignore ruff catch
|
|
183
|
+
.ruff_cache/
|
|
184
|
+
|
|
185
|
+
# ignore for now
|
|
186
|
+
recipe/metal.yaml
|
|
187
|
+
|
|
188
|
+
#ignore prototype files
|
|
189
|
+
_*
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Pre-commit configuration file
|
|
2
|
+
# Documentation: https://pre-commit.com/
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
# Basic file checks first (fast and foundational)
|
|
6
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
+
rev: v6.0.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: check-yaml
|
|
10
|
+
exclude: ^recipe/meta\.yaml$
|
|
11
|
+
- id: check-json
|
|
12
|
+
- id: check-merge-conflict
|
|
13
|
+
- id: check-added-large-files
|
|
14
|
+
args: ["--maxkb=102400"]
|
|
15
|
+
|
|
16
|
+
# Format TOML files early (before other tools might read config)
|
|
17
|
+
- repo: https://github.com/pappasam/toml-sort
|
|
18
|
+
rev: v0.25.0
|
|
19
|
+
hooks:
|
|
20
|
+
- id: toml-sort
|
|
21
|
+
args: ["--in-place"]
|
|
22
|
+
|
|
23
|
+
# Python syntax upgrades (should run before linting/formatting)
|
|
24
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
25
|
+
rev: v3.21.2
|
|
26
|
+
hooks:
|
|
27
|
+
- id: pyupgrade
|
|
28
|
+
args: ["--py311-plus"]
|
|
29
|
+
|
|
30
|
+
# Import sorting (should run before Ruff to avoid conflicts)
|
|
31
|
+
- repo: https://github.com/pre-commit/mirrors-isort
|
|
32
|
+
rev: v5.10.1
|
|
33
|
+
hooks:
|
|
34
|
+
- id: isort
|
|
35
|
+
args: ["--profile", "black"]
|
|
36
|
+
|
|
37
|
+
# Ruff for linting and formatting Python files
|
|
38
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
39
|
+
rev: v0.16.9
|
|
40
|
+
hooks:
|
|
41
|
+
- id: ruff-check
|
|
42
|
+
args: ["--fix"]
|
|
43
|
+
- id: ruff-format # Add Ruff formatter
|
|
44
|
+
|
|
45
|
+
# nbQA to run Ruff on Jupyter Notebooks (after Python tools)
|
|
46
|
+
- repo: https://github.com/nbQA-dev/nbQA
|
|
47
|
+
rev: 1.9.1
|
|
48
|
+
hooks:
|
|
49
|
+
- id: nbqa-ruff
|
|
50
|
+
name: nbQA-Ruff
|
|
51
|
+
args: ["--fix"]
|
|
52
|
+
additional_dependencies: ["ruff"]
|
|
53
|
+
|
|
54
|
+
# validates CITATION.cff file formatting expectations
|
|
55
|
+
- repo: https://github.com/citation-file-format/cffconvert
|
|
56
|
+
rev: b6045d78aac9e02b039703b030588d54d53262ac
|
|
57
|
+
hooks:
|
|
58
|
+
- id: validate-cff
|
|
59
|
+
|
|
60
|
+
# Final cleanup (whitespace and newlines)
|
|
61
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
62
|
+
rev: v6.0.0
|
|
63
|
+
hooks:
|
|
64
|
+
- id: end-of-file-fixer
|
|
65
|
+
- id: trailing-whitespace
|
|
66
|
+
|
|
67
|
+
# Keep pre-commit itself up to date (run last)
|
|
68
|
+
- repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update
|
|
69
|
+
rev: v0.9.0
|
|
70
|
+
hooks:
|
|
71
|
+
- id: pre-commit-update
|
|
72
|
+
args: ["--verbose", "--exclude", "cffconvert"]
|
|
73
|
+
|
|
74
|
+
- repo: local
|
|
75
|
+
hooks:
|
|
76
|
+
- id: shellcheck
|
|
77
|
+
name: ShellCheck
|
|
78
|
+
description: Test shell scripts with ShellCheck
|
|
79
|
+
entry: shellcheck
|
|
80
|
+
language: system
|
|
81
|
+
types: [shell]
|
|
82
|
+
args: ["--exclude=SC1091"]
|
|
83
|
+
require_serial: true
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: If you use Buscar, please cite it using the metadata from the CITATION.cff file.
|
|
3
|
+
title: Single-cell hit calling in high-content imaging screens with Buscar
|
|
4
|
+
date-released: 2026-05-09
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: Serrano
|
|
7
|
+
given-names: Erik
|
|
8
|
+
orcid: https://orcid.org/0000-0003-4188-9080
|
|
9
|
+
email: erik.serrano@cuanschutz.com
|
|
10
|
+
- family-names: Weishan
|
|
11
|
+
given-names: Li
|
|
12
|
+
orcid: https://orcid.org/0009-0001-4643-9372
|
|
13
|
+
- family-names: Bunten
|
|
14
|
+
given-names: Dave
|
|
15
|
+
orcid: https://orcid.org/0000-0001-6041-3665
|
|
16
|
+
- family-names: Way
|
|
17
|
+
given-names: Gregory
|
|
18
|
+
orcid: https://orcid.org/0000-0002-0503-9348
|
|
19
|
+
license: BSD-3-Clause
|
|
20
|
+
identifiers:
|
|
21
|
+
- type: doi
|
|
22
|
+
value: 10.64898/2026.04.15.718737
|
|
23
|
+
repository-code: https://github.com/WayScience/buscar
|
|
24
|
+
abstract: Buscar is a Python framework for prioritizing compounds in high-content imaging drug screening using single-cell profiles.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in improving Buscar. Contributions that fix bugs, improve
|
|
4
|
+
documentation, add tests, or make the package easier to install and maintain are
|
|
5
|
+
welcome.
|
|
6
|
+
|
|
7
|
+
## Development Setup
|
|
8
|
+
|
|
9
|
+
Buscar uses [uv](https://docs.astral.sh/uv/) for environment and package
|
|
10
|
+
management.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
git clone https://github.com/WayScience/buscar.git
|
|
14
|
+
cd buscar
|
|
15
|
+
uv sync --frozen --group dev
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Install the pre-commit hooks before making changes:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uv tool install pre-commit
|
|
22
|
+
pre-commit install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Checks
|
|
26
|
+
|
|
27
|
+
Run the test suite:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv run --frozen pytest
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Run tests with coverage:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uv run --frozen pytest --cov=buscar --cov-report=term-missing --cov-report=xml --cov-report=html
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The coverage run creates `coverage.xml` and an `htmlcov/` directory. CI uploads
|
|
40
|
+
these files from the Ubuntu Python 3.12 test job so maintainers can download the
|
|
41
|
+
machine-readable coverage report or inspect the browsable HTML coverage report
|
|
42
|
+
when reviewing pull requests.
|
|
43
|
+
|
|
44
|
+
Run linting and formatting checks:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pre-commit run --all-files
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Build the package:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
uv build
|
|
54
|
+
uv run --frozen twine check dist/*
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Pull Requests
|
|
58
|
+
|
|
59
|
+
Before opening a pull request:
|
|
60
|
+
|
|
61
|
+
- Keep changes focused on one bug fix, feature, or documentation update.
|
|
62
|
+
- Add or update tests when behavior changes.
|
|
63
|
+
- Update documentation when user-facing behavior changes.
|
|
64
|
+
- Run `uv run --frozen pytest` and `pre-commit run --all-files`.
|
|
65
|
+
- Make sure generated files and large local artifacts are not committed.
|
|
66
|
+
|
|
67
|
+
CI runs pre-commit checks, the test matrix across supported Python versions, and
|
|
68
|
+
package build validation.
|
|
69
|
+
|
|
70
|
+
Dependabot checks GitHub Actions and pre-commit hooks weekly, and uv-managed
|
|
71
|
+
Python dependencies monthly. Review dependency update pull requests like any
|
|
72
|
+
other change and make sure CI passes before merging.
|
|
73
|
+
|
|
74
|
+
## Releases
|
|
75
|
+
|
|
76
|
+
A push to `main` runs `.github/workflows/draft-release.yml`.
|
|
77
|
+
Release Drafter updates a draft GitHub release with merged pull requests.
|
|
78
|
+
Use the `release-major`, `release-minor`, or `release-patch` label to choose the version bump; the default is a patch bump.
|
|
79
|
+
|
|
80
|
+
Before the first release, a maintainer must:
|
|
81
|
+
|
|
82
|
+
1. Create the `release` environment in the `WayScience/buscar` GitHub repository.
|
|
83
|
+
Add required reviewers if the release needs approval.
|
|
84
|
+
2. Create the `release-major`, `release-minor`, and `release-patch` labels if they do not exist.
|
|
85
|
+
Apply them to pull requests that need a specific version bump.
|
|
86
|
+
3. In their PyPI account's Publishing settings, add a pending trusted publisher for the `buscar` project.
|
|
87
|
+
Set the owner to `WayScience`, repository to `buscar`, workflow filename to `publish-pypi.yml`, and environment to `release`.
|
|
88
|
+
The pending publisher does not reserve the project name until the first upload.
|
|
89
|
+
|
|
90
|
+
To release, make sure CI passes on `main`.
|
|
91
|
+
Review the draft release and its `vX.Y.Z` tag, then publish it from GitHub Releases.
|
|
92
|
+
Publishing the GitHub release runs `.github/workflows/publish-pypi.yml`.
|
|
93
|
+
That workflow builds a wheel and source distribution from the release tag, checks the wheel import, and uploads both files to PyPI with Trusted Publishing.
|
|
94
|
+
No PyPI API token is needed.
|
|
95
|
+
Check the new version on PyPI after the workflow finishes.
|
|
96
|
+
|
|
97
|
+
## Reporting Issues
|
|
98
|
+
|
|
99
|
+
When reporting a bug, include:
|
|
100
|
+
|
|
101
|
+
- The Buscar version or commit you are using.
|
|
102
|
+
- Your Python version and operating system.
|
|
103
|
+
- A minimal example or traceback that reproduces the issue.
|
|
104
|
+
- Any relevant input data shape, schema, or metadata column names.
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
By contributing, you agree that your contribution will be licensed under the
|
|
109
|
+
BSD 3-Clause license used by this project.
|
buscar-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Erik Serrano
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
buscar-0.1.0/MANIFEST.in
ADDED