Skip to content

Commit 11d5967

Browse files
authored
Library packaging (#25)
* packaging for library usage * add files * remove libs installation * fix test * dynamic versioning and workflow for gha * trigger action only on tag push * fix lint * python 3.10 only
1 parent 689420a commit 11d5967

File tree

150 files changed

+92
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+92
-6
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[flake8]
2-
exclude=run/,src/libs,venv/,src/pipeline/processors/__init__.py,src/pipeline/strategies/__init__.py,src/pipeline/sources/__init__.py
2+
exclude=run/,libs/,venv/,src/algotrader/pipeline/processors/__init__.py,src/algotrader/pipeline/strategies/__init__.py,src/algotrader/pipeline/sources/__init__.py
33
max-line-length=160
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish Python distributions to PyPI
2+
3+
on: push
4+
tags:
5+
- 'v\d+\.\d+\.\d+'
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish Python distributions to PyPI
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Set up Python 3.10
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.10"
17+
- name: Install pypa/build
18+
run: >-
19+
python -m
20+
pip install
21+
build
22+
--user
23+
- name: Build a binary wheel and a source tarball
24+
run: >-
25+
python -m
26+
build
27+
--sdist
28+
--wheel
29+
--outdir dist/
30+
.
31+
- name: Publish distribution to PyPI
32+
if: startsWith(github.ref, 'refs/tags')
33+
uses: pypa/gh-action-pypi-publish@release/v1
34+
with:
35+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: ["3.8", "3.9", "3.10"]
12+
python-version: ["3.10"]
1313

1414
steps:
1515
- uses: actions/checkout@v3

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@
33
*.pyc
44
*.log
55
run/
6-
.env
6+
.env
7+
private/
8+
dist/
9+
build/
10+
*.egg-info
11+
*.egg
12+
logs/
13+
.coverage
File renamed without changes.

0 commit comments

Comments
 (0)