Skip to content

Commit c7d65ae

Browse files
committed
add setup.py and needed files ot create a python module
1 parent 34a1b2f commit c7d65ae

26 files changed

+1188
-0
lines changed

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.bat]
14+
indent_style = tab
15+
end_of_line = crlf
16+
17+
[LICENSE]
18+
insert_final_newline = false
19+
20+
[Makefile]
21+
indent_style = tab

.gitignore

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
*.py[cod]
2+
3+
# C extensions
4+
*.so
5+
6+
# Packages
7+
*.egg
8+
*.egg-info
9+
dist
10+
build
11+
eggs
12+
parts
13+
bin
14+
var
15+
sdist
16+
develop-eggs
17+
.installed.cfg
18+
lib
19+
lib64
20+
21+
# Installer logs
22+
pip-log.txt
23+
24+
# Unit test / coverage reports
25+
.coverage
26+
.tox
27+
nosetests.xml
28+
htmlcov
29+
30+
# Translations
31+
*.mo
32+
33+
# Mr Developer
34+
.mr.developer.cfg
35+
.project
36+
.pydevproject
37+
38+
# Complexity
39+
output/*.html
40+
output/*/index.html
41+
42+
# Sphinx
43+
docs/_build

.travis.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Config file for automatic testing at travis-ci.org
2+
3+
language: python
4+
5+
python:
6+
- "3.4"
7+
- "3.3"
8+
- "2.7"
9+
- "2.6"
10+
- "pypy"
11+
12+
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
13+
install: pip install -r requirements.txt
14+
15+
# command to run tests, e.g. python setup.py test
16+
script: python setup.py test

AUTHORS.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======
2+
Credits
3+
=======
4+
5+
Development Lead
6+
----------------
7+
8+
* Joxean Koret <[email protected]>
9+
10+
Contributors
11+
------------
12+
13+
None yet. Why not be the first?

CONTRIBUTING.rst

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
============
2+
Contributing
3+
============
4+
5+
Contributions are welcome, and they are greatly appreciated! Every
6+
little bit helps, and credit will always be given.
7+
8+
You can contribute in many ways:
9+
10+
Types of Contributions
11+
----------------------
12+
13+
Report Bugs
14+
~~~~~~~~~~~
15+
16+
Report bugs at https://github.com/joxeankoret/multiav/issues.
17+
18+
If you are reporting a bug, please include:
19+
20+
* Your operating system name and version.
21+
* Any details about your local setup that might be helpful in troubleshooting.
22+
* Detailed steps to reproduce the bug.
23+
24+
Fix Bugs
25+
~~~~~~~~
26+
27+
Look through the GitHub issues for bugs. Anything tagged with "bug"
28+
is open to whoever wants to implement it.
29+
30+
Implement Features
31+
~~~~~~~~~~~~~~~~~~
32+
33+
Look through the GitHub issues for features. Anything tagged with "feature"
34+
is open to whoever wants to implement it.
35+
36+
Write Documentation
37+
~~~~~~~~~~~~~~~~~~~
38+
39+
MultiAV could always use more documentation, whether as part of the
40+
official MultiAV docs, in docstrings, or even on the web in blog posts,
41+
articles, and such.
42+
43+
Submit Feedback
44+
~~~~~~~~~~~~~~~
45+
46+
The best way to send feedback is to file an issue at https://github.com/joxeankoret/multiav/issues.
47+
48+
If you are proposing a feature:
49+
50+
* Explain in detail how it would work.
51+
* Keep the scope as narrow as possible, to make it easier to implement.
52+
* Remember that this is a volunteer-driven project, and that contributions
53+
are welcome :)
54+
55+
Get Started!
56+
------------
57+
58+
Ready to contribute? Here's how to set up `multiav` for local development.
59+
60+
1. Fork the `multiav` repo on GitHub.
61+
2. Clone your fork locally::
62+
63+
$ git clone [email protected]:your_name_here/multiav.git
64+
65+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
66+
67+
$ mkvirtualenv multiav
68+
$ cd multiav/
69+
$ python setup.py develop
70+
71+
4. Create a branch for local development::
72+
73+
$ git checkout -b name-of-your-bugfix-or-feature
74+
75+
Now you can make your changes locally.
76+
77+
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
78+
79+
$ flake8 multiav tests
80+
$ python setup.py test
81+
$ tox
82+
83+
To get flake8 and tox, just pip install them into your virtualenv.
84+
85+
6. Commit your changes and push your branch to GitHub::
86+
87+
$ git add .
88+
$ git commit -m "Your detailed description of your changes."
89+
$ git push origin name-of-your-bugfix-or-feature
90+
91+
7. Submit a pull request through the GitHub website.
92+
93+
Pull Request Guidelines
94+
-----------------------
95+
96+
Before you submit a pull request, check that it meets these guidelines:
97+
98+
1. The pull request should include tests.
99+
2. If the pull request adds functionality, the docs should be updated. Put
100+
your new functionality into a function with a docstring, and add the
101+
feature to the list in README.rst.
102+
3. The pull request should work for Python 2.6, 2.7, 3.3, and 3.4, and for PyPy. Check
103+
https://travis-ci.org/joxeankoret/multiav/pull_requests
104+
and make sure that the tests pass for all supported Python versions.
105+
106+
Tips
107+
----
108+
109+
To run a subset of tests::
110+
111+
$ python -m unittest tests.test_multiav

