From 971d3fc8d027efae0f7102cda20c98ed75121efe Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Fri, 9 Sep 2016 13:29:12 +0100 Subject: [PATCH] Django-ification --- CONTRIBUTING.rst | 13 +++++------- README.rst | 6 +++--- docs/contributing.rst | 46 ++++++++++++++++++++++++++---------------- docs/deploying.rst | 2 +- docs/index.rst | 21 +++++++++++++++++-- docs/inshort.rst | 2 +- docs/installation.rst | 2 +- setup.py | 6 +++--- testproject/Dockerfile | 4 ++-- testproject/README.rst | 2 +- testproject/fabfile.py | 8 ++++---- 11 files changed, 69 insertions(+), 43 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 5392a70..de0aef1 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -10,8 +10,10 @@ Examples of contributions include: * Documentation improvements * Bug reports and patch reviews -Setup ------ +For more information, please see our `contribution guide `_. + +Quick Setup +----------- Fork, then clone the repo: @@ -25,9 +27,4 @@ Make your change. Add tests for your change. Make the tests pass: tox -Push to your fork and `submit a pull request `_. - - -At this point you're waiting on us. We like to at least comment on pull requests -within three business days (and, typically, one business day). We may suggest -some changes or improvements or alternatives. +Push to your fork and `submit a pull request `_. diff --git a/README.rst b/README.rst index 9bf3da1..57523f7 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,9 @@ Django Channels =============== -.. image:: https://api.travis-ci.org/andrewgodwin/channels.svg - :target: https://travis-ci.org/andrewgodwin/channels - +.. image:: https://api.travis-ci.org/django/channels.svg + :target: https://travis-ci.org/django/channels + .. image:: https://readthedocs.org/projects/channels/badge/?version=latest :target: http://channels.readthedocs.org/en/latest/?badge=latest diff --git a/docs/contributing.rst b/docs/contributing.rst index 0dba851..1f063de 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -15,34 +15,46 @@ We're looking for help with the following areas: * Feature polish and occasional new feature design * Case studies and writeups -You can find what we're looking to work on right now in two places: +You can find what we're looking to work on in the GitHub issues list for each +of the Channels sub-projects: - * Specific bugs are in the `GitHub issues `_ - * Higher-level tasks are on the `ChannelsTasks Django wiki page `_ + * `Channels issues `_, for the Django integration + * `Daphne issues `_, for the HTTP and Websocket termination + * `asgiref issues `_, for the base ASGI library/memory backend + * `asgi_redis issues `_, for the Redis channel backend + * `asgi_ipc issues `_, for the POSIX IPC channel backend -These are, however, just a suggested list - any offer to help is welcome as long -as it fits the project goals. +Issues are categorized by difficulty level: + * ``exp/beginner``: Easy issues suitable for a first-time contributor. + * ``exp/intermediate``: Moderate issues that need skill and a day or two to solve. + * ``exp/advanced``: Difficult issues that require expertise and potentially weeks of work. -I'm interested, how should I get started? ------------------------------------------ +They are also classified by type: -The best thing to do is to see if there's a `GitHub issue `_ -for the thing you wish to work on - if there is, leave a comment saying you're -going to take it on, and if not, open one describing what you're doing so there's -a place to record information around. + * ``documentation``: Documentation issues. Pick these if you want to help us by writing docs. + * ``bug``: A bug in existing code. Usually easier for beginners as there's a defined thing to fix. + * ``enhancement``: A new feature for the code; may be a bit more open-ended. -If you have questions, you can either open an issue with the questions detailed, -hop on the ``#django-channels`` channel on Freenode IRC, or email Andrew directly -at ``andrew@aeracode.org``. +You should filter the issues list by the experience level and type of work +you'd like to do, and then if you want to take something on leave a comment +and assign yourself to it. If you want advice about how to take on a bug, +leave a comment asking about it, or pop into the IRC channel at +``#django-channels`` on Freenode and we'll be happy to help. + +The issues are also just a suggested list - any offer to help is welcome as long +as it fits the project goals, but you should make an issue for the thing you +wish to do and discuss it first if it's relatively large (but if you just found +a small bug and want to fix it, sending us a pull request straight away is fine). I'm a novice contributor/developer - can I help? ------------------------------------------------ -Of course - just get in touch like above and mention your experience level, -and we'll try the best we can to match you up with someone to mentor you through -the task. +Of course! The issues labelled with ``exp/beginner`` are a perfect place to +get started, as they're usually small and well defined. If you want help with +one of them, pop into the IRC channel at ``#django-channels`` on Freenode or +get in touch with Andrew directly at andrew@aeracode.org. Can you pay me for my time? diff --git a/docs/deploying.rst b/docs/deploying.rst index a7fc3bf..cdfe666 100644 --- a/docs/deploying.rst +++ b/docs/deploying.rst @@ -134,7 +134,7 @@ If you want to support WebSockets, long-poll HTTP requests and other Channels features, you'll need to run a native ASGI interface server, as the WSGI specification has no support for running these kinds of requests concurrently. We ship with an interface server that we recommend you use called -`Daphne `_; it supports WebSockets, +`Daphne `_; it supports WebSockets, long-poll HTTP requests, HTTP/2 *(soon)* and performs quite well. You can just keep running your Django code as a WSGI app if you like, behind diff --git a/docs/index.rst b/docs/index.rst index 140467c..93cdeff 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,9 +17,26 @@ WebSockets with only 30 lines of code. If you want a quick overview, start with :doc:`inshort`. -You can find the Channels repository `on GitHub `_. +If you are interested in contributing, please read our :doc:`contributing` docs! -Contents: + +Projects +-------- + +Channels is comprised of five packages: + + * `Channels `_, the Django integration layer + * `Daphne `_, the HTTP and Websocket termination server + * `asgiref `_, the base ASGI library/memory backend + * `asgi_redis `_, the Redis channel backend + * `asgi_ipc `_, the POSIX IPC channel backend + +This documentation covers the system as a whole; individual release notes and +instructions can be found in the individual repositories. + + +Topics +------ .. toctree:: :maxdepth: 2 diff --git a/docs/inshort.rst b/docs/inshort.rst index b87ac15..8e3facf 100644 --- a/docs/inshort.rst +++ b/docs/inshort.rst @@ -36,7 +36,7 @@ I have to change how I run Django? No, all the new stuff is entirely optional. If you want it, however, you'll change from running Django under a WSGI server, to running: -* An ASGI server, probably `Daphne `_ +* An ASGI server, probably `Daphne `_ * Django worker servers, using ``manage.py runworker`` * Something to route ASGI requests over, like Redis. diff --git a/docs/installation.rst b/docs/installation.rst index 288f12b..3cb4756 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -28,7 +28,7 @@ To install the latest version of Channels, clone the repo, change to the repo, change to the repo directory, and pip install it into your current virtual environment:: - $ git clone git@github.com:andrewgodwin/channels.git + $ git clone git@github.com:django/channels.git $ cd channels $ (environment) $ pip install -e . # the dot specifies the current repo diff --git a/setup.py b/setup.py index 673eb15..834ff64 100644 --- a/setup.py +++ b/setup.py @@ -4,9 +4,9 @@ from channels import __version__ setup( name='channels', version=__version__, - url='http://github.com/andrewgodwin/channels', - author='Andrew Godwin', - author_email='andrew@aeracode.org', + url='http://github.com/django/channels', + author='Django Software Foundation', + author_email='foundation@djangoproject.com', description="Brings event-driven capabilities to Django with a channel system. Django 1.8 and up only.", license='BSD', packages=find_packages(), diff --git a/testproject/Dockerfile b/testproject/Dockerfile index e7e49c4..aeddb65 100644 --- a/testproject/Dockerfile +++ b/testproject/Dockerfile @@ -13,10 +13,10 @@ RUN apt-get update && \ # Install asgi_redis driver and most recent Daphne RUN pip install \ asgi_redis==0.8.3 \ - git+https://github.com/andrewgodwin/daphne.git@#egg=daphne + git+https://github.com/django/daphne.git@#egg=daphne # Clone Channels and install it -RUN git clone https://github.com/andrewgodwin/channels.git /srv/channels/ && \ +RUN git clone https://github.com/django/channels.git /srv/channels/ && \ cd /srv/channels && \ git reset --hard caa589ae708a1a66ba1bdcd24f5fd473040772bd && \ python setup.py install diff --git a/testproject/README.rst b/testproject/README.rst index 55279bc..1136e85 100644 --- a/testproject/README.rst +++ b/testproject/README.rst @@ -74,7 +74,7 @@ Install fabric on your machine. This is highly dependent on what your environmen Git clone this project down to your machine:: - git clone https://github.com/andrewgodwin/channels/ + git clone https://github.com/django/channels/ Relative to where you cloned the directory, move up a couple levels:: diff --git a/testproject/fabfile.py b/testproject/fabfile.py index 3bab83d..6c884dc 100644 --- a/testproject/fabfile.py +++ b/testproject/fabfile.py @@ -13,9 +13,9 @@ def setup_redis(): def setup_channels(): sudo("apt-get update && apt-get install -y git python-dev python-setuptools python-pip") sudo("pip install -U pip") - sudo("pip install -U asgi_redis asgi_ipc git+https://github.com/andrewgodwin/daphne.git@#egg=daphne") + sudo("pip install -U asgi_redis asgi_ipc git+https://github.com/django/daphne.git@#egg=daphne") sudo("rm -rf /srv/channels") - sudo("git clone https://github.com/andrewgodwin/channels.git /srv/channels/") + sudo("git clone https://github.com/django/channels.git /srv/channels/") with cd("/srv/channels/"): sudo("python setup.py install") @@ -34,7 +34,7 @@ def run_worker(redis_ip): # Current loadtesting setup @task -def setup_load_tester(src="https://github.com/andrewgodwin/channels.git"): +def setup_load_tester(src="https://github.com/django/channels.git"): sudo("apt-get update && apt-get install -y git nodejs && apt-get install npm") sudo("npm install -g loadtest") sudo("ln -s /usr/bin/nodejs /usr/bin/node") @@ -59,7 +59,7 @@ def setup_tester(): sudo("apt-get update && apt-get install -y apache2-utils python3-pip") sudo("pip3 -U pip autobahn twisted") sudo("rm -rf /srv/channels") - sudo("git clone https://github.com/andrewgodwin/channels.git /srv/channels/") + sudo("git clone https://github.com/django/channels.git /srv/channels/") @task