-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ccb2ee
commit 5f5400b
Showing
6 changed files
with
59 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: pypi-publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
|
||
# - name: Set up Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version-file: "pyproject.toml" | ||
|
||
- name: Install the project with build deps | ||
run: uv sync | ||
|
||
- name: Build package | ||
run: uv build | ||
|
||
- name: Publish package | ||
run: uv publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ | |
<a href="https://github.com/psf/black"> | ||
<img src="https://img.shields.io/badge/code%20style-black-000000?labelColor=2D3339" alt="Code style: black"> | ||
</a> | ||
<a href="https://pypi.python.org/pypi/torchattack"> | ||
<img src="https://img.shields.io/pypi/v/torchattack?labelColor=2D3339" alt="pypi"> | ||
</a> | ||
<a href="https://github.com/spencerwooo/torchattack/actions/workflows/ci.yml"> | ||
<img src="https://github.com/spencerwooo/torchattack/actions/workflows/ci.yml/badge.svg" alt="lint"> | ||
</a> | ||
|
@@ -19,16 +22,8 @@ | |
|
||
🛡 **torchattack** - A curated list of adversarial attacks in PyTorch, with a focus on transferable black-box attacks. | ||
|
||
<sub><b><em>INSTALL FROM GITHUB SOURCE</em></b></sub> | ||
|
||
```shell | ||
python -m pip install git+https://github.com/spencerwooo/[email protected] | ||
``` | ||
|
||
<sub><b><em>INSTALL FROM GITEE MIRROR</em></b></sub> | ||
|
||
```shell | ||
python -m pip install git+https://gitee.com/spencerwoo/torchattack@v1.0.5 | ||
pip install torchattack | ||
``` | ||
|
||
## Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,19 @@ description = "A set of adversarial attacks implemented in PyTorch" | |
authors = [{ name = "spencerwooo", email = "[email protected]" }] | ||
requires-python = ">=3.10,<3.13" | ||
readme = "README.md" | ||
license = { text = "MIT" } | ||
license = { file = "LICENSE" } | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: GPU :: NVIDIA CUDA", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"torch>=1.13.0", | ||
"torchvision>=0.14.0", | ||
|
@@ -13,6 +25,10 @@ dependencies = [ | |
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/spencerwooo/torchattack" | ||
Documentation = "https://github.com/spencerwooo/torchattack/blob/main/README.md" | ||
|
||
[project.optional-dependencies] | ||
dev = ["mypy", "rich", "timm"] | ||
test = ["pytest", "pytest-cov"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters