[build-system] requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" [project] name = "adversarial-ml-suite" version = "1.0.0" description = "Enterprise-grade adversarial machine learning security suite" readme = "README.md" license = {text = "MIT"} authors = [ {name = "ML Security Team", email = "security@example.com"} ] maintainers = [ {name = "Maintenance Team", email = "maintenance@example.com"} ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Security", "Framework :: Pytest", "Typing :: Typed" ] keywords = ["adversarial", "machine-learning", "security", "robustness", "pytorch"] requires-python = ">=3.8" dependencies = [ "torch>=2.1.0", "torchvision>=0.16.0", "numpy>=1.24.0", "matplotlib>=3.7.0", "scikit-learn>=1.3.0", "scipy>=1.11.0", "pandas>=2.0.0", "seaborn>=0.12.0", "pyyaml>=6.0", "tqdm>=4.65.0", "termcolor>=2.3.0", "opencv-python>=4.8.0", "reportlab>=4.0.0", # For PDF report generation "markdown>=3.5.0", # For HTML report generation "jupytext>=1.15.0" # For notebook conversion ] [project.optional-dependencies] dev = [ "pytest>=7.4.0", "pytest-cov>=4.1.0", "pytest-xdist>=3.5.0", # Parallel testing "black>=23.0", "isort>=5.12.0", # Import sorting "flake8>=6.0.0", "flake8-docstrings>=1.7.0", # Docstring checking "mypy>=1.5.0", "pre-commit>=3.4.0", "jupyter>=1.0.0", "notebook>=6.5.0", "ipywidgets>=8.0.0" # Interactive widgets ] docs = [ "sphinx>=7.0.0", "sphinx-rtd-theme>=1.3.0", "nbsphinx>=0.9.0", "sphinx-autodoc-typehints>=1.25.0", "sphinx-copybutton>=0.5.0" ] examples = [ "jupyterlab>=4.0.0", "ipympl>=0.9.0", # Matplotlib in notebooks "plotly>=5.17.0" # Interactive visualizations ] full = [ "adversarial-ml-suite[dev]", "adversarial-ml-suite[docs]", "adversarial-ml-suite[examples]" ] [project.urls] Homepage = "https://github.com/your-org/adversarial-ml-suite" Repository = "https://github.com/your-org/adversarial-ml-suite" Documentation = "https://adversarial-ml-suite.readthedocs.io/" Issues = "https://github.com/your-org/adversarial-ml-suite/issues" Changelog = "https://github.com/your-org/adversarial-ml-suite/releases" CI = "https://github.com/your-org/adversarial-ml-suite/actions" [project.scripts] advml-train = "pipelines.train_model:main" advml-attack = "pipelines.generate_adversarial:main" advml-eval = "pipelines.robustness_eval:main" advml-defense = "pipelines.defense_train:main" advml-report = "pipelines.export_report:main" [project.gui-scripts] advml-dashboard = "dashboard.app:launch" [tool.setuptools] package-dir = {"" = "."} [tool.setuptools.packages.find] where = ["."] include = ["*"] exclude = [ "tests*", "docs*", "examples*", "notebooks*", "build*", "dist*", "*.egg-info*" ] [tool.setuptools.package-data] "*" = ["*.json", "*.yaml", "*.yml", "*.md", "*.txt"] [tool.black] line-length = 88 target-version = ["py38"] include = '\.pyi?$' extend-exclude = ''' /( \.git | \.hg | \.mypy_cache | \.tox | \.venv | _build | buck-out | build | dist | \.pytest_cache | \.coverage )/ ''' [tool.isort] profile = "black" line_length = 88 multi_line_output = 3 include_trailing_comma = true force_grid_wrap = 0 use_parentheses = true ensure_newline_before_comments = true [tool.mypy] python_version = "3.8" warn_return_any = true warn_unused_configs = true disallow_untyped_defs = true disallow_incomplete_defs = true check_untyped_defs = true no_implicit_optional = true warn_redundant_casts = true warn_unused_ignores = true warn_no_return = true warn_unreachable = true [[tool.mypy.overrides]] module = [ "matplotlib.*", "cv2", "torchvision.*" ] ignore_missing_imports = true [tool.pytest.ini_options] testpaths = ["tests"] python_files = ["test_*.py", "*_test.py"] python_classes = ["Test*"] python_functions = ["test_*"] addopts = [ "-v", "--tb=short", "--strict-markers", "--strict-config", "--durations=10" ] markers = [ "slow: marks tests as slow (deselect with '-m \"not slow\"')", "integration: integration tests", "unit: unit tests", "gpu: tests requiring GPU" ] filterwarnings = [ "error", "ignore::DeprecationWarning", "ignore::FutureWarning", "ignore::UserWarning:torch" ] log_cli = true log_cli_level = "INFO" log_cli_format = "%(asctime)s [%(levelname)s] %(message)s" log_cli_date_format = "%Y-%m-%d %H:%M:%S" [tool.coverage.run] source = ["."] omit = [ "tests/*", "docs/*", "examples/*", "notebooks/*", "*/__pycache__/*" ] [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__.:", "class .*\\bProtocol\\):", "@(abc\\.)?abstractmethod" ] fail_under = 80 [tool.ruff] target-version = "py38" line-length = 88 select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "B", # flake8-bugbear "C4", # flake8-comprehensions "UP", # pyupgrade "YTT", # flake8-2020 ] ignore = [ "E501", # line too long, handled by black "B008", # do not perform function calls in argument defaults "C901", # too complex ] per-file-ignores = {} unfixable = ["F401"] # Unused imports [tool.ruff.isort] known-first-party = ["adversarial_ml_suite"] [project.entry-points."console_scripts"] advml = "cli.main:cli" [project.entry-points."adversarial_ml.attacks"] fgsm = "attacks.fgsm:FGSMAttack" pgd = "attacks.pgd:PGDAttack" deepfool = "attacks.deepfool:DeepFoolAttack" [project.entry-points."adversarial_ml.defenses"] adv_training = "defenses.adv_training:AdversarialTraining" input_smoothing = "defenses.input_smoothing:InputSmoothing" randomized_transform = "defenses.randomized_transform:RandomizedTransformation" model_wrappers = "defenses.model_wrappers:EnsembleModelWrapper"