1 Commits

Author SHA1 Message Date
846682bf75 Update dependency types-ujson to v5.9.0.0
Some checks failed
Tests / test (3.10) (pull_request) Failing after 23m8s
Tests / test (3.11) (pull_request) Failing after 23m18s
Tests / test (3.8) (pull_request) Failing after 23m7s
Tests / test (3.9) (pull_request) Failing after 23m10s
2024-03-27 12:23:01 +02:00
15 changed files with 22 additions and 109 deletions

View File

@@ -11,7 +11,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest-de
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
strategy:
matrix:

1
.gitignore vendored
View File

@@ -154,7 +154,6 @@ cython_debug/
# Custom
.mise.toml
.vscode/
.venv_linux/
.venv_windows/

View File

@@ -3,15 +3,6 @@
"extends": [
"config:base"
],
"baseBranches": [
"dev"
],
"pip_requirements": {
"fileMatch": [
"requirements/.*\\.txt$"
],
"enabled": true
},
"packageRules": [
{
"matchUpdateTypes": [

View File

@@ -10,7 +10,7 @@ maintainers = [{ name = "Profitroll", email = "profitroll@end-play.xyz" }]
description = "Small module that makes your journey with RMV REST API somehow easier."
readme = "README.md"
requires-python = ">=3.8"
license = { text = "MIT" }
license = { text = "GPL3" }
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
@@ -21,7 +21,6 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]
@@ -39,14 +38,13 @@ dependencies = { file = "requirements/_.txt" }
[tool.setuptools.dynamic.optional-dependencies]
dev = { file = "requirements/dev.txt" }
dist = { file = "requirements/dist.txt" }
speed = { file = "requirements/speed.txt" }
[tool.setuptools.packages.find]
where = ["src"]
[tool.black]
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
target-version = ['py38', 'py39', 'py310', 'py311']
line-length = 94
[tool.isort]

View File

@@ -1,3 +1,3 @@
requests~=2.32.3
requests~=2.31.0
xmltodict~=0.13.0
isodate~=0.6.1

View File

@@ -1,12 +1,12 @@
black~=24.8.0
black==23.12.1
build==1.1.1
isort==5.13.2
mypy~=1.11.2
pylint==3.2.7
pytest-cov~=5.0.0
pytest~=8.3.2
tox==4.18.1
types-ujson~=5.10.0.20240515
# Disabled async libraries for now
# types-aiofiles~=24.1.0.20240626
# pytest-asyncio~=0.24.0
mypy==1.7.0
pylint==3.1.0
pytest-asyncio==0.22.0
pytest-cov==4.1.0
pytest==7.4.4
tox==4.14.2
twine==4.0.2
types-aiofiles==23.2.0.20240311
types-ujson==5.9.0.0

View File

@@ -1,2 +0,0 @@
build==1.2.2
twine~=5.1.1

View File

@@ -1 +1 @@
ujson~=5.10.0
ujson~=5.8.0

View File

@@ -21,7 +21,7 @@ trip = client.trip_find(origin_id=origin.id, dest_id=destination.id)
"""
__name__ = "pyrmv"
__version__ = "0.4.0"
__version__ = "0.4.0-rc.2"
__license__ = "MIT License"
__author__ = "Profitroll"

View File

@@ -3,7 +3,6 @@ from .gis import Gis
from .journey import Journey
from .leg import Leg
from .message import Channel, Message, Url
from .platform_type import PlatformType
from .stop import Stop, StopTrip
from .ticket import Ticket
from .trip import Trip

View File

@@ -1,17 +0,0 @@
from typing import Any, Mapping, Union
from pyrmv.enums.platform_type_type import PlatformTypeType
class PlatformType:
"""Platform information."""
def __init__(self, data: Mapping[str, Any]):
self.type: PlatformTypeType = (
PlatformTypeType.U if "type" not in data else PlatformTypeType(data.get("type"))
)
self.text: Union[str, None] = data.get("text")
self.hidden: bool = bool(data.get("hidden"))
self.lon: float = data["lon"]
self.lat: float = data["lat"]
self.alt: int = data["alt"]

View File

@@ -4,7 +4,6 @@ from .board_type import BoardArrivalType, BoardDepartureType
from .filter_mode import FilterMode
from .lang import Language
from .location_type import LocationType
from .platform_type_type import PlatformTypeType
from .product import Product
from .rt_mode import RealTimeMode
from .search_mode import SearchMode

View File

@@ -1,51 +0,0 @@
from enum import Enum, auto
class PlatformTypeType(Enum):
"""Enumeration used to declare types of platform type.
* U - Undefined
* PL - Platform/track at train station
* ST - Stop at bus or tram station
* GA - Terminal/Gate at airport
* PI - Pier if ship or ferry
* SL - Slot/parking space if bike or car
* FL - Floor in buildings or at footpath
* CI - Check-in/entrance
* CO - Check-out/exit
* X - No explicit type
* H - Hide platform information
"""
U = auto()
"Undefined"
PL = auto()
"Platform/track at train station"
ST = auto()
"Stop at bus or tram station"
GA = auto()
"Terminal/Gate at airport"
PI = auto()
"Pier if ship or ferry"
SL = auto()
"Slot/parking space if bike or car"
FL = auto()
"Floor in buildings or at footpath"
CI = auto()
"Check-in/entrance"
CO = auto()
"Check-out/exit"
X = auto()
"No explicit type"
H = auto()
"Hide platform information"

View File

@@ -20,12 +20,9 @@ def test_board_departure(api_client: Client, sample_stop_id: str):
def test_him_search(api_client: Client):
response = api_client.him_search(time_end=datetime.now() + timedelta(days=10))
if len(response) != 0:
assert isinstance(response[0], Message)
else:
assert isinstance(response, list)
assert isinstance(
api_client.him_search(time_end=datetime.now() + timedelta(days=10))[0], Message
)
def test_journey_detail(api_client: Client, sample_journey_id: str):

View File

@@ -1,6 +1,6 @@
[tox]
minversion = 3.8.0
envlist = py38, py39, py310, py311, py312
envlist = py38, py39, py310, py311
isolated_build = true
[gh-actions]
@@ -9,7 +9,6 @@ python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[testenv]
setenv =
@@ -22,3 +21,4 @@ deps =
-r{toxinidir}/requirements/speed.txt
commands =
pytest --basetemp={envtmpdir} --cov=pyrmv --cov-report term-missing