Skip to content

Commit 9a01dd4

Browse files
author
github-actions
committed
build: 5e16f0be1ca97a9874f87cf0adf3f115da51d8f6
1 parent d937aa9 commit 9a01dd4

File tree

16 files changed

+894
-0
lines changed

16 files changed

+894
-0
lines changed

.github/workflows/reusable.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# .github/workflows/reusable-workflow.yml
2+
name: branch default workflow
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
exchange_name:
8+
description: "exchange-name of repo to transfer"
9+
required: true
10+
type: string
11+
12+
jobs:
13+
distribute_job:
14+
if: (contains(github.event.head_commit.message, 'build') && !contains(github.event.head_commit.message, 'skip ci'))
15+
name: distribute-job
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.ref }}
22+
persist-credentials: false
23+
24+
- name: Push to another repo (approach A)
25+
if: (!contains(github.event.head_commit.message, 'BUILD_WITH_REMOTE'))
26+
run: |
27+
TEMP_DIR=$(mktemp -d)
28+
TEMP_DIR_GIT="$TEMP_DIR/python-${{ inputs.exchange_name }}"
29+
git clone https://x-access-token:${{ secrets.API_TOKEN_FOR_CCXT_SINGLE_EXCHANGES }}@github.com/ccxt/python-${{ inputs.exchange_name }}.git $TEMP_DIR_GIT
30+
rsync -av --exclude='.git' ./ $TEMP_DIR_GIT
31+
cd $TEMP_DIR_GIT
32+
git config user.name github-actions
33+
git config user.email [email protected]
34+
git add .
35+
git commit -m "build: ${{ github.sha }}"
36+
git push origin main --force
37+
38+
# - name: Push to another repo (approach B)
39+
# if: (contains(github.event.head_commit.message, 'BUILD_WITH_REMOTE'))
40+
# run: |
41+
# git config user.name github-actions
42+
# git config user.email [email protected]
43+
# git remote add prod https://x-access-token:${{ secrets.API_TOKEN_FOR_CCXT_SINGLE_EXCHANGES }}@github.com/ccxt/python-${{ inputs.exchange_name }}.git
44+
# git config pull.rebase false
45+
# git fetch --unshallow origin
46+
# git pull --allow-unrelated-histories prod main || echo "Git pull failed"
47+
# git push prod main --force
48+
49+

.github/workflows/transfer.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
use-reusable-workflow:
9+
strategy:
10+
matrix:
11+
exchange_name: [kucoin, bybit] # ['bingx', 'bitget', 'bitmart', 'bitmex', 'bybit', 'coinex', 'cryptocom', 'gate', 'hashkey', 'htx', 'hyperliquid', 'kucoin', 'kucoinfutures', 'mexc', 'okx', 'woo', 'woofipro']
12+
uses: ./.github/workflows/reusable.yml
13+
with:
14+
exchange_name: ${{ matrix.exchange_name }}
15+
secrets: inherit

.gitignore

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
node_modules/
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
# build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
share/python-wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
MANIFEST
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.nox/
45+
.coverage
46+
.coverage.*
47+
.cache
48+
nosetests.xml
49+
coverage.xml
50+
*.cover
51+
*.py,cover
52+
.hypothesis/
53+
.pytest_cache/
54+
cover/
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
db.sqlite3
64+
db.sqlite3-journal
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
.pybuilder/
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
# For a library or package, you might want to ignore these files since the code is
89+
# intended to run in multiple environments; otherwise, check them in:
90+
# .python-version
91+
92+
# pipenv
93+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96+
# install all needed dependencies.
97+
#Pipfile.lock
98+
99+
# UV
100+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
101+
# This is especially recommended for binary packages to ensure reproducibility, and is more
102+
# commonly ignored for libraries.
103+
#uv.lock
104+
105+
# poetry
106+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107+
# This is especially recommended for binary packages to ensure reproducibility, and is more
108+
# commonly ignored for libraries.
109+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110+
#poetry.lock
111+
112+
# pdm
113+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114+
#pdm.lock
115+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
116+
# in version control.
117+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
118+
.pdm.toml
119+
.pdm-python
120+
.pdm-build/
121+
122+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
123+
__pypackages__/
124+
125+
# Celery stuff
126+
celerybeat-schedule
127+
celerybeat.pid
128+
129+
# SageMath parsed files
130+
*.sage.py
131+
132+
# Environments
133+
.env
134+
.venv
135+
env/
136+
venv/
137+
ENV/
138+
env.bak/
139+
venv.bak/
140+
141+
# Spyder project settings
142+
.spyderproject
143+
.spyproject
144+
145+
# Rope project settings
146+
.ropeproject
147+
148+
# mkdocs documentation
149+
/site
150+
151+
# mypy
152+
.mypy_cache/
153+
.dmypy.json
154+
dmypy.json
155+
156+
# Pyre type checker
157+
.pyre/
158+
159+
# pytype static type analyzer
160+
.pytype/
161+
162+
# Cython debug symbols
163+
cython_debug/
164+
165+
# PyCharm
166+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
167+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
168+
# and can be added to the global gitignore or merged into this file. For a more nuclear
169+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
170+
#.idea/
171+
172+
# PyPI configuration file
173+
.pypirc
174+
175+
build/ccxt
176+
/meta.json
177+
/name
178+
/examples
179+
/README.md

.vscode/launch.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python Debugger: Current File",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"program": "${file}",
12+
"console": "integratedTerminal"
13+
},
14+
{
15+
"name": "TSX: build",
16+
"type": "node",
17+
"request": "launch",
18+
// "runtimeExecutable": "tsx",
19+
// "program": "${workspaceFolder}\\build\\build.ts",
20+
"runtimeExecutable": "npm",
21+
"runtimeArgs": [
22+
"run",
23+
"build",
24+
"${input:exName}",
25+
"--",
26+
"${input:nodownload}",
27+
],
28+
"console": "integratedTerminal",
29+
"internalConsoleOptions": "neverOpen",
30+
"skipFiles": [
31+
"<node_internals>/**",
32+
"node_modules/**"
33+
],
34+
"sourceMaps": true,
35+
"localRoot": "${workspaceFolder}/build"
36+
}
37+
],
38+
"inputs": [
39+
{
40+
"id": "exName",
41+
"type": "promptString",
42+
"description": "Exchange name",
43+
"default": ""
44+
},
45+
{
46+
"id": "nodownload",
47+
"type": "promptString",
48+
"description": "Exchange name",
49+
"default": "--nodownload"
50+
},
51+
]
52+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 ccxt
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)