-
Notifications
You must be signed in to change notification settings - Fork 1
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 #2 from rcholic/modeling2
github actions
- Loading branch information
Showing
6 changed files
with
99 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Publish to PyPI | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
name: Build Distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build | ||
python -m pip install -r requirements.txt | ||
- name: Build distribution in binary and source tarball | ||
run: python3 -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
pypi-publish: | ||
name: Publish release to PyPI | ||
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/CSchwabPy | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
# retrieve your distributions here | ||
- name: Download distribution packages | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
# - name: Sign the dists with Sigstore | ||
# uses: sigstore/[email protected] | ||
# with: | ||
# inputs: >- | ||
# ./dist/*.tar.gz | ||
# ./dist/*.whl | ||
# - name: Create GitHub Release | ||
# env: | ||
# GITHUB_TOKEN: ${{ github.token }} | ||
# run: >- | ||
# gh release create | ||
# '${{ github.ref_name }}' | ||
# --repo '${{ github.repository }}' | ||
# --notes "" | ||
# - name: Upload artifact signatures to GitHub Release | ||
# env: | ||
# GITHUB_TOKEN: ${{ github.token }} | ||
# # Upload to GitHub Release using the `gh` CLI. | ||
# # `dist/` contains the built packages, and the | ||
# # sigstore-produced signatures and certificates. | ||
# run: >- | ||
# gh release upload | ||
# '${{ github.ref_name }}' dist/** | ||
# --repo '${{ github.repository }}' |
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 |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
import time | ||
import httpx | ||
import re | ||
import os | ||
import base64 | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ version = "0.1.0" | |
description = "" | ||
authors = ["Tony Wang <[email protected]>"] | ||
readme = "README.md" | ||
packages = [{include = "cschwab"}] | ||
packages = [{include = "cschwabpy"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10.13" | ||
|
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 @@ | ||
[pytest] | ||
minversion = 7.0 | ||
pythonpath = schwabpy | ||
testpaths = | ||
tests |
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,16 @@ | ||
from setuptools import setup | ||
|
||
with open("README.md") as file: | ||
long_description = file.read() | ||
|
||
setup( | ||
name="CSchwabPy", | ||
version="0.1.0", | ||
description="Charles Schwab Stock & Option Trade API Client for Python.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
author="Tony W", | ||
author_email="[email protected]", | ||
url="https://pypi.org/project/CSchwabPy/", | ||
keywords=["python", "CSchwabPy", "Charles Schwab", "Stock", "Option", "Trade"], | ||
) |