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
60 changes: 59 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,62 @@
!.vscode/extensions.json

# volume data
.data
.data

# Testing
.pytest_cache/
.coverage
htmlcov/
coverage.xml
*.cover
.hypothesis/
.tox/
.nox/
*.log

# Claude settings
.claude/*

# Poetry
dist/
*.egg-info/

# Build artifacts
build/
*.so
*.dylib
*.dll

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

# Virtual environments
env/
.env
.venv
ENV/
env.bak/
venv.bak/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Temporary files
*.tmp
tmp/
temp/
282 changes: 282 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
[tool.poetry]
name = "tor-scraper"
version = "0.1.0"
description = "Tor network scraper and analysis tool"
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [
{ include = "lib" },
{ include = "torscraper" },
]

[tool.poetry.dependencies]
python = "^3.8"

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

[tool.poetry.scripts]
test = "pytest:main"
tests = "pytest:main"

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

[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--cov=lib",
"--cov=torscraper",
"--cov-branch",
"--cov-report=term-missing:skip-covered",
"--cov-report=html:htmlcov",
"--cov-report=xml:coverage.xml",
"--cov-fail-under=80",
"-vv",
]
markers = [
"unit: Unit tests that test individual components in isolation",
"integration: Integration tests that test multiple components together",
"slow: Tests that take a long time to run (deselect with '-m \"not slow\"')",
]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]

[tool.coverage.run]
source = ["lib", "torscraper"]
branch = true
parallel = true
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/migrations/*",
"*/config/*",
"*/settings/*",
"*/manage.py",
"*/setup.py",
"*/wsgi.py",
"*/asgi.py",
]

[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
skip_empty = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"@abstractmethod",
"@abc.abstractmethod",
"except ImportError:",
"pass",
]

[tool.coverage.html]
directory = "htmlcov"
title = "Test Coverage Report"

[tool.coverage.xml]
output = "coverage.xml"
109 changes: 109 additions & 0 deletions pyproject_full.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
[tool.poetry]
name = "tor-scraper"
version = "0.1.0"
description = "Tor network scraper and analysis tool"
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [
{ include = "lib" },
{ include = "torscraper" },
]

[tool.poetry.dependencies]
python = "^3.8"
beautifulsoup4 = "^4.9.3"
requests = "^2.26.0"
scrapy = "^2.3.0"
elasticsearch = "^7.5.1"
flask = "^1.1.2"
numpy = "^1.19.1"
scikit-learn = "^0.23.2"
lxml = "^4.6.2"
pyyaml = "^5.3.1"

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

[tool.poetry.scripts]
test = "pytest:main"
tests = "pytest:main"

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

[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--cov=lib",
"--cov=torscraper",
"--cov-branch",
"--cov-report=term-missing:skip-covered",
"--cov-report=html:htmlcov",
"--cov-report=xml:coverage.xml",
"--cov-fail-under=80",
"-vv",
]
markers = [
"unit: Unit tests that test individual components in isolation",
"integration: Integration tests that test multiple components together",
"slow: Tests that take a long time to run (deselect with '-m \"not slow\"')",
]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]

[tool.coverage.run]
source = ["lib", "torscraper"]
branch = true
parallel = true
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/migrations/*",
"*/config/*",
"*/settings/*",
"*/manage.py",
"*/setup.py",
"*/wsgi.py",
"*/asgi.py",
]

[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
skip_empty = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"@abstractmethod",
"@abc.abstractmethod",
"except ImportError:",
"pass",
]

[tool.coverage.html]
directory = "htmlcov"
title = "Test Coverage Report"

[tool.coverage.xml]
output = "coverage.xml"
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Test package initialization
Loading