-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from sqrl-planner/feat/ttb-migration
feat: uoft timetable api (ttb) integration
- Loading branch information
Showing
29 changed files
with
3,153 additions
and
1,521 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[flake8] | ||
ignore=E501 | ||
exclude = tests/* | ||
exclude = tests/* src/gator/_vendor/* | ||
max-complexity = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -379,3 +379,6 @@ cython_debug/ | |
|
||
# VS Code | ||
.vscode/* | ||
|
||
# Vendor | ||
src/gator/_vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Configure the test suite.""" | ||
from doctest import ELLIPSIS | ||
|
||
import mongomock | ||
import pytest | ||
from mongoengine import connect | ||
from sybil import Sybil | ||
from sybil.parsers.rest import DocTestParser, PythonCodeBlockParser | ||
|
||
# The name of the test database. This is used by the `mongo_client` fixture. | ||
TEST_DB = 'mongotest' | ||
|
||
|
||
pytest_collect_file = Sybil( | ||
parsers=[ | ||
DocTestParser(optionflags=ELLIPSIS), | ||
PythonCodeBlockParser(), | ||
], | ||
patterns=['*.rst', '*.py'], | ||
).pytest() | ||
|
||
|
||
@pytest.fixture(autouse=True, scope='module') | ||
def mongo_client(request: pytest.FixtureRequest) -> mongomock.MongoClient: | ||
"""Return a MongoDB client for testing.""" | ||
# Explicitly set the UUID representation to standard, since mongomock | ||
# defaults to Python's legacy representation which will raise a warning | ||
connection = connect(db=TEST_DB, host='mongomock://localhost', | ||
uuidRepresentation='standard') | ||
# Add a handler to drop the test database after the test is complete | ||
request.addfinalizer(lambda: connection.drop_database(TEST_DB)) | ||
|
||
return connection |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,61 @@ | ||
[tool.poetry] | ||
name = "gator-core" | ||
version = "0.0.0" # placeholder for the real version, which is retrieved from git tags | ||
description = "A dataset aggregation framework for Sqrl Planner." | ||
authors = ["Shon Verch <verchshon@gmail.com>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
|
||
packages = [ | ||
{ include = "gator", from = "src" } | ||
] | ||
include = [ | ||
{ path = "tests", format = "sdist" } | ||
] | ||
exclude = [ | ||
"**/*.pyc", | ||
"**/*.pyi", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
mongoengine = ">=0.20" | ||
marshmallow = "^3.17.0" | ||
marshmallow-enum = "^1.5.1" | ||
requests = "^2.28.2" | ||
bs4 = "^0.0.1" | ||
routes = "^2.5.1" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pre-commit = "^2.20.0" | ||
pytest = "^7.1.2" | ||
pytest-cov = "^3.0.0" | ||
pytest-mock = "^3.7.0" | ||
pytest-httpserver = "^1.0.4" | ||
|
||
[tool.poetry-dynamic-versioning] | ||
enable = true | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.pyright] | ||
include = ["gator/**", "tests/**"] | ||
exclude = ["**/__pycache__"] | ||
|
||
typeCheckingMode = "basic" | ||
pythonVersion = "3.9" | ||
pythonPlatform = "All" | ||
typeshedPath = "typeshed" | ||
enableTypeIgnoreComments = true | ||
|
||
# This is required as the CI pre-commit does not download required modules | ||
reportMissingImports = "none" | ||
[tool.poetry] | ||
name = "gator-core" | ||
version = "0.0.0" # placeholder for the real version, which is retrieved from git tags | ||
description = "A dataset aggregation framework for Sqrl Planner." | ||
authors = ["Shon Verch <verchshon@gmail.com>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
|
||
packages = [ | ||
{ include = "gator/**/*", from = "src" } | ||
] | ||
include = [ | ||
{ path = "src/gator/_vendor/**/*", format = ["sdist", "wheel"] }, | ||
{ path = "tests", format = "sdist" } | ||
] | ||
exclude = [ | ||
"**/*.pyc", | ||
"**/*.pyi", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
mongoengine = ">=0.20" | ||
marshmallow = "^3.17.0" | ||
requests = "^2.28.2" | ||
bs4 = "^0.0.1" | ||
routes = "^2.5.1" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pre-commit = "^2.20.0" | ||
pytest = "^7.1.2" | ||
pytest-cov = "^3.0.0" | ||
pytest-mock = "^3.7.0" | ||
pytest-httpserver = "^1.0.4" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
mypy = "^1.0.1" | ||
mongo-types = "^0.15.1" | ||
vendorize = "^0.3.0" | ||
mongomock = "^4.1.2" | ||
sybil = "^5.0.0" | ||
|
||
[tool.poetry-dynamic-versioning] | ||
enable = true | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.pyright] | ||
include = ["gator/**", "tests/**"] | ||
exclude = ["**/__pycache__", "src/gator/_vendor/**"] | ||
|
||
typeCheckingMode = "basic" | ||
pythonVersion = "3.9" | ||
pythonPlatform = "All" | ||
typeshedPath = "typeshed" | ||
enableTypeIgnoreComments = true | ||
|
||
# This is required as the CI pre-commit does not download required modules | ||
reportMissingImports = "none" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# content of pytest.ini | ||
[pytest] | ||
addopts = --doctest-modules | ||
# content of pytest.ini | ||
[pytest] | ||
addopts = -p no:doctest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
"""Models for the Gator application.""" | ||
from gator.core.models import common # noqa: F401 | ||
from gator.core.models import timetable # noqa: F401 | ||
"""All models in Gator.""" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.