HISTORY.rst

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. :changelog:
2+
3+
History
4+
-------
5+
6+
0.1.0 (2014-02-15)
7+
---------------------
8+
9+
* First release on PyPI.

LICENSE

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright (c) 2014, Joxean Koret
2+
All rights reserved.
3+
4+
Permission to use, copy, modify, and/or distribute this software for any
5+
purpose with or without fee is hereby granted, provided that the above
6+
copyright notice and this permission notice appear in all copies.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

MANIFEST.in

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
include AUTHORS.rst
2+
include CONTRIBUTING.rst
3+
include HISTORY.rst
4+
include LICENSE
5+
include README.rst
6+
7+
recursive-include tests *
8+
recursive-exclude * __pycache__
9+
recursive-exclude * *.py[co]
10+
11+
recursive-include docs *.rst conf.py Makefile make.bat

Makefile

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.PHONY: clean-pyc clean-build docs clean
2+
define BROWSER_PYSCRIPT
3+
import os, webbrowser, sys
4+
try:
5+
from urllib import pathname2url
6+
except:
7+
from urllib.request import pathname2url
8+
9+
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
10+
endef
11+
export BROWSER_PYSCRIPT
12+
BROWSER := python -c "$$BROWSER_PYSCRIPT"
13+
14+
help:
15+
@echo "clean - remove all build, test, coverage and Python artifacts"
16+
@echo "clean-build - remove build artifacts"
17+
@echo "clean-pyc - remove Python file artifacts"
18+
@echo "clean-test - remove test and coverage artifacts"
19+
@echo "lint - check style with flake8"
20+
@echo "test - run tests quickly with the default Python"
21+
@echo "test-all - run tests on every Python version with tox"
22+
@echo "coverage - check code coverage quickly with the default Python"
23+
@echo "docs - generate Sphinx HTML documentation, including API docs"
24+
@echo "release - package and upload a release"
25+
@echo "dist - package"
26+
@echo "install - install the package to the active Python's site-packages"
27+
28+
clean: clean-build clean-pyc clean-test
29+
30+
clean-build:
31+
rm -fr build/
32+
rm -fr dist/
33+
rm -fr .eggs/
34+
find . -name '*.egg-info' -exec rm -fr {} +
35+
find . -name '*.egg' -exec rm -f {} +
36+
37+
clean-pyc:
38+
find . -name '*.pyc' -exec rm -f {} +
39+
find . -name '*.pyo' -exec rm -f {} +
40+
find . -name '*~' -exec rm -f {} +
41+
find . -name '__pycache__' -exec rm -fr {} +
42+
43+
clean-test:
44+
rm -fr .tox/
45+
rm -f .coverage
46+
rm -fr htmlcov/
47+
48+
lint:
49+
flake8 multiav tests
50+
51+
test:
52+
python setup.py test
53+
54+
test-all:
55+
tox
56+
57+
coverage:
58+
coverage run --source multiav setup.py test
59+
coverage report -m
60+
coverage html
61+
$(BROWSER) htmlcov/index.html
62+
63+
docs:
64+
rm -f docs/multiav.rst
65+
rm -f docs/modules.rst
66+
sphinx-apidoc -o docs/ multiav
67+
$(MAKE) -C docs clean
68+
$(MAKE) -C docs html
69+
$(BROWSER) docs/_build/html/index.html
70+
71+
release: clean
72+
python setup.py sdist upload
73+
python setup.py bdist_wheel upload
74+
75+
dist: clean
76+
python setup.py sdist
77+
python setup.py bdist_wheel
78+
ls -l dist
79+
80+
install: clean
81+
python setup.py install

README.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
===============================
2+
MultiAV
3+
===============================
4+
5+
.. image:: https://img.shields.io/travis/joxeankoret/multiav.svg
6+
:target: https://travis-ci.org/joxeankoret/multiav
7+
8+
.. image:: https://img.shields.io/pypi/v/multiav.svg
9+
:target: https://pypi.python.org/pypi/multiav
10+
11+
12+
MultiAV scanner with Python and JSON API
13+
14+
* Free software: ISC license
15+
* Documentation: https://multiav.readthedocs.org.
16+
17+
Features
18+
--------
19+
20+
* TODO

0 commit comments

Comments
 (0)