Skip to content

Commit 171bc0d

Browse files
Merge pull request steam-bell-92#1088 from basantnema31/feat/issues-1020-1023
feat: Add Pytest config and Poetry pyproject.toml
2 parents 490de06 + bbcc364 commit 171bc0d

4 files changed

Lines changed: 97 additions & 25 deletions

File tree

package-lock.json

Lines changed: 70 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[tool.poetry]
2+
name = "python-mini-project"
3+
version = "0.1.0"
4+
description = "A collection of python mini projects"
5+
authors = ["Open Source Contributors"]
6+
7+
[tool.poetry.dependencies]
8+
python = ">=3.10"
9+
pygame = "2.6.1"
10+
numpy = "1.26.4"
11+
matplotlib = "3.8.3"
12+
pillow = "12.2.0"
13+
nltk = "3.9.4"
14+
requests = "2.34.2"
15+
16+
[tool.poetry.group.dev.dependencies]
17+
pytest = ">=8.0.0"
18+
19+
[build-system]
20+
requires = ["poetry-core>=1.0.0"]
21+
build-backend = "poetry.core.masonry.api"

pytest.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[pytest]
2+
addopts = -v --tb=short
3+
testpaths = tests
4+
python_files = test_*.py
5+
python_classes = Test*
6+
python_functions = test_*

web-app/js/main.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -886,30 +886,6 @@ document.addEventListener("DOMContentLoaded", function () {
886886
return;
887887
}
888888

889-
resultsList.innerHTML = '';
890-
matches.slice(0, 8).forEach((project, index) => {
891-
const item = document.createElement('button');
892-
item.type = 'button';
893-
item.className = 'dropdown-item' + (index === selectedSuggestionIndex ? ' selected' : '');
894-
item.setAttribute('aria-label', `Select ${project.title}`);
895-
item.innerHTML = `
896-
<div class="dropdown-item-icon">
897-
${project.card.querySelector('.card-icon').textContent}
898-
</div>
899-
<div class="dropdown-item-text">${highlightMatch(project.title, query)}</div>
900-
<span class="dropdown-item-tag">${project.category}</span>
901-
`;
902-
item.addEventListener('click', () => selectSuggestion(project.title));
903-
item.addEventListener('keydown', (e) => {
904-
if (e.key === 'Enter' || e.key === ' ') {
905-
e.preventDefault();
906-
selectSuggestion(project.title);
907-
}
908-
});
909-
item.addEventListener('mouseenter', () => {
910-
selectedSuggestionIndex = index;
911-
updateSuggestionHighlight();
912-
913889
if (noResultsMessage) noResultsMessage.style.display = "none";
914890

915891
if (resultsList) {

0 commit comments

Comments
 (0)