Skip to content
This repository was archived by the owner on Apr 27, 2020. It is now read-only.

Commit 30de1a9

Browse files
committed
Initial commit
0 parents  commit 30de1a9

30 files changed

+1359
-0
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
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

.github/ISSUE_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* Modem Scraper version:
2+
* Python version:
3+
* Operating System:
4+
5+
### Description
6+
7+
Describe what you were trying to get done.
8+
Tell us what happened, what went wrong, and what you expected to happen.
9+
10+
### What I Did
11+
12+
```
13+
Paste the command(s) you ran and the output.
14+
If there was a crash, please include the traceback here.
15+
```

.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
55+
# Sphinx documentation
56+
docs/_build/
57+
58+
# PyBuilder
59+
target/
60+
61+
# pyenv python configuration file
62+
.python-version

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
deploy:
2+
true:
3+
python: 2.7
4+
repo: nightexcessive/modemscraper
5+
tags: true
6+
distributions: sdist bdist_wheel
7+
password:
8+
secure: FOums9R8tT7ASMIz1PLfiHFWYsPqOxJ0mm4DQaD6tfIJheW3isIWxVg0s1SC+r9iGGGMvhYVkY+OPA+i+YxsQIixdetnCZ1XtUS28XZhJYTBY1HIl5KpV2j8qDfI3CHOsv4wgbMDav/3F/cZEDf6Vn6hzKmfAeBMAddDk+bBmAfCr/unybfN+JAjDEd4ixEe5LM8ppUSr62XemFGNSnOw1QHlKa2Tq8udCQf+zmgdyys8Po0QT4wb/OB5oevddF6jwuqPw8i22RQyHDU+Q8ApsjU14m9KFMAPiwBx8+Uh9dkpVk+sGYJ6epFmLQcBkAwgee5T0sn0GHVQX5BwHI8jk0TPzEBANHHGIoHdU87OZ0rwJuj/fA86t7OPFgwp1iQ0ElxRHYvAI67e15IEZujDLZgV5BOFmXASMQck5t8K4CXCTEui9puUL3Pv7U53avdlXMPkrXlJN2sENfWXUzXjhLhnEagrOuUTiZGdwYc35C4Knh4iQbvRdN85FtqZVWvnEkSC94S4G5HWcds18djpm8JtKcSketgaBalrmOOjurcbA9JUGzZhCsU4RiOsKD6hDkQ/r4eDM/p59yXavWBKKXncqLeueyGmzdWMwb+J8P9zuDZDSGkPnwiJ/T/lW3xWwtqaKw2u3COmzgtIWJJZAsrfFjyw2e9LIwpZWrFdp4=
9+
provider: pypi
10+
user: nightexcessive
11+
install: pip install -U tox-travis
12+
language: python
13+
python:
14+
- 3.5
15+
- 3.4
16+
- 3.3
17+
- 2.7
18+
- 2.6
19+
script: tox

AUTHORS.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======
2+
Credits
3+
=======
4+
5+
Development Lead
6+
----------------
7+
8+
* Michael Johnson <michael@johnson.computer>
9+
10+
Contributors
11+
------------
12+
13+
None yet. Why not be the first?

CONTRIBUTING.rst

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

HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=======
2+
History
3+
=======
4+
5+
0.1.0 (2017-06-29)
6+
------------------
7+
8+
* First release on PyPI.

LICENSE

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
GNU GENERAL PUBLIC LICENSE
3+
Version 3, 29 June 2007
4+
5+
Modem scraper retrieves important information from Surfboard-like modem status pages.
6+
Copyright (C) 2017 Michael Johnson
7+
8+
This program is free software: you can redistribute it and/or modify
9+
it under the terms of the GNU General Public License as published by
10+
the Free Software Foundation, either version 3 of the License, or
11+
(at your option) any later version.
12+
13+
This program is distributed in the hope that it will be useful,
14+
but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
GNU General Public License for more details.
17+
18+
You should have received a copy of the GNU General Public License
19+
along with this program. If not, see <http://www.gnu.org/licenses/>.
20+
21+
Also add information on how to contact you by electronic and paper mail.
22+
23+
You should also get your employer (if you work as a programmer) or school,
24+
if any, to sign a "copyright disclaimer" for the program, if necessary.
25+
For more information on this, and how to apply and follow the GNU GPL, see
26+
<http://www.gnu.org/licenses/>.
27+
28+
The GNU General Public License does not permit incorporating your program
29+
into proprietary programs. If your program is a subroutine library, you
30+
may consider it more useful to permit linking proprietary applications with
31+
the library. If this is what you want to do, use the GNU Lesser General
32+
Public License instead of this License. But first, please read
33+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
34+
35+

MANIFEST.in

Lines changed: 11 additions & 0 deletions
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 *.jpg *.png *.gif

Makefile

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

0 commit comments

Comments
 (0)