Skip to content

Commit

Permalink
fix: fix tests and sync api generation
Browse files Browse the repository at this point in the history
  • Loading branch information
booniepepper committed Oct 24, 2023
1 parent 942fd96 commit e076af9
Show file tree
Hide file tree
Showing 11 changed files with 6,093 additions and 90 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# NOTE: This file is auto generated by OpenAPI Generator.
# URL: https://openapi-generator.tech
#
# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: openfga_sdk Python package

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-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
4 changes: 4 additions & 0 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ test/*
!test/test_open_fga_api.py
!test/test_credentials.py
!test/test_client.py
!test/test_client_sync.py
!test/test_open_fga_api_sync.py
!test/test_validation.py
!test/test_credentials_sync.py
.gitlab-ci.yml
.travis.yml
tox.ini
7 changes: 6 additions & 1 deletion .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ docs/WriteRequest.md
openfga_sdk/__init__.py
openfga_sdk/api/__init__.py
openfga_sdk/api/open_fga_api.py
openfga_sdk/api/open_fga_api_sync.py
openfga_sdk/api_client.py
openfga_sdk/client/__init__.py
openfga_sdk/client/client.py
Expand Down Expand Up @@ -146,7 +147,7 @@ openfga_sdk/models/write_authorization_model_request.py
openfga_sdk/models/write_authorization_model_response.py
openfga_sdk/models/write_request.py
openfga_sdk/rest.py
openfga_sdk/sync/api.py
openfga_sdk/sync/__init__.py
openfga_sdk/sync/api_client.py
openfga_sdk/sync/client/client.py
openfga_sdk/sync/credentials.py
Expand All @@ -158,5 +159,9 @@ setup.py
test-requirements.txt
test/__init__.py
test/test_client.py
test/test_client_sync.py
test/test_credentials.py
test/test_credentials_sync.py
test/test_open_fga_api.py
test/test_open_fga_api_sync.py
test/test_validation.py
35 changes: 35 additions & 0 deletions openfga_sdk/sync/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# coding: utf-8

# flake8: noqa
"""
Python SDK for OpenFGA
API version: 0.1
Website: https://openfga.dev
Documentation: https://openfga.dev/docs
Support: https://discord.gg/8naAwJfWN6
License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE)
NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
"""

from openfga_sdk.sync.client.client import OpenFgaClient
from openfga_sdk.sync.api_client import ApiClient

from openfga_sdk.client.configuration import ClientConfiguration
import openfga_sdk.configuration as configuration
from openfga_sdk.configuration import Configuration

from openfga_sdk.exceptions import OpenApiException
from openfga_sdk.exceptions import FgaValidationException
from openfga_sdk.exceptions import ApiValueError
from openfga_sdk.exceptions import ApiAttributeError
from openfga_sdk.exceptions import ApiKeyError
from openfga_sdk.exceptions import ApiException
from openfga_sdk.exceptions import NotFoundException
from openfga_sdk.exceptions import UnauthorizedException
from openfga_sdk.exceptions import ForbiddenException
from openfga_sdk.exceptions import ServiceException
from openfga_sdk.exceptions import ValidationException
from openfga_sdk.exceptions import AuthenticationError
from openfga_sdk.exceptions import RateLimitExceededError
25 changes: 0 additions & 25 deletions openfga_sdk/sync/api.py

This file was deleted.

Loading

0 comments on commit e076af9

Please sign in to comment.