diff --git a/.github/actions/ssh-agent/action.yml b/.github/actions/ssh-agent/action.yml index 1d721f5..78e2aa9 100644 --- a/.github/actions/ssh-agent/action.yml +++ b/.github/actions/ssh-agent/action.yml @@ -26,9 +26,11 @@ runs: - name: setup read ssh key file shell: bash -e {0} working-directory: /tmp + env: + READ_SSH_KEY: ${{ inputs.read_github_ssh_key }} if: inputs.read_github_ssh_key != '' run: | - echo "${{ inputs.read_github_ssh_key }}" >> ~/.ssh/github.com.rsa + echo "$READ_SSH_KEY" >> ~/.ssh/github.com.rsa chmod 600 ~/.ssh/github.com.rsa ssh-add ~/.ssh/github.com.rsa @@ -43,9 +45,11 @@ runs: - name: setup write ssh key file shell: bash -e {0} working-directory: /tmp + env: + WRITE_SSH_KEY: ${{ inputs.write_github_ssh_key }} if: inputs.write_github_ssh_key != '' run: | - echo "${{ inputs.write_github_ssh_key }}" >> ~/.ssh/write.github.com.rsa + echo "$WRITE_SSH_KEY" >> ~/.ssh/write.github.com.rsa chmod 600 ~/.ssh/write.github.com.rsa ssh-add ~/.ssh/write.github.com.rsa diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfb44fc..21d28df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,7 @@ jobs: echo "password=$PYPI_TOKEN" >> ~/.pypirc - name: release run: | - python3 -m pip install --upgrade twine + python3 -m pip install --upgrade setuptools wheel build twine make build python3 -m twine upload --repository pypi dist/* echo "deployed to pypi" diff --git a/Makefile b/Makefile index fdbcf6d..ca86d81 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,11 @@ all: setup test setup: pip3 install pipenv && pipenv install --dev test: - pipenv run python setup.py pytest + pipenv run pytest doc: pipenv run pdoc deriv_api --force --html -o docs/html --template-dir docs/templates build: - pip3 install build && python3 -m build + pip3 install --upgrade setuptools wheel build && python3 -m build coverage: pipenv run coverage run --source deriv_api -m pytest && pipenv run coverage report -m gh-pages: diff --git a/Pipfile b/Pipfile index 1a9e8d4..b0ef96a 100644 --- a/Pipfile +++ b/Pipfile @@ -2,6 +2,7 @@ websockets = "==10.3" reactivex = "==4.0.*" deriv-api = {editable = true, path = "."} +mako = ">=1.3.6" [dev-packages] pytest = "*" diff --git a/Pipfile.lock b/Pipfile.lock index f8fbf78..4e3bccc 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "0473436482d0760386ef52c623c0720805af622a29e7daf7fb4c363d5ed90a96" + "sha256": "8bfd793999eca2fad61949b5b3077645e6735a5cd35253cd58c13b2fc59daacb" }, "pipfile-spec": 6, "requires": {}, @@ -18,6 +18,82 @@ "editable": true, "path": "." }, + "mako": { + "hashes": [ + "sha256:9ec3a1583713479fae654f83ed9fa8c9a4c16b7bb0daba0e6bbebff50c0d983d", + "sha256:a91198468092a2f1a0de86ca92690fb0cfc43ca90ee17e15d93662b4c04b241a" + ], + "index": "pypi", + "markers": "python_version >= '3.8'", + "version": "==1.3.6" + }, + "markupsafe": { + "hashes": [ + "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4", + "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", + "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0", + "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", + "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", + "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13", + "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", + "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca", + "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", + "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832", + "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0", + "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b", + "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579", + "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", + "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", + "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff", + "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", + "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", + "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", + "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb", + "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e", + "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", + "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a", + "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d", + "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a", + "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b", + "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8", + "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", + "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", + "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144", + "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f", + "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", + "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d", + "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93", + "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", + "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158", + "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84", + "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", + "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", + "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171", + "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", + "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", + "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", + "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d", + "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", + "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", + "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", + "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", + "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29", + "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", + "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798", + "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c", + "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", + "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", + "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", + "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a", + "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178", + "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", + "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", + "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", + "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50" + ], + "markers": "python_version >= '3.9'", + "version": "==3.0.2" + }, "python-deriv-api": { "editable": true, "path": "." @@ -157,11 +233,12 @@ }, "mako": { "hashes": [ - "sha256:23aab11fdbbb0f1051b93793a58323ff937e98e34aece1c4219675122e57e4ba", - "sha256:9a7c7e922b87db3686210cf49d5d767033a41d4010b284e747682c92bddd8b39" + "sha256:3724869b363ba630a272a5f89f68c070352137b8fd1757650017b7e06fda163f", + "sha256:8efcb8004681b5f71d09c983ad5a9e6f5c40601a6ec469148753292abc0da534" ], + "index": "pypi", "markers": "python_version >= '3.7'", - "version": "==1.2.0" + "version": "==1.2.2" }, "markdown": { "hashes": [ diff --git a/README.md b/README.md index 68368a1..a2f53c6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A python implementation of deriv api library. [![PyPI](https://img.shields.io/pypi/v/python_deriv_api.svg?style=flat-square)](https://pypi.org/project/python_deriv_api/) [![Python 3.9.6](https://img.shields.io/badge/python-3.9.6-blue.svg)](https://www.python.org/download/releases/3.9.6/) -[![Test status](https://circleci.com/gh/binary-com/python-deriv-api.svg?style=shield&circle-token=8b7c7b39615ea83053044854105bf90975b18126)](https://app.circleci.com/pipelines/github/binary-com/python-deriv-api) +[![Test status](https://github.com/deriv-com/python-deriv-api/actions/workflows/build.yml/badge.svg)](https://github.com/deriv-com/python-deriv-api) Go through [api.deriv.com](https://api.deriv.com/) to know simple easy steps on how to register and get access. Use this all-in-one python library to set up and make your app running or you can extend it. @@ -58,13 +58,13 @@ If you pass the connection it's up to you to reconnect in case the connection dr # Documentation #### API reference -The complete API reference is hosted [here](https://binary-com.github.io/python-deriv-api/) +The complete API reference is hosted [here](https://deriv-com.github.io/python-deriv-api/) -Examples [here](https://github.com/binary-com/python-deriv-api/tree/master/examples) +Examples [here](https://github.com/deriv-com/python-deriv-api/tree/master/examples) # Development ``` -git clone https://github.com/binary-com/python-deriv-api +git clone https://github.com/deriv-com/python-deriv-api cd python-deriv-api ``` Setup environment diff --git a/scripts/regen-py.pl b/scripts/regen-py.pl index 2264203..e1db095 100644 --- a/scripts/regen-py.pl +++ b/scripts/regen-py.pl @@ -114,7 +114,7 @@ sub needs_method_arg { return 1; } -emit_functions($ENV{BINARYCOM_API_SCHEMA_PATH} // '/home/git/binary-com/deriv-developers-portal/config/v3'); +emit_functions($ENV{BINARYCOM_API_SCHEMA_PATH} // '/home/git/deriv-com/deriv-api-docs/config/v3'); my $template = Template->new( INCLUDE_PATH => "$distroot/scripts/templates", diff --git a/setup.py b/setup.py index adbe11c..c5b3c7b 100644 --- a/setup.py +++ b/setup.py @@ -9,13 +9,12 @@ author_email='learning+python@deriv.com', license='MIT', install_requires=['websockets==10.3', 'reactivex==4.0.*'], - test_suite='tests', - url='https://github.com/binary-com/python-deriv-api', + url='https://github.com/deriv-com/python-deriv-api', project_urls={ - 'Bug Tracker': "https://github.com/binary-com/python-deriv-api/issues", - 'Documentation': "https://binary-com.github.io/python-deriv-api", - 'Source Code': "https://github.com/binary-com/python-deriv-api", - 'Changelog': "https://github.com/binary-com/python-deriv-api/blob/master/CHANGELOG.md" + 'Bug Tracker': "https://github.com/deriv-com/python-deriv-api/issues", + 'Documentation': "https://deriv-com.github.io/python-deriv-api", + 'Source Code': "https://github.com/deriv-com/python-deriv-api", + 'Changelog': "https://github.com/deriv-com/python-deriv-api/blob/master/CHANGELOG.md" }, python_requires=">=3.9.6, !=3.9.7", classifiers=[