Skip to content

Commit

Permalink
Update Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
olijeffers0n committed Apr 14, 2023
1 parent 517c2e9 commit 0aba780
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 44 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: lint

on:
push:
pull_request:
types: [ opened, reopened, synchronize ]

jobs:
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.x' ]

name: check ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up CPython ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
id: install-deps
run: |
python -m pip install --upgrade pip setuptools wheel black==22.6 requests
pip install -U -r requirements.txt
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Run Pyright
uses: jakebailey/pyright-action@v1
with:
version: '1.1.289'
warnings: false
no-comments: ${{ matrix.python-version != '3.x' }}

- name: Run black
if: ${{ always() && steps.install-deps.outcome == 'success' }}
run: |
black --check rustplus
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Upload Python Package

on:
workflow_dispatch:
release:
types: [created]

Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/workflow.yml

This file was deleted.

9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
websocket_client
Pillow
protobuf==4.21.6
asyncio
rustPlusPushReceiver==0.4.1
http-ece
requests
numpy
scipy
27 changes: 6 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
version = line.strip("__version__ =").strip().strip('"')
break

requirements = []
with open("requirements.txt") as input_file:
for line in input_file.readlines():
requirements.append(line.strip())

with open("README.md", errors='ignore') as input_file:
readme = input_file.read()

Expand All @@ -24,26 +29,6 @@
long_description=readme,
include_package_data=True,
long_description_content_type='text/markdown',
install_requires=[
"websocket_client",
"Pillow",
"protobuf==4.21.6",
"asyncio",
"rustPlusPushReceiver==0.4.1",
"http-ece",
"requests",
"numpy",
"scipy",
],
extras_require={
'test': [
'coverage[toml]',
'pytest',
'pytest-asyncio',
'pytest-cov',
'pytest-mock',
'typing-extensions>=4.3,<5',
],
},
install_requires=requirements,
python_requires='>=3.8.0',
)

0 comments on commit 0aba780

Please sign in to comment.