Skip to content

Commit

Permalink
Migrate-to-utils (#291)
Browse files Browse the repository at this point in the history
* Improve the new_init return to not create new instance, rather use the given one

* Improve Resource and Api classes, reducing logic in both

* Instead of class attriburte in init, use decorator

* Add multiple responses via decorator

* Fix assigning multiple routes from single resource

* Add cbv resource class testing

* Lint files

* Lint tests

* Add docs and improved imports

* Lint and mypy test fix

* Update readme

* Update README

* Update docs

* Move files from fastapi utils to fastapi restful in porpuse of build

* Update docs again

* Update versions

* Lower case the package folder

* Correct imports in docs

* Correct imports in tests

* Update pyproject

* Update Docs

* Lint

* Update makefile

* Update poetry versioning

* Lint and sort

* Correct imports

* Update makefile

* Fix imports break code

* Update pyproject

* Update lock

* Update packages

* Update build.yml

* Update requirements for win32 and py version < 38

* Fix requirements

* Change mkdocs to py version 3.8

* Fix mkdocs error

* Update docs, add shields and update workflows

* Update docs to include additonal responses handling

* Numerous changes in the documantations

* Add kwargs to option to set_responses

* Lint and formatting

* Add documantation for the new kwargs option

* Update project version

* Create dependabot.yml

* Update dependabot.yml

* Bump markdown-include from 0.5.1 to 0.6.0

Bumps [markdown-include](https://github.com/cmacmackin/markdown-include) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/cmacmackin/markdown-include/releases)
- [Commits](cmacmackin/markdown-include@v0.5.1...v0.6.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump pytest-cov from 2.10.0 to 2.10.1

Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.10.0 to 2.10.1.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-cov@v2.10.0...v2.10.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump mypy from 0.782 to 0.790

Bumps [mypy](https://github.com/python/mypy) from 0.782 to 0.790.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](python/mypy@v0.782...v0.790)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump flake8 from 3.8.3 to 3.8.4

Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.3 to 3.8.4.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.3...3.8.4)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump black from 19.10b0 to 20.8b1

Bumps [black](https://github.com/psf/black) from 19.10b0 to 20.8b1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/master/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sqlalchemy from 1.3.18 to 1.3.22

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.3.18 to 1.3.22.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump pydantic from 1.6.1 to 1.7.3

Bumps [pydantic](https://github.com/samuelcolvin/pydantic) from 1.6.1 to 1.7.3.
- [Release notes](https://github.com/samuelcolvin/pydantic/releases)
- [Changelog](https://github.com/samuelcolvin/pydantic/blob/master/HISTORY.md)
- [Commits](pydantic/pydantic@v1.6.1...v1.7.3)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump isort from 5.1.2 to 5.7.0

Bumps [isort](https://github.com/pycqa/isort) from 5.1.2 to 5.7.0.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/develop/CHANGELOG.md)
- [Commits](PyCQA/isort@5.1.2...5.7.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump codecov from 2.1.8 to 2.1.11

Bumps [codecov](https://github.com/codecov/codecov-python) from 2.1.8 to 2.1.11.
- [Release notes](https://github.com/codecov/codecov-python/releases)
- [Changelog](https://github.com/codecov/codecov-python/blob/master/CHANGELOG.md)
- [Commits](codecov/codecov-python@2.1.8...v2.1.11)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump coverage from 5.2 to 5.3.1

Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.2 to 5.3.1.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](nedbat/coveragepy@coverage-5.2...coverage-5.3.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump autoflake from 1.3.1 to 1.4

Bumps [autoflake](https://github.com/myint/autoflake) from 1.3.1 to 1.4.
- [Release notes](https://github.com/myint/autoflake/releases)
- [Commits](PyCQA/autoflake@v1.3.1...v1.4)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump fastapi from 0.59.0 to 0.63.0

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.59.0 to 0.63.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.59.0...0.63.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump requests from 2.24.0 to 2.25.1

Bumps [requests](https://github.com/psf/requests) from 2.24.0 to 2.25.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](psf/requests@v2.24.0...v2.25.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump pytest from 5.4.3 to 6.2.1

Bumps [pytest](https://github.com/pytest-dev/pytest) from 5.4.3 to 6.2.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@5.4.3...6.2.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump mkdocs-material from 5.4.0 to 6.2.3

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 5.4.0 to 6.2.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](squidfunk/mkdocs-material@5.4.0...6.2.3)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump more-itertools from 8.4.0 to 8.6.0

Bumps [more-itertools](https://github.com/more-itertools/more-itertools) from 8.4.0 to 8.6.0.
- [Release notes](https://github.com/more-itertools/more-itertools/releases)
- [Commits](more-itertools/more-itertools@v8.4.0...v8.6.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump aiofiles from 0.5.0 to 0.6.0

Bumps [aiofiles](https://github.com/Tinche/aiofiles) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/Tinche/aiofiles/releases)
- [Commits](Tinche/aiofiles@v0.5.0...v0.6.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Upgrade dependencies

* Update version patch and fix small error in contributing, Includes python 3.9

* Reduce dev requirements from requirements file

* Update pull-request.yml

Make tests run on poetry to remove dependencies from package

* Update pull-request.yml

Remove enter poetry shell due to error it causes

* Update pull-request.yml

Change ci to operate from inside poetry

* Update pull-request.yml

Change docs building to run from poetry

* Fix difference between CONTRIBUTING.md and docs/contributing.md

* Update publish.yml

Use all the abilities that poetry can afford without regarding dev dependencies

* Update publish.yml

Small fix - missing "make"

* Change wait_first to a float

* Fix tests issue

* Fix error of deprecation in the Makefile

* Minor changes to the develop.sh script

* Update publish.yml (#46)

* Bump mkdocs-material from 6.2.3 to 7.1.3 (#49)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 6.2.3 to 7.1.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](squidfunk/mkdocs-material@6.2.3...7.1.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix routing problem (#36)

* Fix routing problem

Original Issue: #154
Credit: WouldYouKindly <https://github.com/WouldYouKindly>

Creating router with prefix would cause route path to have the prefix duplicated (e.g. instead of '/api' -> '/api/api')

* Fix prefix kwarg on router being repetitive when using cbv causing '/api' route to become '/api/api'

* Add test to check if route construction is done right when using router prefix

Co-authored-by: Yuval <[email protected]>

* Update to support python 3.9

* pull request will support tests on python 3.9

* Feature/auto publish on merge (#52)

* Update publish.yml

* Remove the auto publish by push to master, I't doesn't help me control versioning nor changelog

* Fix ci for python 3.9

* Update version

* Bump pydantic from 1.7.3 to 1.7.4 (#55)

Bumps [pydantic](https://github.com/samuelcolvin/pydantic) from 1.7.3 to 1.7.4.
- [Release notes](https://github.com/samuelcolvin/pydantic/releases)
- [Changelog](https://github.com/samuelcolvin/pydantic/blob/master/HISTORY.md)
- [Commits](pydantic/pydantic@v1.7.3...v1.7.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sqlalchemy from 1.4.13 to 1.4.14 (#54)

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.13 to 1.4.14.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix missing changelog.md

* Add sqlalchemy install to python extra installs

* Update makefile

* Update version to 0.3.1

* Fix lock and workflows to make ci working properly

* Update requirements for netlify

* Fix build workflow

* Bump fastapi from 0.65.1 to 0.65.2 (#62)

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.65.1 to 0.65.2.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.65.1...0.65.2)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump aiofiles from 0.6.0 to 0.7.0 (#56)

Bumps [aiofiles](https://github.com/Tinche/aiofiles) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/Tinche/aiofiles/releases)
- [Commits](Tinche/aiofiles@v0.6.0...v0.7.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump urllib3 from 1.26.4 to 1.26.5 (#60)

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.4 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.4...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sqlalchemy from 1.4.15 to 1.4.18 (#63)

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.15 to 1.4.18.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mkdocs-material from 7.1.4 to 7.1.8 (#64)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.1.4 to 7.1.8.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](squidfunk/mkdocs-material@7.1.4...7.1.8)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Move to scm versioning

* Move to poetry version by scm

* Optimizations (#68)

* Change spacing to unix line breaks

* Remove runtime.txt

It is unimportant to have specific python version declared for the project since it is a package

* Change timing.py to work on any system and not just unix

* Remove the need of requirements.txt file

* Move coverage configuration into pyproject.toml

* Poetry lock

* Return to manual version editing

* Format project

* Remove SqlAlchemy TypeDecorator cache warning

* Restore dataclasses to python 3.6 installation

* Fix issues with mypy update and python 3.6

* Create runtime.txt for netlify

* Update .gitignore

* Bump mypy from 0.902 to 0.910 (#69)

Bumps [mypy](https://github.com/python/mypy) from 0.902 to 0.910.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](python/mypy@v0.902...v0.910)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump fastapi from 0.65.2 to 0.66.1 (#74)

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.65.2 to 0.66.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.65.2...0.66.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sqlalchemy from 1.4.18 to 1.4.21 (#75)

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.18 to 1.4.21.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mkdocs-material from 7.1.8 to 7.1.11 (#76)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.1.8 to 7.1.11.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](squidfunk/mkdocs-material@7.1.8...7.1.11)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* include_router method add kwargs params (#87)

* Bump mkdocs from 1.2.1 to 1.2.3 (#92)

Bumps [mkdocs](https://github.com/mkdocs/mkdocs) from 1.2.1 to 1.2.3.
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](mkdocs/mkdocs@1.2.1...1.2.3)

---
updated-dependencies:
- dependency-name: mkdocs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump fastapi from 0.66.1 to 0.68.1 (#85)

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.66.1 to 0.68.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.66.1...0.68.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: yuval9313 <[email protected]>

* Bump types-dataclasses from 0.1.5 to 0.6.1 (#95)

Bumps [types-dataclasses](https://github.com/python/typeshed) from 0.1.5 to 0.6.1.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-dataclasses
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump codecov from 2.1.11 to 2.1.12 (#94)

Bumps [codecov](https://github.com/codecov/codecov-python) from 2.1.11 to 2.1.12.
- [Release notes](https://github.com/codecov/codecov-python/releases)
- [Changelog](https://github.com/codecov/codecov-python/blob/master/CHANGELOG.md)
- [Commits](codecov/codecov-python@v2.1.11...v2.1.12)

---
updated-dependencies:
- dependency-name: codecov
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump black version, remove support of python >3.6.2

* Run black new version on project

* Bump requests from 2.25.1 to 2.27.1

Bumps [requests](https://github.com/psf/requests) from 2.25.1 to 2.27.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.25.1...v2.27.1)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sqlalchemy from 1.4.21 to 1.4.29

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.21 to 1.4.29.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* docs: Fix typo in CamelStrEnum example

* Bump types-dataclasses from 0.6.1 to 0.6.4

Bumps [types-dataclasses](https://github.com/python/typeshed) from 0.6.1 to 0.6.4.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-dataclasses
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump aiofiles from 0.7.0 to 0.8.0

Bumps [aiofiles](https://github.com/Tinche/aiofiles) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/Tinche/aiofiles/releases)
- [Commits](Tinche/aiofiles@v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: aiofiles
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump version

* Add support to python 3.10

* Fix quotes missing in python 3.10 version

* Update poetry.lock to not include dataclasses

* Bump flake8 for better PR process

* Add dataclasses constraint to pyproject.toml

* Update poetry github action

* Replace tabs with spaces

* Update pytest version

* Fix issues with pytest version bump

* Fix Pypi classifiers

* Remove black/flake8/mypy from main dependencies

black/flake8/mypy are already listed in dev-dependencies, and listing them in main dependencies propagates to other projects.

* Bump mkdocs-material from 8.1.6 to 8.1.9

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.6 to 8.1.9.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](squidfunk/mkdocs-material@8.1.6...8.1.9)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump black from 21.12b0 to 22.1.0

Bumps [black](https://github.com/psf/black) from 21.12b0 to 22.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits/22.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sqlalchemy from 1.4.29 to 1.4.31

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.29 to 1.4.31.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump fastapi from 0.71.0 to 0.73.0

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.71.0 to 0.73.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.71.0...0.73.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Improve packages pinning

* Bump version pre-release

* Bump again due to tagging issues

* Update additional packages and poetry lock

* Fix inferring router don't infer None

* Bump pytest from 6.2.5 to 7.0.0

Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@6.2.5...7.0.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump mkdocs-material from 8.1.9 to 8.1.10

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.9 to 8.1.10.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](squidfunk/mkdocs-material@8.1.9...8.1.10)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add missing changelog details

* Update all packages

* Add bump version to changelog

* Bump version

* Update tests to fit better practices

* Update enums tests and fix enum due to CI failures

* Update class-resource.md

Corrected a minor typographical error.
`Source` was written as `ource` in line 1

* Add .deepsource.toml

* Remove unnecessary generator

* Remove assert statement from non-test files

* Update fastapi_restful/cbv.py

* Update fastapi_restful/timing.py

* Update poetry and poetry lock

* Update poetry lock

* Remove redundant imports

* Update fastapi to prepare deprecation of inferring router

* Ruff black and mypy

* Remove some redundant tests due to them checking fastapi really

* Force update sqlalchemy above 1.4

* Update poetry build backend

* Update pydantic and psutil > 3.11

* Restore old release notes

* Update references to fastapi-utils

* Largely update all deps of development

* Add new release notes

* Update python version on workflows

* Fix mypy issues

* Remove un-neccessary config files in favor of pyproject.toml and flak… (#133)

* Remove un-neccessary config files in favor of pyproject.toml and flake8 in favor of black

* Update poetry lock

* Fix mypy issues for various pythons

* Update changelog and contributing

* Remove docs from repo

* Add repo docs to gitignore

* Remove docs for ci only in favor of better docs building

* update deepsoruce max line length

* Create CNAME

* Delete CNAME

* Remove runtime

* Update lock on fastapi

* Add release notes and changed versions

* Change docs of package to github pages and changed publish to pypi (#186)

* Fix bad syntax of github actions

* Update LICENSE

* Bump sqlalchemy from 1.4.48 to 2.0.19 (#202)

* Pydantic v2 (#199)

* fix: v2 update

* fix: remove bump pydantic

* fix: python versioning

* fix: use config dict

* fix: formatting

* fix: support v1 and v2

* fix: formatting

* fix: mypy issues, some refactoring

* fix: fix v2 install

* fix: fix ci

---------

Co-authored-by: Oli Parker <[email protected]>

* fix: fix ci not run (#208)

Co-authored-by: Oli Parker <[email protected]>

* fix: bump version, add release notes (#212)

Co-authored-by: Oli Parker <[email protected]>

* Update dependabot.yml (#217)

* Update publish.yml

* Bump ruff from 0.0.272 to 0.0.284 (#223)

* Bump actions/setup-python from 1 to 4 (#222)

* Bump abatilo/actions-poetry from 2.1.3 to 2.3.0 (#221)

* Bump actions/cache from 1 to 3 (#220)

* Bump actions/upload-pages-artifact from 1 to 2 (#219)

* Add proper __version__ (#214)

* Add proper __version__

* Conditional __version__

* Split publish docs and publish workflows (#224)

* Update publish-docs.yml

* Cleanup remnants of name change (#236)

* Bump fastapi from 0.101.0 to 0.103.2

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.101.0 to 0.103.2.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.101.0...0.103.2)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* style: format code with Black and isort (#243)

This commit fixes the style issues introduced in e957135 according to the output
from Black and isort.

Details: None

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* docs: remove refs to InferringRouter as it is deprecated (#239)

* docs: remove references to inferring router as it was replaced by APIRouter

* docs/src: fix missing import

---------

Co-authored-by: Yuval Levi <[email protected]>

* style: format code with Black and isort (#244)

This commit fixes the style issues introduced in 8527803 according to the output
from Black and isort.

Details: None

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Bugfix/repeat every runs only once (#142)

* Await loop function instead of calling ensure_future on it

* Ensure max_repetition is enforced even when an exception occurs

* Install pytest-mock

* Improve test

* Reformat file

* Pin version for flake8

* Fix missing type annotations

* Add fixtures

* Organize test cases in classes

* Use unittest mock instead of pytest-mock

* Run isort

* Remove unused imports

* Run black

* Define test base class

* Format code with black and isort

* style: Format code with black and isort

* Update poetry lock

* Fix formatting and imports

* Fix typehints issue

* Ignore mypy bug

* Fix test testing the wrong parameters

* Add changelog

* Add mock as backport for unittest

* Add conditional import for python3.7

* Change asyncmock to mock

* Restore test to use AsyncMock

* Move all mock objects to be under Mock for python<3.8

* style: format code with Black and isort

This commit fixes the style issues introduced in bd50c49 according to the output
from Black and isort.

Details: yuval9313#142

* Format files

* Remove breakpoints

* Fix conflicts with mypy

* Add mock stubs

* Add the import for mypy

---------

Co-authored-by: Yuval Levi <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Update dependencies (#256)

* Bump actions/setup-python from 4 to 5 (#250)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/configure-pages from 3 to 4 (#249)

Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 3 to 4.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](actions/configure-pages@v3...v4)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/deploy-pages from 2 to 3 (#248)

Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 2 to 3.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](actions/deploy-pages@v2...v3)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/checkout from 1 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 1 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v1...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add new line to changelog

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 90 url for returns wrong path (#257)

* Add spearation between classes while building urls

* Add test to check new behaviour

* Add changelog line

* Remove additional import

* Update what was missing for github pages (#289)

* Create-release (#290)

* Add new version to changelog

* Update pyproject to 0.6.0

* Deprecate fastapi_restful package and provide alternative in README

* Add dev info

* Migrate fastapi_restful to utils

* Move all src to fastapi-utils

* Update last properties from restful to utils

* Add py 312 and fix mkdocs

* style: format code with Black and isort

This commit fixes the style issues introduced in f4a6e47 according to the output
from Black and isort.

Details: yuval9313#287

* Add requirements for netlify

* Add codecov to pipeline

* Add codecov to deps

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: root <[email protected]>
Co-authored-by: TomBurch <[email protected]>
Co-authored-by: Yen3 <[email protected]>
Co-authored-by: Fuman <[email protected]>
Co-authored-by: pmav99 <[email protected]>
Co-authored-by: Derek Kulinski <[email protected]>
Co-authored-by: fugacityengr <[email protected]>
Co-authored-by: DeepSource Bot <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Oliver Parker <[email protected]>
Co-authored-by: Oli Parker <[email protected]>
Co-authored-by: Pavel Zwerschke <[email protected]>
Co-authored-by: Dosenpfand <[email protected]>
Co-authored-by: omars <[email protected]>
Co-authored-by: Daniel Eidlin <[email protected]>
  • Loading branch information
17 people authored May 11, 2024
1 parent 3ef27a6 commit cac20da
Show file tree
Hide file tree
Showing 54 changed files with 3,505 additions and 2,548 deletions.
23 changes: 23 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version = 1

test_patterns = [
"tests/**",
"test_*.py"
]

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
max_line_length = 120
type_checker = "mypy"

[[transformers]]
name = "black"
enabled = true

[[transformers]]
name = "isort"
enabled = true
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "fastapi-37",
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"features": {
"ghcr.io/devcontainers/features/node:1": { "version": "latest" }
},
"postCreateCommand": "pipx install poetry && poetry install",
"forwardPorts": [2222]
}
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2

updates:
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
40 changes: 22 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,45 @@ jobs:
strategy:
max-parallel: 3
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

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

- name: Init python poetry action
uses: abatilo/[email protected]
with:
poetry-version: 1.5.1
- uses: actions/cache@v3
id: cache-deps
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: actions/cache@v1
run: poetry install -E session

- uses: actions/cache@v3
with:
path: .mypy_cache
key: mypy-${{ matrix.python-version }}
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: .pytest_cache
key: pytest-${{ matrix.python-version }}
- name: Check docs build
# only run this for the python version used by netlify:
if: matrix.python-version == '3.8'
run: |
make docs-build-ci
- name: Check that formatting, linting, and tests pass
run: |
make ci
if: matrix.python-version == '3.10'
run: poetry run make docs-build
- name: Check that formatting, linting, and tests pass for pydantic v1
run: poetry run make ci-v1
- name: Check that formatting, linting, and tests pass for pydantic v2
run: poetry run make ci-v2
- name: Submit coverage report
run: |
codecov --token=${{ secrets.CODECOV_TOKEN }}
run: poetry run codecov --token=${{ secrets.CODECOV_TOKEN }}
50 changes: 50 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: publish-docs

permissions:
id-token: write
pages: write

on:
workflow_run:
workflows:
- publish
types:
- completed

jobs:
publish-docs:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: ['3.10']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Avoid caching to be 100% confident things are working properly
- name: Init python poetry action
uses: abatilo/[email protected]
with:
poetry-version: 1.5.1

- name: Install dependencies
run: poetry install -E session

- name: Check docs are up to date
run: poetry run make docs-build

# Publish docs to github pages
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: './site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
43 changes: 22 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,39 @@ on:
push

jobs:
publish:
publish-tag:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: ['3.8']
python-version: ['3.10']

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Avoid caching to be 100% confident things are working properly
- name: Init python poetry action
uses: abatilo/[email protected]
with:
poetry-version: 1.5.1

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check that formatting, linting, and tests pass
run: |
make ci
- name: Check docs are up to date
run: |
make docs-build-ci
- name: Install poetry
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
run: poetry install -E session

- name: Check that formatting, linting, and tests pass for pydantic v1
run: poetry run make ci-v1
- name: Check that formatting, linting, and tests pass for pydantic v2
run: poetry run make ci-v2

- name: Build distribution
run: |
source $HOME/.poetry/env && poetry build
run: poetry build

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_PASSWORD }}
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

38 changes: 20 additions & 18 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,40 @@ jobs:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

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

- name: Init Python Poetry Action
uses: abatilo/[email protected]
with:
poetry-version: 1.5.1
- uses: actions/cache@v3
id: cache-deps
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: actions/cache@v1
run: poetry install -E session
- uses: actions/cache@v3
with:
path: .mypy_cache
key: mypy-${{ matrix.python-version }}
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: .pytest_cache
key: pytest-${{ matrix.python-version }}
- name: Check docs build
# only run this for the python version used by netlify:
if: matrix.python-version == '3.8'
run: |
make docs-build-ci
- name: Check that formatting, linting, and tests pass
run: |
make ci
- name: Submit coverage report
run: |
codecov --token=${{ secrets.CODECOV_TOKEN }}
if: matrix.python-version == '3.10'
run: poetry run make docs-build
- name: Check that formatting, linting, and tests pass for pydantic v1
run: poetry run make ci-v1
- name: Check that formatting, linting, and tests pass for pydantic v2
run: poetry run make ci-v2

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ venv/
.venv/
env3*/

# Repo files that copied into docs
docs/index.md
docs/release-notes.md
docs/contributing.md

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"python.analysis.typeCheckingMode": "strict",
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"cSpell.words": [
"fastapi"
]
}
Loading

0 comments on commit cac20da

Please sign in to comment.