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
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,50 @@
/pytorch/__pycache__/*.pyc
/pytorch/__pycache__

# Poetry
/pytorch/poetry.lock
/pytorch/dist/
/pytorch/.venv/

# Testing
/pytorch/.pytest_cache/
/pytorch/.coverage
/pytorch/htmlcov/
/pytorch/coverage.xml
/pytorch/*.coverage
/pytorch/.hypothesis/

# Claude settings
.claude/*

# Build artifacts
/pytorch/build/
/pytorch/*.egg-info/
/pytorch/*.egg

# Virtual environments
/pytorch/venv/
/pytorch/env/
/pytorch/ENV/

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

# Python
*.py[cod]
*.pyo
*.pyd
.Python

# Jupyter Notebook
.ipynb_checkpoints/

# mypy
/pytorch/.mypy_cache/
/pytorch/.dmypy.json
/pytorch/dmypy.json
131 changes: 131 additions & 0 deletions pytorch/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
[tool.poetry]
name = "itracker-pytorch"
version = "0.1.0"
description = "PyTorch implementation of iTracker: eye tracking convolutional neural network"
authors = ["Your Name <[email protected]>"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/CSAILVision/GazeCapture"
keywords = ["eye-tracking", "deep-learning", "pytorch", "computer-vision"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[tool.poetry.dependencies]
python = "^3.8.1"
numpy = "^1.16.4"
Pillow = "^8.2.0"
scipy = "^1.3.0"
torch = {version = "^1.1.0", markers = "sys_platform != 'linux'"}
torchvision = {version = "^0.3.0", markers = "sys_platform != 'linux'"}
torchfile = "^0.1.0"
six = "^1.12.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-cov = "^4.1.0"
pytest-mock = "^3.11.1"
black = "^23.7.0"
isort = "^5.12.0"
flake8 = "^6.0.0"
mypy = "^1.4.1"

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

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

[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*", "*Tests"]
python_functions = ["test_*"]
addopts = [
"-ra",
"--strict-markers",
"--cov=.",
"--cov-report=term-missing:skip-covered",
"--cov-report=html",
"--cov-report=xml",
"--cov-fail-under=80",
"-vv",
"--tb=short",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Tests that take a long time to run",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]

[tool.coverage.run]
source = ["."]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/venv/*",
"*/env/*",
"*/.venv/*",
"*/setup.py",
"*/conftest.py",
"*/.pytest_cache/*",
"*/migrations/*",
]

[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
fail_under = 80
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]

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

[tool.coverage.xml]
output = "coverage.xml"

[tool.isort]
profile = "black"
line_length = 88
known_first_party = ["ITrackerModel", "ITrackerData"]
skip_gitignore = true

[tool.black]
line-length = 88
target-version = ['py38', 'py39', 'py310', 'py311']
include = '\.pyi?$'

[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
44 changes: 44 additions & 0 deletions pytorch/pyproject_test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[tool.poetry]
name = "itracker-pytorch"
version = "0.1.0"
description = "PyTorch implementation of iTracker: eye tracking convolutional neural network"
authors = ["Your Name <[email protected]>"]

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

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

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

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

[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*", "*Tests"]
python_functions = ["test_*"]
addopts = [
"-ra",
"--strict-markers",
"--cov=.",
"--cov-report=term-missing:skip-covered",
"--cov-report=html",
"--cov-report=xml",
"--cov-fail-under=80",
"-vv",
"--tb=short",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Tests that take a long time to run",
]
Empty file added pytorch/tests/__init__.py
Empty file.
Loading