Skip to content

Commit a97f42d

Browse files
author
github-actions
committed
[BUILD]: aad6b3d39980c7fa3139a29b6fadccce1d2c5a58
0 parents  commit a97f42d

20 files changed

+1122
-0
lines changed

.github/scripts/push-to-repo.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Get arguments
4+
EXCHANGE_NAME=$1
5+
API_TOKEN=$2
6+
GITHUB_SHA=$3
7+
8+
# Clone and push to the repo
9+
TEMP_DIR=$(mktemp -d)
10+
TEMP_DIR_GIT="$TEMP_DIR/$EXCHANGE_NAME-python"
11+
echo "Cloning $EXCHANGE_NAME-python repository into $TEMP_DIR_GIT"
12+
git clone https://x-access-token:$API_TOKEN@github.com/ccxt/$EXCHANGE_NAME-python.git $TEMP_DIR_GIT
13+
# at first, clean th directory (except .git directory) and copy all files
14+
echo "Clone finished"
15+
rm -rf $TEMP_DIR_GIT/*
16+
rm -rf $TEMP_DIR_GIT/.github/*
17+
rsync -av --info=progress2 --info=name0 --exclude='.git/' --exclude='tmp/' --exclude='build/ccxt/' ./ $TEMP_DIR_GIT
18+
rm -f $TEMP_DIR_GIT/.github/workflows/transfer-all.yml && rm -f $TEMP_DIR_GIT/.github/workflows/transfer-exchange.yml
19+
cd $TEMP_DIR_GIT
20+
echo $EXCHANGE_NAME > exchange_name
21+
git config user.name github-actions
22+
git config user.email [email protected]
23+
git add .
24+
rm -f README.md
25+
(git commit -m "[BUILD]: $GITHUB_SHA" && git push origin main --force) || echo "No changes to commit"

.github/scripts/pushback.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
git config --local user.email "[email protected]"
4+
git config --local user.name "GitHub Action"
5+
git add README.md
6+
git commit -m "Update README with exchange repository links" || echo "No changes to commit"
7+
git push
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
build_for_pypi:
9+
if: ${{ github.event.repository.name != 'ccxt-python-single-exchange' && contains(github.event.head_commit.message, '[BUILD]') }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
ref: ${{ github.ref }}
16+
- name: Install npm
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22'
20+
- name: Install dependencies
21+
run: |
22+
cd build
23+
npm install typescript
24+
npm install tsx
25+
- name: Build
26+
run: |
27+
cd build
28+
# get repository name and it's first word before hyphen and pass that as argument
29+
REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2 | cut -d'-' -f1)
30+
npm run build -- $REPO_NAME
31+
32+
- name: Commit and push changes
33+
run: |
34+
chmod +x .github/scripts/pushback.sh
35+
.github/scripts/pushback.sh
36+
37+
- name: Set up Python
38+
uses: actions/setup-python@v4
39+
with:
40+
python-version: '3.x'
41+
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install --upgrade pip
45+
pip install build twine
46+
47+
- name: Build
48+
env:
49+
PYPI_API_SECRET: ${{ secrets.PYPI_API_SECRET }}
50+
run: |
51+
cd build
52+
npm run pypi-publish
53+
54+
- name: Upload to PyPI
55+
run: |
56+
cd ./temp_pypi
57+
python -m twine upload dist/*
58+
env:
59+
TWINE_USERNAME: __token__
60+
TWINE_PASSWORD: ${{ secrets.PYPI_API_SECRET }}

.gitignore

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
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

.vscode/launch.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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: file",
16+
"type": "node",
17+
"request": "launch",
18+
"runtimeExecutable": "tsx",
19+
"program": "${file}",
20+
"console": "integratedTerminal",
21+
"internalConsoleOptions": "neverOpen",
22+
"skipFiles": [
23+
"<node_internals>/**",
24+
"node_modules/**"
25+
],
26+
"sourceMaps": true,
27+
},
28+
{
29+
"name": "TSX: build",
30+
"type": "node",
31+
"request": "launch",
32+
// "runtimeExecutable": "tsx",
33+
// "program": "${workspaceFolder}\\build\\build.ts",
34+
"runtimeExecutable": "npm",
35+
"runtimeArgs": [
36+
"run",
37+
"build",
38+
"${input:exName}",
39+
"--",
40+
"${input:nodownload}",
41+
],
42+
"console": "integratedTerminal",
43+
"internalConsoleOptions": "neverOpen",
44+
"skipFiles": [
45+
"<node_internals>/**",
46+
"node_modules/**"
47+
],
48+
"sourceMaps": true,
49+
"localRoot": "${workspaceFolder}/build"
50+
}
51+
],
52+
"inputs": [
53+
{
54+
"id": "exName",
55+
"type": "promptString",
56+
"description": "Exchange name",
57+
"default": ""
58+
},
59+
{
60+
"id": "nodownload",
61+
"type": "promptString",
62+
"description": "Exchange name",
63+
"default": "--nodownload"
64+
},
65+
]
66+
}

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.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# central repo for single exchanges
2+
3+
this is dev.repo, not meant to be used by end users.

0 commit comments

Comments
 (0)