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

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: quantmind/pulsar
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.5.2
Choose a base ref
...
head repository: quantmind/pulsar
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 364 changed files with 11,711 additions and 11,463 deletions.
159 changes: 159 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
version: 2
jobs:
main:
working_directory: ~/pulsar-current
docker:
- image: python:3.6.3
- image: redis
steps:
- checkout
- run:
name: install packages
command: ci/install.sh
- run:
name: test
command: make compile && make test
docs:
working_directory: ~/docs
docker:
- image: python:3.6.3
steps:
- checkout
- run:
name: install enchant
command: apt-get update && apt-get install enchant -y
- run:
name: install packages
command: python setup.py install && pip install -r requirements/test-docs.txt
- run:
name: build docs
command: make docs
- run:
name: docs spelling
command: make docs-spelling
coverage:
working_directory: ~/pulsar-coverage
docker:
- image: python:3.6.3
- image: redis
steps:
- checkout
- run:
name: install packages
command: ci/install.sh
- run:
name: run and publish coverage
command: make coverage && codecov
legacy:
working_directory: ~/pulsar-legacy
docker:
- image: python:3.5.4
- image: redis
steps:
- checkout
- run:
name: install packages
command: ci/install.sh
- run:
name: test
command: make compile && make test
build-dev:
working_directory: ~/pulsar-dev
docker:
- image: python:3.7-rc
- image: redis
steps:
- checkout
- run:
name: install packages
command: ci/install.sh
- run:
name: test
command: make compile && make test
binaries:
machine: true
environment:
- PYTHON_VERSIONS: 3.5 3.6
- PYMODULE: pulsar
steps:
- checkout
- run:
name: install ci packages
command: pip install -r requirements/ci.txt
- run:
name: check PyPI version
command: make pypi-check
- run:
name: build linux wheels
command: make wheels-linux
- run:
name: upload linux wheels
command: make wheels-upload
deploy-release:
working_directory: ~/deploy
docker:
- image: python:3.6.3
steps:
- checkout
- run:
name: install packages
command: ci/install.sh && make compile
- run:
name: download wheels
command: make wheels-download
- run:
name: create source distribution
command: python setup.py sdist
- run:
name: release source distribution
command: twine upload dist/* --username lsbardel --password $PYPI_PASSWORD
- run:
name: release wheels
command: twine upload wheelhouse/* --username lsbardel --password $PYPI_PASSWORD
- run:
name: tag
command: ci/tag.sh

workflows:
version: 2
build-deploy:
jobs:
- main:
filters:
branches:
ignore: deploy
tags:
ignore: /.*/
- coverage:
filters:
branches:
ignore: deploy
tags:
ignore: /.*/
- legacy:
filters:
branches:
ignore: deploy
tags:
ignore: /.*/
- docs:
filters:
branches:
ignore: deploy
tags:
ignore: /.*/
- binaries:
requires:
- main
- legacy
filters:
branches:
only: release
tags:
ignore: /.*/
- deploy-release:
filters:
branches:
only: deploy
tags:
ignore: /.*/
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
source = pulsar,examples
concurrency = greenlet,multiprocessing
omit =
pulsar/__init__.py
pulsar/utils/system/winservice.py
pulsar/utils/system/windowssystem.py
pulsar/utils/system/winprocess.py
@@ -12,6 +13,7 @@ omit =
pulsar/apps/test/plugins/bench.py
pulsar/apps/test/cov.py
pulsar/apps/test/plugins/profile.py
pulsar/cmds/*
examples/httpbin/config.py
examples/httpbin/throttle.py
examples/philosophers/config.py
22 changes: 22 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
* **pulsar version**:
* **python version**:
* **platform**:

## Description

<!-- Please describe your problem and why the fix is important. -->

## Expected behaviour

<!-- What is the behaviour you expect? -->

## Actual behaviour

<!-- What's actually happening? -->

## Steps to reproduce

<!-- Please describe steps to reproduce the issue.
If you have a script that does that please include it here within
markdown code markup -->

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -9,15 +9,17 @@ __pycache__
build
docs/build
dist
wheelhouse
htmlcov
htmlprof
venv
.coverage
.coveralls-repo-token
MANIFEST
.settings
.python-version
release-notes.md
extensions/lib/lib.c
extensions/lib/clib.c

# IDE
.DS_Store
43 changes: 25 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
language: python
language: generic

python:
- 3.5.2
# - 3.6-dev
osx_image: xcode9.1

services:
- redis-server
branches:
only:
- release

env:
global:
- PYMODULE=pulsar
- WHEEL=macosx

matrix:
fast_finish: true

include:
- os: osx
env: PYTHON_VERSION=3.5.4

- os: osx
env: PYTHON_VERSION=3.6.3

install:
- sudo apt-get install enchant
- pip install -r requirements-dev.txt
- if [[ $TRAVIS_PYTHON_VERSION == 3.5.2 ]]; then pip install uvloop; fi
- ci/mac-pre-install.sh
- source venv/bin/activate && ci/install.sh

script:
- python setup.py test --coverage -q
- flake8
- if [[ $TRAVIS_PYTHON_VERSION == 3.5.2 ]]; then python setup.py test --coveralls; fi
# - if [[ $TRAVIS_PYTHON_VERSION == 3.5.2 ]]; then python setup.py test -q --io uv; fi
- python setup.py bench
# - if [[ $TRAVIS_PYTHON_VERSION == 3.5.2 ]]; then cd docs && make spelling; fi

notifications:
email: false
- source venv/bin/activate && make pypi-check
- source venv/bin/activate && make wheels-mac
- source venv/bin/activate && make wheels-upload
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2016 Quantmind
Copyright (c) 2011-2017 Quantmind

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
20 changes: 11 additions & 9 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
include MANIFEST.in
include LICENSE
include README.rst
include docs/make.bat
include docs/Makefile
recursive-include examples *.py *.js *.css *.html *.json
recursive-include tests *.py *.txt
recursive-include pulsar/apps/test/plugins/htmlfiles *.js *.css *.html
recursive-include docs/source *
recursive-include extensions *.py *.pxd *.pyx *.h *.c
prune examples/node_modules
include Makefile
graft pulsar
graft docs
graft requirements
graft examples
graft extensions
graft tests
global-exclude *.pyc
global-exclude *.pyd
global-exclude *.so
global-exclude *.mp4
77 changes: 77 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

PYTHON ?= python
PIP ?= pip
DOCS_SOURCE ?= docs
DOCS_BUILDDIR ?= build/docs

.PHONY: help

help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

clean: ## clean build directory and cache files
rm -fr dist/ *.eggs .eggs build/ pulsar/utils/*.so extensions/lib/clib.c
find . -name '__pycache__' | xargs rm -rf
find . -name '*.pyc' | xargs rm -rf
find . -name '.DS_Store' | xargs rm -rf

compile: ## clean and build extension in place (for development)
make clean
$(PYTHON) setup.py build_ext -i

docs: ## build html documentation
mkdir -p build/docs/html
$(PYTHON) -m sphinx -a -b html $(DOCS_SOURCE) $(DOCS_BUILDDIR)/html

docs-spelling: ## check documentation spelling
$(PYTHON) -m sphinx -a -b spelling $(DOCS_SOURCE) $(DOCS_BUILDDIR)/spelling

test: ## flake8 and unit-tests with uvloop
flake8
$(PYTHON) -W ignore setup.py test -q --io uv

testpy: ## pure python library unit tests (PULSARPY=yes)
export PULSARPY=yes
$(PYTHON) -W ignore setup.py test -q

coverage: ## run tunit tests with coverage
export PULSARPY=yes; $(PYTHON) -W ignore setup.py test --coverage -q

testall:
flake8
$(PYTHON) -W ignore setup.py test -q
$(PYTHON) -W ignore setup.py test -q --io uv
$(PYTHON) setup.py bench

pypi-check: ## check if current version is valid for a new pypi release
$(PYTHON) setup.py pypi --final

wheels: ## build platform wheels
make clean
$(PYTHON) setup.py bdist_wheel

wheels-mac: ## create wheels for Mac OSX **must be run from a mac**
export PYMODULE=pulsar; export WHEEL=macosx; export CI=true; ./pulsar/cmds/build-wheels.sh

wheels-linux: ## create linux wheels for python 3.5 & 3.6
rm -rf wheelhouse
$(PYTHON) setup.py linux_wheels --py 3.5,3.6

wheels-test: ## run tests using wheels distribution
rm -rf tmp
mkdir tmp
cp -r tests tmp/tests
cp -r examples tmp/examples
cp -r docs tmp/docs
cp runtests.py tmp/runtests.py
cd tmp && $(PYTHON) runtests.py
rm -rf tmp

wheels-upload: ## upload wheels to s3
$(PYTHON) setup.py s3data --bucket fluidily --key wheelhouse --files "wheelhouse/*.whl"

wheels-download:## download wheels from s3
$(PYTHON) setup.py s3data --bucket fluidily --key wheelhouse --download

release: clean compile test
$(PYTHON) setup.py sdist bdist_wheel upload
Loading