diff --git a/.appveyor.yml b/.appveyor.yml index 3c5be0d..ba5ee38 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -47,4 +47,3 @@ install: test_script: - "%PYTHON%/python setup.py test" - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..3f6966a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace +- repo: https://github.com/psf/black + rev: 19.3b0 + hooks: + - id: black diff --git a/.travis.yml b/.travis.yml index e01c550..bf94dfc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,4 +48,3 @@ jobs: - source deactivate # Auto Deploy to Pip and Conda from here itself - diff --git a/README.md b/README.md index 01fde60..aac0422 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,6 @@ This package has been developed by * Avik Pal (@avik-pal) * Aniket Das (@Aniket1998) -This project exists thanks to all the people who contribute. +This project exists thanks to all the people who contribute. - diff --git a/docs/source/getting_started/citing.rst b/docs/source/getting_started/citing.rst index ff1e1d4..aa69a2f 100644 --- a/docs/source/getting_started/citing.rst +++ b/docs/source/getting_started/citing.rst @@ -16,4 +16,3 @@ if you could cite the following: archivePrefix={arXiv}, primaryClass={cs.LG} } - diff --git a/requirements.txt b/requirements.txt index 2c113a3..e66823b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ numpy pillow==5.3.0 -fastprogress \ No newline at end of file +fastprogress diff --git a/setup.py b/setup.py index d73467d..f026a31 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ def find_version(*file_paths): return version_match.group(1) raise RuntimeError("Unable to find version string.") + VERSION = find_version("torchgan", "__init__.py") requirements = ["numpy", "pillow==5.3.0", "fastprogress"] diff --git a/tests/torchgan/test_layers.py b/tests/torchgan/test_layers.py index 9863223..a9c7b33 100644 --- a/tests/torchgan/test_layers.py +++ b/tests/torchgan/test_layers.py @@ -3,7 +3,6 @@ import unittest import torch - from torchgan.layers import * sys.path.append(os.path.join(os.path.dirname(__file__), "../..")) diff --git a/tests/torchgan/test_losses.py b/tests/torchgan/test_losses.py index 3e5cde8..c440425 100644 --- a/tests/torchgan/test_losses.py +++ b/tests/torchgan/test_losses.py @@ -4,7 +4,6 @@ import torch import torch.distributions as ds - from torchgan.losses import * sys.path.append(os.path.join(os.path.dirname(__file__), "../..")) diff --git a/tests/torchgan/test_metrics.py b/tests/torchgan/test_metrics.py index e58dab3..62b1a5a 100644 --- a/tests/torchgan/test_metrics.py +++ b/tests/torchgan/test_metrics.py @@ -3,7 +3,6 @@ import unittest import torch - from torchgan.metrics import * sys.path.append(os.path.join(os.path.dirname(__file__), "../..")) diff --git a/tests/torchgan/test_models.py b/tests/torchgan/test_models.py index b8b3be9..07acb47 100644 --- a/tests/torchgan/test_models.py +++ b/tests/torchgan/test_models.py @@ -4,7 +4,6 @@ import torch import torch.distributions as distributions - from torchgan.models import * sys.path.append(os.path.join(os.path.dirname(__file__), "../..")) diff --git a/tests/torchgan/test_trainer.py b/tests/torchgan/test_trainer.py index 81ce041..b4bbcfb 100644 --- a/tests/torchgan/test_trainer.py +++ b/tests/torchgan/test_trainer.py @@ -8,7 +8,6 @@ import torchvision.datasets as dsets import torchvision.transforms as transforms from torch.optim import Adam - from torchgan import * from torchgan.losses import * from torchgan.metrics import *