Skip to content

Commit

Permalink
Merge pull request #46 from swarmauri/dev-py-0.4
Browse files Browse the repository at this point in the history
v0.4
  • Loading branch information
cobycloud authored Jul 8, 2024
2 parents 9db0913 + c08ad3a commit 4be403b
Show file tree
Hide file tree
Showing 310 changed files with 6,578 additions and 4,786 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package
name: Test and Publish Dev

on:
push:
Expand All @@ -20,6 +20,12 @@ jobs:
# Define your environment variables here
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}


steps:
- uses: actions/checkout@v3
Expand All @@ -32,6 +38,8 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install flake8 pytest
python -m pip install textblob
python -m textblob.download_corpora
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
Expand All @@ -51,6 +59,10 @@ jobs:
LATEST_WHL=$(ls dist/*.whl | sort -V | tail -n 1)
python -m pip install "$LATEST_WHL"[full]
- name: Get pip freeze
run: |
pip freeze
- name: Run tests
continue-on-error: true
run: |
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Test Staging

on:
push:
branches: [ "staging", "dev-py-0.4" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]

env:
# Define your environment variables here
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}


steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install flake8 pytest
python -m pip install textblob
python -m textblob.download_corpora
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: Build package
run: |
python -m pip install build
python -m build
- name: Install package
run: |
LATEST_WHL=$(ls dist/*.whl | sort -V | tail -n 1)
python -m pip install "$LATEST_WHL"[full]
- name: Get pip freeze
run: |
pip freeze
- name: Run tests
continue-on-error: true
run: |
pytest -v --junitxml=results.xml
- name: Output test results for debugging
run: |
cat results.xml
- name: Classify test results
run: |
python tests/classify_results.py results.xml
continue-on-error: false

7 changes: 6 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ markers =
test: standard test
unit: Unit tests
integration: Integration tests
acceptance: Acceptance tests
acceptance: Acceptance tests

log_cli = true
log_cli_level = INFO
log_cli_format = %(asctime)s [%(levelname)s] %(message)s
log_cli_date_format = %Y-%m-%d %H:%M:%S
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
packages=find_packages(include=['swarmauri*']), # Include packages in your_package and libs directories
install_requires=[
'numpy', # Common dependencies for all distributions
'requests'
'requests',
'pydantic'
],
extras_require={
'standard': [
Expand Down Expand Up @@ -60,18 +61,16 @@
'lightgbm'
],
'full': [
'openai',
'transformers',
#'accelerate',
'tensorflow',
'scipy',
'typing_extensions',
'redisearch',
#'redisearch',
'google-api-python-client',
'google-auth-httplib2',
'google-auth-oauthlib',
'boto3',
#'yake',
'yake',
'torch',
'scikit-learn',
'gensim',
Expand All @@ -84,11 +83,13 @@
#'sentencepiece',
'gradio',
'websockets',
'openai',
'groq',
'mistralai',
'cohere',
'google-generativeai',
'anthropic'
'anthropic',
'scipy==1.10.0',

]},
classifiers=[
Expand Down
15 changes: 11 additions & 4 deletions swarmauri/__init__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
__version__ = "0.3.2.dev1"
__version__ = "0.4.0"
__long_desc__ = """
# swarmaURI sdk
This repository includes core interfaces, standard ABCs, and standard concrete references of the SwarmaURI Framework.
## Core
- ABCs
- Utilities
- Core Interfaces
## Standard
- Base Classes
- Mixins
- Concrete Classes
## Community
- Concrete Classes that utilize third party plug-ins
## Experimental
- Tools in development
- Components in development
# Features
- Polymorphism
- Discriminated Unions
- Serialization
- Intensional and Extensional Programming
"""
Loading

0 comments on commit 4be403b

Please sign in to comment.