update
This commit is contained in:
parent
3821fb131a
commit
dc35cbc284
|
@ -0,0 +1,40 @@
|
|||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: Python package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install flake8 pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest
|
|
@ -0,0 +1,41 @@
|
|||
# This workflow will upload a Python Package using Twine when a release is created
|
||||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
name: Upload Python Package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- publish
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
- name: Publish package
|
||||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@ -9,7 +9,3 @@ if sys.version_info < (3, 6):
|
|||
print(f"CEDA {__version__} requires Python 3.6+")
|
||||
sys.exit(1)
|
||||
del sys
|
||||
|
||||
from CEDA import *
|
||||
from CEDA import economic
|
||||
from CEDA import market
|
|
@ -10,4 +10,8 @@ requests==2.25.1
|
|||
six==1.16.0
|
||||
urllib3==1.26.5
|
||||
wincertstore==0.2
|
||||
beautifulsoup4==4-4.10.1
|
||||
beautifulsoup4
|
||||
xmltodict
|
||||
tqdm
|
||||
pygtrans
|
||||
lxml
|
||||
|
|
8
setup.py
8
setup.py
|
@ -13,7 +13,7 @@ setup(
|
|||
author = "TerenceCKLau",
|
||||
author_email = "terenceliu1012@outlook.com",
|
||||
url = "https://github.com/TerenceLiu98/CEDApy",
|
||||
packages = find_packages(),
|
||||
packages = (exclude=["test", "example"]),
|
||||
install_requires=[
|
||||
"matplotlib>=3.1.1",
|
||||
"numpy>=1.15.4",
|
||||
|
@ -23,7 +23,11 @@ setup(
|
|||
"xlrd==1.2.0",
|
||||
"bs4",
|
||||
"urllib3>=1.26.5",
|
||||
"fake-useragent"
|
||||
"fake-useragent",
|
||||
"xmltodict",
|
||||
"tqdm",
|
||||
"pygtrans",
|
||||
"lxml"
|
||||
],
|
||||
license = "MIT",
|
||||
classifiers=[
|
||||
|
|
Loading…
Reference in New Issue