Skip to content

Commit ad2a893

Browse files
committed
Updated project structure and merged pypackage template.
1 parent 16ce779 commit ad2a893

32 files changed

+1453
-138
lines changed

.bumpversion.cfg

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[bumpversion]
2+
# Release procedure
3+
# 1. <major|minor|patch> adds dev suffix
4+
# 2. <release> removes dev suffix.
5+
current_version = 0.6.1dev
6+
commit = True
7+
tag = False
8+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<release>dev)?
9+
serialize =
10+
{major}.{minor}.{patch}{release}
11+
{major}.{minor}.{patch}
12+
13+
[bumpversion:part:release]
14+
optional_value = placeholder
15+
values =
16+
dev
17+
placeholder
18+
19+
[bumpversion:file:setup.py]
20+
search = version='{current_version}'
21+
replace = version='{new_version}'
22+
23+
[bumpversion:file:src/scrapy_redis/__init__.py]
24+
search = __version__ = '{current_version}'
25+
replace = __version__ = '{new_version}'
26+
27+
[bumpversion:file:.cookiecutterrc]
28+
search = version: {current_version}
29+
replace = version: {new_version}

.cookiecutterrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher)
2+
3+
cookiecutter:
4+
email: rolando at rmax.io
5+
full_name: Rolando Espinoza
6+
github_username: rolando
7+
project_name: scrapy-redis
8+
project_package: scrapy_redis
9+
project_short_description: Redis-based components for Scrapy.
10+
project_slug: scrapy-redis
11+
pypi_username: rolando
12+
release_date: '2011-09-01'
13+
use_cython: n
14+
use_pypi_deployment_with_travis: n
15+
use_pytest: y
16+
version: 0.6.1dev
17+
year: 2011-2016

.coveragerc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[paths]
2+
source =
3+
src
4+
5+
[run]
6+
branch = true
7+
source =
8+
scrapy_redis
9+
tests
10+
parallel = true
11+
12+
[report]
13+
show_missing = true
14+
precision = 2
15+
omit =

.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

+44-25
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,62 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
13
*.py[cod]
2-
*.swp
3-
*~
4-
5-
.ropeproject
4+
*$py.class
65

76
# C extensions
87
*.so
98

10-
# Packages
11-
*.egg
12-
*.egg-info
13-
dist
14-
build
15-
eggs
16-
parts
17-
bin
18-
var
19-
sdist
20-
develop-eggs
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/
2124
.installed.cfg
22-
lib
23-
lib64
24-
__pycache__
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
2532

2633
# Installer logs
2734
pip-log.txt
35+
pip-delete-this-directory.txt
2836

2937
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
3040
.coverage
31-
.tox
41+
.coverage.*
42+
.cache
3243
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
3347

3448
# Translations
3549
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
3654

37-
# Mr Developer
38-
.mr.developer.cfg
39-
.project
40-
.pydevproject
55+
# Sphinx documentation
56+
docs/_build/
4157

42-
# JetBrains PyCharm IDE
43-
/.idea/
58+
# PyBuilder
59+
target/
60+
61+
# rope-vim
62+
.ropeproject

.travis.yml

+36-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Config file for automatic testing at travis-ci.org
2+
# This file will be regenerated if you run travis_pypi_setup.py
3+
14
language: python
25
python: 3.5
36
sudo: false
@@ -10,14 +13,45 @@ env:
1013
- SCRAPY_VER=11 PYTHON_VER=27
1114
- SCRAPY_VER=11 PYTHON_VER=34
1215
- SCRAPY_VER=11 PYTHON_VER=35
16+
- SCRAPY_VER=10 PYTHON_VER=py
17+
- SCRAPY_VER=11 PYTHON_VER=py
1318

1419
matrix:
1520
allow_failures:
1621
- env: SCRAPY_VER=11 PYTHON_VER=34
1722
- env: SCRAPY_VER=11 PYTHON_VER=35
23+
- env: SCRAPY_VER=10 PYTHON_VER=py
24+
- env: SCRAPY_VER=11 PYTHON_VER=py
25+
26+
before_install:
27+
- python --version
28+
- uname -a
29+
- lsb_release -a
1830

19-
install:
20-
- pip install -U tox
31+
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
32+
install:
33+
- pip install -U tox twine
34+
- virtualenv --version
35+
- easy_install --version
36+
- pip --version
37+
- tox --version
2138

39+
# command to run tests, e.g. python setup.py test
2240
script:
2341
- tox -v -e py${PYTHON_VER}-scrapy${SCRAPY_VER}
42+
43+
after_failure:
44+
- more .tox/log/* | cat
45+
- more .tox/*/log/* | cat
46+
47+
before_cache:
48+
- rm -fr $HOME/.cache/pip/log
49+
50+
cache:
51+
diretories:
52+
- $HOME/.cache/pip
53+
54+
notifications:
55+
email:
56+
on_sucess: never
57+
on_failure: always

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+
* Rolando Espinoza <rolando at rmax.io>
9+
10+
Contributors
11+
------------
12+
13+
None yet. Why not be the first?

CONTRIBUTING.rst

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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/rolando/scrapy-redis/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+
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 "feature"
36+
is open to whoever wants to implement it.
37+
38+
Write Documentation
39+
~~~~~~~~~~~~~~~~~~~
40+
41+
scrapy-redis could always use more documentation, whether as part of the
42+
official scrapy-redis 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/rolando/scrapy-redis/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 `scrapy-redis` for local development.
61+
62+
1. Fork the `scrapy-redis` repo on GitHub.
63+
2. Clone your fork locally::
64+
65+
$ git clone git@github.com:your_name_here/scrapy-redis.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 scrapy-redis
70+
$ cd scrapy-redis/
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 scrapy_redis 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/rolando/scrapy-redis/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_scrapy_redis

0 commit comments

Comments
 (0)