-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from gappleto97/develop
Increment to protocol version 4
- Loading branch information
Showing
108 changed files
with
11,930 additions
and
2,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c_src/* linguist-language=C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
./docs/py2p/.build/* | ||
./docs/py2p/.static/* | ||
./docs/py2p/.templates/* | ||
./docs/py2p/py2p/* | ||
**.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
[submodule "js_src/SHA"] | ||
path = js_src/SHA | ||
url = https://github.com/Caligatio/jsSHA | ||
[submodule "js_src/BigInteger"] | ||
path = js_src/BigInteger | ||
url = https://github.com/peterolson/BigInteger.js | ||
[submodule "js_src/pack"] | ||
path = js_src/pack | ||
url = https://github.com/ryanrolds/bufferpack | ||
[submodule "js_src/zlib"] | ||
path = js_src/zlib | ||
url = https://github.com/imaya/zlib.js | ||
[submodule "cp_src/zlib"] | ||
path = c_src/zlib | ||
url = https://github.com/madler/zlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
js_src/test_doc.js | ||
c_src/ | ||
cp_src/ | ||
go_src/ | ||
jv_src/ | ||
py_src/ | ||
doc/ | ||
.rst | ||
.yml | ||
Makefile | ||
MANIFEST.in | ||
.coveragerc | ||
setup.cfg | ||
setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
IF DEFINED PIP ( | ||
ECHO %PYTHON% %PYTHON_VERSION%%APPVEYOR_BUILD_FOLDER% | ||
set HOME=%APPVEYOR_BUILD_FOLDER% | ||
%PYPY% | ||
%PIP% install --upgrade setuptools | ||
%PIP% install pytest-coverage codecov cryptography wheel | ||
cd %HOME% | ||
%RUN% -m pytest -c setup.cfg --cov=./py_src/ ./py_src/ || goto :error | ||
%RUN% setup.py sdist --universal | ||
%PIP% install --no-index --find-links=.\\dist\\ py2p | ||
%RUN% setup.py bdist_wheel | ||
%RUN% setup.py build | ||
FOR /F %%v IN ('%RUN% -c "import sys, sysconfig; print(\"{}.{}-{v[0]}.{v[1]}\".format(\"lib\", sysconfig.get_platform(), v=sys.version_info))"') DO SET BUILD_DIR=%%v | ||
ren .coverage .covvv | ||
%RUN% -m pytest -c setup.cfg --cov=build\\%BUILD_DIR% build\\%BUILD_DIR% || goto :error | ||
ren .covvv .coverage.1 | ||
ren .coverage .coverage.2 | ||
%COV% combine | ||
%COV% xml | ||
%RUN% -c "import codecov; codecov.main('--token=d89f9bd9-27a3-4560-8dbb-39ee3ba020a5', '--file=coverage.xml')" | ||
) ELSE ( | ||
dir C:\avvm\node | ||
powershell -Command "Install-Product node $env:NODE" | ||
npm install . | ||
npm install -g mocha babel-cli | ||
mocha js_src\\test\\* || goto :error | ||
babel js_src --out-dir build\\es5 | ||
mocha build\\es5\\test\\* || goto :error | ||
) | ||
goto :EOF | ||
|
||
:error | ||
ECHO Failed with error #%errorlevel%. | ||
exit /b %errorlevel% |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
set -e; | ||
if [ $pyver ]; then | ||
pip install codecov | ||
make cpython pytestdeps | ||
py.test -vv --cov=./py_src/ ./py_src/ | ||
python setup.py sdist --universal && pip install --no-index --find-links=./dist/ py2p | ||
mv .coverage .covvv | ||
make cpytest cov=true | ||
mv .covvv .coverage.1 | ||
mv .coverage .coverage.2 | ||
coverage combine | ||
coverage xml | ||
codecov --token=d89f9bd9-27a3-4560-8dbb-39ee3ba020a5 --file=coverage.xml | ||
elif [ $jsver ]; then | ||
sudo apt-get install build-essential libssl-dev | ||
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash | ||
export NVM_DIR="$HOME/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | ||
command -v nvm | ||
nvm install $jsver | ||
nvm use $jsver | ||
node --version | ||
make jstest | ||
make ES5test | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
set -e; | ||
if [ $pyver ]; then | ||
if [ $pyver != pypy ] && [ $pyver != pypy3 ]; then | ||
git clone https://github.com/gappleto97/terryfy; | ||
source terryfy/travis_tools.sh; | ||
get_python_environment $pydist $pyver; | ||
fi | ||
if [ $pyver == pypy ] || [ $pyver == pypy3 ]; then | ||
brew install $pyver; export PYTHON_EXE=$pyver; | ||
curl $GET_PIP_URL > $DOWNLOADS_SDIR/get-pip.py; | ||
sudo $PYTHON_EXE $DOWNLOADS_SDIR/get-pip.py --ignore-installed; | ||
export PIP_CMD="sudo $PYTHON_EXE -m pip"; | ||
fi | ||
$PIP_CMD install virtualenv; | ||
virtualenv -p $PYTHON_EXE venv; | ||
source venv/bin/activate; | ||
make cpython; | ||
pip install pytest-coverage codecov wheel | ||
py.test -vv --cov=./py_src/ ./py_src/ | ||
python setup.py sdist --universal && pip install --no-index --find-links=./dist/ py2p | ||
python setup.py bdist_wheel | ||
mv .coverage .covvv | ||
make cpytest cov=true | ||
mv .covvv .coverage.1 | ||
mv .coverage .coverage.2 | ||
python -m coverage combine; | ||
python -m coverage xml; | ||
codecov --token=d89f9bd9-27a3-4560-8dbb-39ee3ba020a5 --file=coverage.xml | ||
else | ||
make jstest; | ||
make ES5test; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
Contributing | ||
============ | ||
|
||
Issues | ||
~~~~~~ | ||
|
||
You may submit an issue via `this link`_ if you have a GitHub account, | ||
or `this one`_ if you do not. | ||
|
||
Issues should have a description of the problem, as well as all of the | ||
following, if possible | ||
|
||
#. A log from this time | ||
#. The output from ``node.status`` | ||
|
||
Big Fixes | ||
~~~~~~~~~ | ||
|
||
Bug fixes should be submitted as a pull request. If you are submitting a | ||
bug fix, please title it as such, and provide a description of the bug | ||
you’re fixing. | ||
|
||
Because I use waffle.io, I appreciate it if the description includes a | ||
list like the following: | ||
|
||
- Connects to #71 | ||
- Connects to #99 | ||
- Connects to #108 | ||
|
||
This associates the pull request with the related issues. | ||
|
||
New Features | ||
~~~~~~~~~~~~ | ||
|
||
New features should be submitted as a pull request. If you are | ||
submitting a new feature, please title it as such, and provide a | ||
description of it. Any new feature should maintain the current API where | ||
possible, and make explicit when it does not. Your PR will not be merged | ||
until the other implementations can be made to match it, so it helps if | ||
you try to implement it in them as well. | ||
|
||
Because I use waffle.io, I appreciate it if the description includes a | ||
list like the following: | ||
|
||
- Connects to #71 | ||
- Connects to #99 | ||
- Connects to #108 | ||
|
||
This associates the pull request with the related issues. | ||
|
||
New Network Schemas | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
If you want to add a new network schema, the following things are | ||
required. These are written for the Python implementation, but it | ||
applies to the others where possible. | ||
|
||
#. It must keep the current inheritence structure (ie, “socket”, daemon, | ||
connection, inheriting from base\_socket, base\_daemon, | ||
base\_connection) | ||
#. It must use the current packet format (or any changes must be | ||
propagated to the other schemas) | ||
#. Where possible, it should use the same flags as the current OP-codes | ||
#. Where possible, it should keep a similar API | ||
#. Message handlers should use the ``register_handler`` mechanism | ||
|
||
New Language Implementations | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
If you would like to write an implementation in a new language, thank | ||
you! Following these rules will make things much faster to merge, though | ||
exceptions can be made if necessary. | ||
|
||
#. The new implementation should be in a folder labelled lang\_src (ex: | ||
py\_src) | ||
#. Setup scripts should be in the top level folder | ||
#. It must at minimum support the mesh network implementation | ||
#. Where possible, it should maintain the current | ||
inheritence/architecture scheme | ||
#. Where possible, it should use the same flags as the current OP-codes | ||
#. Where possible, it should keep a similar API | ||
#. Where possible, it should have unit tests | ||
#. Where reasonable, users should be able to register custom callbacks | ||
|
||
When this is ready, submit this as a pull request. If you name it as | ||
such, it will take priority over everything but critical bugfixes. After | ||
a review, we will discuss possible changes and plans for future | ||
modifications, and then merge. | ||
|
||
.. _this link: https://github.com/gappleto97/p2p-project/issues/new | ||
.. _this one: https://gitreports.com/issue/gappleto97/p2p-project |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
include LICENSE | ||
include CONTRIBUTING.md | ||
include README.md | ||
include setup.py | ||
include .coveragerc | ||
include py_src/*.rst | ||
include py_src/*.py | ||
include py_src/test/*.py | ||
|
||
exclude MANIFEST.in |
Oops, something went wrong.