Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,37 @@ sample/test
*__pycache__
*.egg-info
build
dist
dist

# Testing related
.pytest_cache/
.coverage
htmlcov/
coverage.xml
.tox/
.nox/

# Claude settings
.claude/

# Virtual environments
.venv/
.env/
venv/
env/

# IDE files
.vscode/
.idea/
*.swp
*.swo
*~

# OS files
.DS_Store
Thumbs.db

# Temporary files
*.tmp
*.temp
.tmp/
10 changes: 5 additions & 5 deletions achoz/central_controller.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import file_lister
from . import file_lister
import os
import signal
import sqlite3
Expand All @@ -11,10 +11,10 @@
import schedule
from requests import get

import crawler
import global_var
import index_mngr
import server
from . import crawler
from . import global_var
from . import index_mngr
from . import server


def set_priority():
Expand Down
8 changes: 4 additions & 4 deletions achoz/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import os
import sys
sys.path.insert(1,os.path.dirname(__file__))
import central_controller
import config
import global_var
import meili_installer
from . import central_controller
from . import config
from . import global_var
from . import meili_installer
import signal

def config_creator(args,config_path):
Expand Down
2 changes: 1 addition & 1 deletion achoz/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json
import os
import meilisearch
import global_var
from . import global_var

def path_expander(list_of_path):
output=[]
Expand Down
6 changes: 3 additions & 3 deletions achoz/crawler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import text_extractor
from . import text_extractor
import os
from unique_id_generator import uniqueid
import global_var
from .unique_id_generator import uniqueid
from . import global_var
import sqlite3
import time

Expand Down
6 changes: 3 additions & 3 deletions achoz/file_lister.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
from threading import local
from unique_id_generator import uniqueid
import list_write as lw
import global_var
from .unique_id_generator import uniqueid
from . import list_write as lw
from . import global_var
import sqlite3
import time
import re
Expand Down
4 changes: 2 additions & 2 deletions achoz/index_mngr.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import global_var
from . import global_var
import os
import sqlite3
from get_obj_size import _sizeof
from .get_obj_size import _sizeof
def uid_updater(id:list,uid:str):
uid = int(uid)
for i in id:
Expand Down
2 changes: 1 addition & 1 deletion achoz/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pyramid.view import view_config
from pyramid.response import FileResponse
import os
import global_var
from . import global_var


static_path = os.path.join(os.path.dirname(__file__),'static')
Expand Down
4 changes: 2 additions & 2 deletions achoz/text_extractor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import textract
import global_var
from . import global_var
from mimetypes import guess_extension
import text_cleaner
from . import text_cleaner
class extractor:
def __init__(self):
self.self = None
Expand Down
1,515 changes: 1,515 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

97 changes: 97 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
[tool.poetry]
name = "achoz"
version = "0.3.65"
description = "Search through all your documents like web"
authors = ["Krishna Kanhaiya <kcubeterm@gmail.com>"]
license = "AGPL-3"
readme = "README.md"
packages = [{include = "achoz"}]

classifiers = [
"Environment :: Console",
"Environment :: Web Environment",
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Operating System :: Unix",
"Operating System :: POSIX :: Linux",
"Topic :: Text Processing",
"Topic :: Text Processing :: Indexing"
]

[tool.poetry.scripts]
achoz = "achoz.cli:cli"

[tool.poetry.dependencies]
python = "^3.8"
meilisearch = ">=0.18.3"
pyramid = ">=2.0"
pyinotify = ">=0.9.6"
requests = ">=2.22.0"
schedule = ">=1.1.0"
textract = ">=1.6.5"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-cov = "^4.1.0"
pytest-mock = "^3.11.1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"--strict-markers",
"--strict-config",
"--verbose",
"--cov=achoz",
"--cov-report=term-missing",
"--cov-report=html:htmlcov",
"--cov-report=xml:coverage.xml",
"--cov-fail-under=80"
]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"unit: marks tests as unit tests",
"integration: marks tests as integration tests",
"slow: marks tests as slow tests"
]

[tool.coverage.run]
source = ["achoz"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/.*",
"setup.py"
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:"
]
show_missing = true
precision = 2

[tool.coverage.html]
directory = "htmlcov"

[tool.coverage.xml]
output = "coverage.xml"
Empty file added tests/__init__.py
Empty file.
Loading