Merge pull request #6 from jaywink/travisify

Add travis config
merge-requests/130/head v0.1.1
Jason Robinson 2016-04-03 17:34:29 +03:00
commit 38c32af798
14 zmienionych plików z 70 dodań i 9 usunięć

2
.gitignore vendored
Wyświetl plik

@ -1,5 +1,6 @@
*.py[cod]
__pycache__
.cache
database.sqlite
@ -8,6 +9,7 @@ database.sqlite
# Packages
*.egg
*.eggs
*.egg-info
dist
build

15
.travis.yml 100644
Wyświetl plik

@ -0,0 +1,15 @@
sudo: false
language: python
python:
- "3.4"
- "3.5"
cache:
directories:
- $HOME/.cache/pip
install:
- pip install -r test-requirements.txt
- python setup.py develop
- pip freeze
script: py.test --cov=./
after_success:
- codecov

Wyświetl plik

@ -1,11 +1,24 @@
[![Stories in Ready](https://badge.waffle.io/jaywink/social-federation.png?label=ready&title=Ready)](https://waffle.io/jaywink/social-federation)
## Social-Federation
[![Stories in Ready](https://badge.waffle.io/jaywink/social-federation.png?label=ready&title=Ready)](https://waffle.io/jaywink/social-federation) [![Build Status](https://travis-ci.org/jaywink/social-federation.svg?branch=master)](https://travis-ci.org/jaywink/social-federation) [![codecov.io](https://codecov.io/github/jaywink/social-federation/coverage.svg?branch=master)](https://codecov.io/github/jaywink/social-federation?branch=master) [![Code Health](https://landscape.io/github/jaywink/social-federation/master/landscape.svg?style=flat)](https://landscape.io/github/jaywink/social-federation/master)
[![Code Health](https://landscape.io/github/jaywink/social-federation/master/landscape.svg?style=flat)](https://landscape.io/github/jaywink/social-federation/master)
# Social-Federation
Python library to abstract social federation protocols.
Aims to first support Diaspora and then the W3C SocialWG ActivityStreams 2 based future protocol.
Aims to first support Diaspora and then the W3C SocialWG ActivityPub protocol.
## Requirements
* Python 3.x
## Testing
Install requirements:
pip install -r test-requirements.txt
Run tests:
py.test
## License

Wyświetl plik

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from base64 import b64decode, urlsafe_b64decode, b64encode, urlsafe_b64encode
from json import loads, dumps
from urllib.parse import unquote_plus, quote_plus, urlencode

Wyświetl plik

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from lxml import etree
from unittest.mock import patch

Wyświetl plik

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from federation.entities.base import Post

Wyświetl plik

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from federation.tests.factories.entities import TaggedPostFactory

Wyświetl plik

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from random import shuffle
import factory
from factory import fuzzy

Wyświetl plik

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
ENCRYPTED_DIASPORA_PAYLOAD = """<?xml version='1.0'?>
<diaspora xmlns="https://joindiaspora.com/protocol" xmlns:me="http://salmon-protocol.org/ns/magic-env">
<encrypted_header>{encrypted_header}</encrypted_header>

Wyświetl plik

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import json
from jsonschema import validate, ValidationError
import pytest

Wyświetl plik

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from base64 import urlsafe_b64decode
from lxml import etree
import pytest

Wyświetl plik

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from unittest.mock import patch, Mock
from Crypto.PublicKey import RSA
import pytest

Wyświetl plik

@ -2,13 +2,20 @@
from setuptools import setup, find_packages
description = 'Python library for abstracting social federation protocols'
setup(
name='Social-Federation',
version='0.1.1',
description='Python library for abstracting social federation protocols',
description=description,
long_description=description,
author='Jason Robinson',
author_email='mail@jasonrobinson.me',
maintainer='Jason Robinson',
maintainer_email='mail@jasonrobinson.me',
url='https://github.com/jaywink/social-federation',
download_url='https://github.com/jaywink/social-federation/releases',
packages=find_packages(exclude=["*.tests.*", "*.tests"]),
license="BSD 3-clause",
install_requires=[
@ -19,9 +26,18 @@ setup(
"python-dateutil==2.4.2",
"python-xrd==0.1",
],
tests_require=[
"pytest==2.7.2",
"factory_boy==2.5.2",
],
include_package_data=True,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Communications',
'Topic :: Internet',
],
keywords='federation diaspora activitypub social',
)

Wyświetl plik

@ -0,0 +1,5 @@
pytest==2.9.1
factory_boy==2.5.2
codecov==1.6.3
coverage<4.0a1
pytest-cov==1.8.1