Skip to content

Commit

Permalink
Split tests into two modules, one for shapely
Browse files Browse the repository at this point in the history
  • Loading branch information
kageurufu committed Feb 10, 2022
1 parent 1244064 commit d3263d6
Show file tree
Hide file tree
Showing 7 changed files with 639 additions and 511 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
python-version: '3.9.x'
- run: |
pip install -U pip poetry
poetry install
poetry install -E shapely
env:
POETRY_VIRTUALENVS_CREATE: false
Expand Down
267 changes: 101 additions & 166 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions preprocess_cancellation.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/usr/bin/env python3
from __future__ import annotations

import argparse
import json
import logging
import time
import pathlib
import platform
import re
import shutil
import statistics
import sys
import tempfile
import time
from typing import Any, Dict, List, NamedTuple, Optional, Set, Tuple, TypeVar


logging.basicConfig(stream=sys.stderr, level=logging.INFO)
logger = logging.getLogger("prepropress_cancellation")

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ preprocess_cancellation = 'preprocess_cancellation:_main'
shapely = [ "shapely" ]

[tool.poetry.dependencies]
python = ">= 3.6.0"
python = ">= 3.6.2"

shapely = { version = "*", optional = true }

[tool.poetry.dev-dependencies]
Expand All @@ -28,6 +29,7 @@ matplotlib = "*"
pyinstaller = "*"
pytest = "*"
pytest-cov = "*"
shapely = "*"

[tool.black]
line_length = 120
Expand Down
405 changes: 65 additions & 340 deletions test_preprocessor.py

Large diffs are not rendered by default.

464 changes: 464 additions & 0 deletions test_preprocessor_with_shapely.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion tools/plot_defines.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import sys

import matplotlib.pyplot
import argparse


for filename in sys.argv[1:]:

Expand All @@ -25,6 +27,6 @@
)[0]
matplotlib.pyplot.plot(object["CENTER"][0], object["CENTER"][1], "-go", color=geom.get_color())

matplotlib.pyplot.legend(loc='center left', bbox_to_anchor=(1, 0.5))
matplotlib.pyplot.legend(loc="center left", bbox_to_anchor=(1, 0.5))
matplotlib.pyplot.tight_layout()
matplotlib.pyplot.show()

0 comments on commit d3263d6

Please sign in to comment.