Skip to content

Commit

Permalink
Merge pull request #12 from dbatten5/vcr
Browse files Browse the repository at this point in the history
Use pyvcr
  • Loading branch information
dbatten5 committed Oct 27, 2021
2 parents 2ad77a3 + 0ade3b6 commit ff5b79d
Show file tree
Hide file tree
Showing 29 changed files with 3,785 additions and 1,362 deletions.
11 changes: 0 additions & 11 deletions .readthedocs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Actions Status](https://github.com/dbatten5/phylm/workflows/Tests/badge.svg)](https://github.com/dbatten5/phylm/actions)
[![Actions Status](https://github.com/dbatten5/phylm/workflows/Release/badge.svg)](https://github.com/dbatten5/phylm/actions)
[![codecov](https://codecov.io/gh/dbatten5/phylm/branch/main/graph/badge.svg?token=948J8ECAQT)](https://codecov.io/gh/dbatten5/phylm)
[![codecov](https://codecov.io/gh/dbatten5/phylm/branch/master/graph/badge.svg?token=P233M48EA6)](https://codecov.io/gh/dbatten5/phylm)

# Phylm

Expand Down
2 changes: 2 additions & 0 deletions docs/imdb.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Usage

To access IMDb data points, first ensure you have loaded the IMDb source
through:

Expand Down
4 changes: 1 addition & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[![Actions Status](https://github.com/dbatten5/phylm/workflows/Tests/badge.svg)](https://github.com/dbatten5/phylm/actions)
[![Actions Status](https://github.com/dbatten5/phylm/workflows/Release/badge.svg)](https://github.com/dbatten5/phylm/actions)
[![codecov](https://codecov.io/gh/dbatten5/phylm/branch/main/graph/badge.svg?token=948J8ECAQT)](https://codecov.io/gh/dbatten5/phylm)

# Phylm
[![codecov](https://codecov.io/gh/dbatten5/phylm/branch/master/graph/badge.svg?token=P233M48EA6)](https://codecov.io/gh/dbatten5/phylm)

When deciding which film to watch next, it can be helpful to have some key
datapoints at your fingertips, for example, the genre, the cast, the Metacritic
Expand Down
2 changes: 2 additions & 0 deletions docs/mtc.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Usage

To access Metacritic data points, first ensure you have loaded the Metacritic source
through:

Expand Down
2 changes: 2 additions & 0 deletions docs/rt.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Usage

To access Rotten Tomatoes data points, first ensure you have loaded the Rotten Tomatoes source
through:

Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def mypy(session: Session) -> None:
def tests(session: Session) -> None:
"""Run the test suite."""
session.install(".")
session.install("coverage[toml]", "pytest", "pygments")
session.install("coverage[toml]", "pytest", "pygments", "vcrpy")
try:
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
finally:
Expand All @@ -152,7 +152,7 @@ def coverage(session: Session) -> None:
def typeguard(session: Session) -> None:
"""Runtime type checking using Typeguard."""
session.install(".")
session.install("pytest", "typeguard", "pygments")
session.install("pytest", "typeguard", "pygments", "vcrpy")
session.run("pytest", f"--typeguard-packages={package}", *session.posargs)


Expand Down
251 changes: 250 additions & 1 deletion poetry.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ mkdocs-material-extensions = "^1.0.3"
mkdocs-minify-plugin = "^0.5.0"
mkdocstrings = "^0.16.2"
types-requests = "^2.25.11"
vcrpy = "^4.1.1"

[tool.poetry.scripts]
phylm = "phylm.__main__:main"
Expand All @@ -78,9 +79,10 @@ show_column_numbers = true
show_error_codes = true
show_error_context = true
implicit_reexport = true
disallow_untyped_decorators = false

[[tool.mypy.overrides]]
module = ["imdb", "imdb.Movie", "bs4", "bs4.element", "requests"]
module = ["imdb", "imdb.Movie", "bs4", "bs4.element", "requests", "vcr"]
ignore_missing_imports = true

[tool.isort]
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Module to hold fixtures etc. for pytest."""

FIXTURES_DIR = "tests/fixtures/vcr_cassettes"
Empty file removed tests/data/__init__.py
Empty file.
Empty file removed tests/data/mtc/__init__.py
Empty file.
173 changes: 0 additions & 173 deletions tests/data/mtc/matrix_results.html

This file was deleted.

39 changes: 0 additions & 39 deletions tests/data/mtc/no_results.html

This file was deleted.

Empty file removed tests/data/rt/__init__.py
Empty file.
Loading

0 comments on commit ff5b79d

Please sign in to comment.