Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.0.1 #2

Merged
merged 3 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Compatibility Check

on:
push:
branches:
- 'staging'

jobs:
compatibility:
runs-on: ubuntu-20.04

strategy:
matrix:
python-version: [ 3.8, 3.9, "3.10", 3.11, 3.12 ]

steps:
- name: Checkout code
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
pip install poetry
poetry install --no-root

- name: Run compatibility tests
run: poetry run pytest
23 changes: 23 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Coverage

on:
push:
branches: [ "dev" ]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
pip install poetry
poetry install
- name: Test & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: poetry run pytest --cov=simplecrud --cov-report xml
debug: true
17 changes: 17 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: flake8

on:
push:
branches: [ "dev", "staging" ]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
pip install poetry
poetry install
poetry run flake8
18 changes: 18 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Release to PYPI

on:
push:
branches:
- main

jobs:
deployment:
runs-on: ubuntu-latest
environment: release
steps:
- name: Build and Publish
uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install poetry
- run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- run: poetry publish --build
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.idea/
.vscode/

.python-version

# Byte-compiled / optimized / DLL files
*cache*
__pycache__/
*.py[cod]
*$py.class
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build:
poetry build
publish:
poetry publish --dry-run
package-install:
python3 -m pip install --user dist/*.whl --force
lint:
poetry run flake8 simpleapi
447 changes: 447 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.poetry]
name = "simpleapi"
version = "0.0.1"
description = "Library for simple creating endpoints"
authors = ["Kaziamov <[email protected]>"]
packages = [
{ include = "simpleapi" },
]
readme = "README.md"


[tool.poetry.dependencies]
python = "^3.10"
fastapi = "^0.110.0"

[tool.poetry.group.dev.dependencies]
flake8 = "^7.0.0"
pytest = "^7.4.3"
pytest-cov = "^4.1.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added simpleapi/__init__.py
Empty file.
Loading