Skip to content

Commit

Permalink
test(tox): remove tox dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Fisher committed May 26, 2014
1 parent a907dcb commit 16ff949
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 70 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.coverage
.tox

# Packages
*.egg
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ install:
- pip install -rtests/requirements.txt
- pip install .

script: python setup.py nosetests
script: make test
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test:
python setup.py nosetests
flake8
49 changes: 6 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,7 @@ Then edit your docker-registry configuration so that `storage` reads `swift`.

## Options

You may add any of the following to your main docker-registry configuration to further configure it.


1. `storage_path`: /
1. `swift_container`: 'dev_container'
1. `swift_auth_version`: 2
1. `swift_authurl`
1. `swift_user`
1. `swift_password`
1. `swift_tenant_name`
1. `swift_region_name`


Example:
You may add any of the following to your main docker-registry configuration to further configure it:

```yaml
storage: swift
Expand All @@ -42,49 +29,25 @@ swift_tenant_name: _env:OS_TENANT_NAME
swift_region_name: _env:OS_REGION_NAME
```
## Developer setup
## Contributing
Clone this.
Optionnally [install swift](http://docs.openstack.org/developer/swift/howto_installmultinode.html) (rely on the mock otherwise):
Get your python ready:
Install package dependencies:
```
sudo apt-get install python-pip
sudo pip install tox
$ pip install -r requirements.txt
$ pip install -r test/requirements.txt
```

Install the python-swiftclient globally:

`pip install python-swiftclient`

You are ready to hack.
In order to verify what you did is ok, just run `tox`.
In order to verify what you did is ok, just run `make test`.

This will run the tests provided by [`docker-registry-core`](https://github.com/dotcloud/docker-registry/tree/master/depends/docker-registry-core)


## Developer setup caveats

### "Why do I need to install swiftclient globally?"

Because openstack uses a packaging technology ([pbr](http://docs.openstack.org/developer/pbr/)) that breaks miserably when trying to use pip with --egg (in the tox / venv context)

### "Why do we need to use pip with --egg?"

Because python namespaces are broken. Or maybe pip is. Or maybe you read and make your own idea about it :-)

* https://github.com/pypa/pip/issues/3#issuecomment-1659959
* http://stackoverflow.com/questions/17338925/cannot-install-two-packages-that-use-the-same-namespace

## License

This is licensed under the Apache license.
Most of the code here comes from docker-registry, under an Apache license as well.

[pypi-url]: https://pypi.python.org/pypi/docker-registry-driver-swift
[pypi-image]: https://badge.fury.io/py/docker-registry-driver-swift.svg

[travis-url]: http://travis-ci.org/bacongobbler/docker-registry-driver-swift
[travis-image]: https://secure.travis-ci.org/bacongobbler/docker-registry-driver-swift.png?branch=master
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ cover-min-percentage=80
cover-inclusive=1
cover-package=docker_registry.drivers.swift
cover-erase=1
cover-html=1
cover-html-dir=reports
[flake8]
ignore=H102,H304
exclude=.git,*.egg,build,setup.py
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
nose==1.3.3
coverage==3.7.1
flake8==2.1.0
23 changes: 0 additions & 23 deletions tox.ini

This file was deleted.

0 comments on commit 16ff949

Please # to comment.