Skip to content

Commit

Permalink
Add precommit hooks (#120)
Browse files Browse the repository at this point in the history
* Add paper information to README and docs

* Upgrade to stable version

* Add pre-commit hooks
  • Loading branch information
avik-pal committed Oct 19, 2019
1 parent a06bd8c commit 10b0837
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 11 deletions.
1 change: 0 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ install:

test_script:
- "%PYTHON%/python setup.py test"

11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ jobs:
- source deactivate

# Auto Deploy to Pip and Conda from here itself

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<a href="https://github.com/torchgan/torchgan/graphs/contributors"><img src="https://opencollective.com/torchgan/contributors.svg?width=890&button=false" /></a>

1 change: 0 additions & 1 deletion docs/source/getting_started/citing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ if you could cite the following:
archivePrefix={arXiv},
primaryClass={cs.LG}
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy
pillow==5.3.0
fastprogress
fastprogress
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
1 change: 0 additions & 1 deletion tests/torchgan/test_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import unittest

import torch

from torchgan.layers import *

sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
Expand Down
1 change: 0 additions & 1 deletion tests/torchgan/test_losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__), "../.."))
Expand Down
1 change: 0 additions & 1 deletion tests/torchgan/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import unittest

import torch

from torchgan.metrics import *

sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
Expand Down
1 change: 0 additions & 1 deletion tests/torchgan/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__), "../.."))
Expand Down
1 change: 0 additions & 1 deletion tests/torchgan/test_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down

0 comments on commit 10b0837

Please sign in to comment.