kopia lustrzana https://gitlab.com/jaywink/federation
commit
38c32af798
|
@ -1,5 +1,6 @@
|
|||
*.py[cod]
|
||||
__pycache__
|
||||
.cache
|
||||
|
||||
database.sqlite
|
||||
|
||||
|
@ -8,6 +9,7 @@ database.sqlite
|
|||
|
||||
# Packages
|
||||
*.egg
|
||||
*.eggs
|
||||
*.egg-info
|
||||
dist
|
||||
build
|
||||
|
|
|
@ -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
|
21
README.md
21
README.md
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from datetime import datetime
|
||||
from lxml import etree
|
||||
from unittest.mock import patch
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from datetime import datetime
|
||||
|
||||
from federation.entities.base import Post
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from federation.tests.factories.entities import TaggedPostFactory
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from random import shuffle
|
||||
import factory
|
||||
from factory import fuzzy
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
from jsonschema import validate, ValidationError
|
||||
import pytest
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from base64 import urlsafe_b64decode
|
||||
from lxml import etree
|
||||
import pytest
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from unittest.mock import patch, Mock
|
||||
from Crypto.PublicKey import RSA
|
||||
import pytest
|
||||
|
|
26
setup.py
26
setup.py
|
@ -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',
|
||||
)
|
||||
|
|
|
@ -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
|
Ładowanie…
Reference in New Issue