55 Commits

Author SHA1 Message Date
387565605e Merge pull request 'v0.4.0' (#53) from dev into master
Reviewed-on: #53
2024-09-08 02:54:11 +03:00
759e6f3703 Updated to 0.4.0
All checks were successful
Tests / test (3.10) (push) Successful in 22s
Tests / test (3.11) (push) Successful in 23s
Tests / test (3.8) (push) Successful in 22s
Tests / test (3.9) (push) Successful in 23s
Tests / test (3.10) (pull_request) Successful in 22s
Tests / test (3.11) (pull_request) Successful in 19s
Tests / test (3.8) (pull_request) Successful in 22s
Tests / test (3.9) (pull_request) Successful in 20s
2024-09-08 01:44:18 +02:00
09d43d3426 Merge branch 'rmv-2.39.1' into dev
All checks were successful
Tests / test (3.10) (push) Successful in 20s
Tests / test (3.11) (push) Successful in 22s
Tests / test (3.8) (push) Successful in 20s
Tests / test (3.9) (push) Successful in 21s
2024-09-08 01:40:22 +02:00
cbcfc8604f Changed testing method for Client.him_search()
All checks were successful
Tests / test (3.10) (pull_request) Successful in 23s
Tests / test (3.11) (pull_request) Successful in 33s
Tests / test (3.8) (pull_request) Successful in 24s
Tests / test (3.9) (pull_request) Successful in 21s
2024-09-08 01:28:18 +02:00
34a601424b Dependencies bumped and .gitignore updated 2024-09-08 01:27:58 +02:00
0096581595 Disabled unused async libraries
Some checks failed
Tests / test (3.10) (pull_request) Successful in 34s
Tests / test (3.11) (pull_request) Successful in 33s
Tests / test (3.8) (pull_request) Successful in 34s
Tests / test (3.9) (pull_request) Failing after 36s
2024-09-08 00:51:21 +02:00
9fd0704156 Merge pull request 'Update dependency tox to v4.18.1' (#50) from renovate/tox-4.x into dev
Some checks failed
Tests / test (3.10) (push) Successful in 39s
Tests / test (3.11) (push) Successful in 37s
Tests / test (3.8) (push) Failing after 33s
Tests / test (3.9) (push) Failing after 37s
Reviewed-on: #50
2024-09-08 01:49:03 +03:00
d29793f064 Merge pull request 'Update dependencies in the branch' (#51) from dev into rmv-2.39.1
Some checks failed
Tests / test (3.10) (pull_request) Successful in 33s
Tests / test (3.11) (pull_request) Successful in 37s
Tests / test (3.8) (pull_request) Failing after 38s
Tests / test (3.9) (pull_request) Failing after 38s
Reviewed-on: #51
2024-09-07 21:34:20 +03:00
34953dd739 Added Python 3.12 support 2024-09-07 20:21:52 +02:00
11eddfab68 Update dependency tox to v4.18.1
All checks were successful
Tests / test (3.10) (pull_request) Successful in 36s
Tests / test (3.11) (pull_request) Successful in 37s
Tests / test (3.8) (pull_request) Successful in 38s
Tests / test (3.9) (pull_request) Successful in 35s
2024-09-07 19:48:59 +03:00
cb5ec2df90 Changed runner's label to ubuntu-latest-de
Some checks failed
Tests / test (3.10) (push) Failing after 35s
Tests / test (3.11) (push) Failing after 1m8s
Tests / test (3.8) (push) Successful in 58s
Tests / test (3.9) (push) Failing after 1m4s
Tests / test (3.10) (pull_request) Failing after 33s
Tests / test (3.11) (pull_request) Failing after 27s
Tests / test (3.8) (pull_request) Failing after 33s
Tests / test (3.9) (pull_request) Failing after 31s
2024-09-07 12:01:27 +03:00
06221ac72c Merge pull request 'Update dependency build to v1.2.2' (#49) from renovate/build-1.x into dev
Some checks failed
Tests / test (3.8) (push) Waiting to run
Tests / test (3.9) (push) Waiting to run
Tests / test (3.10) (push) Failing after 22m41s
Tests / test (3.11) (push) Has been cancelled
Reviewed-on: #49
2024-09-07 11:31:35 +03:00
3284fb8452 Update dependency build to v1.2.2
Some checks failed
Tests / test (3.10) (pull_request) Failing after 22m44s
Tests / test (3.11) (pull_request) Failing after 22m44s
Tests / test (3.8) (pull_request) Failing after 22m44s
Tests / test (3.9) (pull_request) Failing after 22m44s
2024-09-07 00:00:46 +03:00
4b169c1a86 Update dependency pylint to v3.2.7 (#48)
Some checks failed
Tests / test (3.10) (push) Failing after 22m48s
Tests / test (3.11) (push) Failing after 22m44s
Tests / test (3.8) (push) Failing after 22m44s
Tests / test (3.9) (push) Failing after 22m44s
2024-08-31 20:02:52 +03:00
6df5f6993b Update dependency pylint to v3.2.7
Some checks failed
Tests / test (3.10) (pull_request) Failing after 22m44s
Tests / test (3.11) (pull_request) Failing after 22m43s
Tests / test (3.8) (pull_request) Failing after 22m44s
Tests / test (3.9) (pull_request) Failing after 22m46s
2024-08-31 18:06:11 +03:00
8cd447bfa2 Update dependency pytest-asyncio to ~=0.24.0 (#47) 2024-08-22 12:11:55 +03:00
d20a463ba0 Update dependency pytest-asyncio to ~=0.24.0 2024-08-22 11:53:54 +03:00
fa2a70efbf Added PlatformType and PlatformTypeType (for #4) 2024-08-18 22:51:57 +02:00
42adffec7b Update dependency tox to v4.18.0 (#46) 2024-08-13 21:58:08 +03:00
e4574fb42d Update dependency tox to v4.18.0 2024-08-13 20:33:11 +03:00
81a05b194a Merge pull request 'Update dependency tox to v4.17.1' (#45) from renovate/tox-4.x into dev
Reviewed-on: #45
2024-08-08 15:24:48 +03:00
cb6106d486 Update dependency tox to v4.17.1 2024-08-07 21:23:00 +03:00
1d131642eb Merge pull request 'Update dependency tox to v4.17.0' (#44) from renovate/tox-4.x into dev
Reviewed-on: #44
2024-08-06 00:39:34 +03:00
519e083f57 Update dependency tox to v4.17.0 2024-08-05 23:47:05 +03:00
df99e97399 Merge pull request 'Update dependency black to ~=24.8.0' (#43) from renovate/black-24.x into dev
Reviewed-on: #43
2024-08-03 00:58:03 +03:00
92e99fe01a Update dependency black to ~=24.8.0 2024-08-02 21:37:56 +03:00
aa51ddfd70 Update dependency pylint to v3.2.6 (#42) 2024-07-21 23:31:50 +03:00
82d9f703d4 Update dependency pylint to v3.2.6 2024-07-21 23:08:48 +03:00
11a1749623 Update dependency pytest to ~=8.3.1 (#41) 2024-07-20 20:02:10 +03:00
b87e2ea3de Update dependency pytest to ~=8.3.1 2024-07-20 19:40:05 +03:00
2c5472502c Merge pull request 'Update dependency mypy to ~=1.11.0' (#40) from renovate/mypy-1.x into dev
Reviewed-on: #40
2024-07-19 21:42:45 +03:00
fd9199c8ae Update dependency mypy to ~=1.11.0 2024-07-19 21:30:25 +03:00
b8d868efae Update dependency tox to v4.16.0 (#39) 2024-07-03 08:47:52 +03:00
8ebc8d4e59 Update dependency tox to v4.16.0 2024-07-03 07:05:54 +03:00
4cb1a29819 Update dependency pylint to v3.2.5 (#38) 2024-06-28 20:58:42 +03:00
ae565481bc Update dependency pylint to v3.2.5 2024-06-28 17:03:45 +03:00
868060aa35 Merge pull request 'Update dependency pylint to v3.2.4' (#37) from renovate/pylint-3.x into dev
Reviewed-on: #37
2024-06-26 11:54:46 +03:00
beda60e7a8 Update dependency pylint to v3.2.4
Some checks failed
Tests / test (3.10) (pull_request) Failing after 15s
Tests / test (3.11) (pull_request) Failing after 13s
Tests / test (3.8) (pull_request) Failing after 13s
Tests / test (3.9) (pull_request) Failing after 14s
2024-06-26 11:26:50 +03:00
dd1b8d2595 Update dependency types-aiofiles to v24 (#36)
Some checks failed
Tests / test (3.10) (push) Failing after 15s
Tests / test (3.11) (push) Failing after 14s
Tests / test (3.8) (push) Failing after 14s
Tests / test (3.9) (push) Failing after 14s
2024-06-26 08:26:06 +03:00
3531486ee6 Update dependency types-aiofiles to v24
Some checks failed
Tests / test (3.10) (pull_request) Failing after 14s
Tests / test (3.11) (pull_request) Failing after 14s
Tests / test (3.8) (pull_request) Failing after 13s
Tests / test (3.9) (pull_request) Failing after 14s
2024-06-26 06:08:23 +03:00
cb01e17df4 Merge pull request 'Update dependency pylint to v3.2.3' (#35) from renovate/pylint-3.x into dev
Some checks failed
Tests / test (3.10) (push) Failing after 22m49s
Tests / test (3.8) (push) Has been cancelled
Tests / test (3.9) (push) Has been cancelled
Tests / test (3.11) (push) Has been cancelled
Reviewed-on: #35
2024-06-06 21:47:33 +03:00
a3ef49b9a1 Update dependency pylint to v3.2.3
Some checks failed
Tests / test (3.10) (pull_request) Failing after 22m48s
Tests / test (3.11) (pull_request) Failing after 22m47s
Tests / test (3.8) (pull_request) Failing after 22m50s
Tests / test (3.9) (pull_request) Failing after 23m6s
2024-06-06 18:02:45 +03:00
11c47d498c Update dependency tox to v4.15.1 (#34)
Some checks failed
Tests / test (3.10) (push) Failing after 22m59s
Tests / test (3.11) (push) Failing after 22m45s
Tests / test (3.8) (push) Failing after 22m50s
Tests / test (3.9) (push) Failing after 22m49s
2024-06-06 08:11:41 +03:00
3acf96884e Update dependency tox to v4.15.1
Some checks failed
Tests / test (3.10) (pull_request) Failing after 22m49s
Tests / test (3.11) (pull_request) Failing after 22m48s
Tests / test (3.8) (pull_request) Failing after 22m50s
Tests / test (3.9) (pull_request) Failing after 22m52s
2024-06-06 04:19:04 +03:00
8c283f741e Merge pull request 'Update dependency pylint to v3.2.2' (#32) from renovate/pylint-3.x into dev
Some checks failed
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.8) (push) Has been cancelled
Tests / test (3.9) (push) Has been cancelled
Tests / test (3.10) (push) Has been cancelled
Reviewed-on: #32
2024-05-20 19:59:44 +03:00
2525f8d33e Update dependency requests to ~=2.32.0 (#33)
Some checks are pending
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.8) (push) Waiting to run
Tests / test (3.9) (push) Waiting to run
2024-05-20 19:52:11 +03:00
cbc705ae8e Update dependency requests to ~=2.32.0
Some checks failed
Tests / test (3.8) (pull_request) Has been cancelled
Tests / test (3.9) (pull_request) Has been cancelled
Tests / test (3.11) (pull_request) Has been cancelled
Tests / test (3.10) (pull_request) Has been cancelled
2024-05-20 19:36:23 +03:00
f5daf31f39 Update dependency pylint to v3.2.2
Some checks failed
Tests / test (3.10) (pull_request) Failing after 22m50s
Tests / test (3.11) (pull_request) Failing after 22m56s
Tests / test (3.8) (pull_request) Failing after 22m48s
Tests / test (3.9) (pull_request) Failing after 22m49s
2024-05-20 11:11:30 +03:00
9d49b1b0c8 Fixed wrong license attribute
Some checks failed
Tests / test (3.10) (push) Failing after 22m50s
Tests / test (3.11) (push) Failing after 22m51s
Tests / test (3.9) (push) Has been cancelled
Tests / test (3.8) (push) Has been cancelled
2024-05-19 14:18:41 +02:00
104f73afa4 Merge pull request 'Update dependency twine to ~=5.1.0' (#30) from renovate/twine-5.x into dev
Some checks failed
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.8) (push) Has been cancelled
Tests / test (3.9) (push) Has been cancelled
Tests / test (3.10) (push) Has been cancelled
Reviewed-on: #30
2024-05-19 12:07:29 +03:00
aada32f5db Merge pull request 'Update dependency pylint to v3.2.1' (#31) from renovate/pylint-3.x into dev
Some checks failed
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.8) (push) Has been cancelled
Tests / test (3.9) (push) Has been cancelled
Tests / test (3.10) (push) Has been cancelled
Reviewed-on: #31
2024-05-19 12:06:09 +03:00
7c5a56bb0a Update dependency pylint to v3.2.1
Some checks failed
Tests / test (3.10) (pull_request) Failing after 22m48s
Tests / test (3.11) (pull_request) Failing after 22m48s
Tests / test (3.8) (pull_request) Failing after 22m50s
Tests / test (3.9) (pull_request) Failing after 22m49s
2024-05-18 20:18:37 +03:00
60b0a44454 Update dependency twine to ~=5.1.0
Some checks failed
Tests / test (3.10) (pull_request) Failing after 23m11s
Tests / test (3.11) (pull_request) Failing after 22m48s
Tests / test (3.8) (pull_request) Failing after 23m13s
Tests / test (3.9) (pull_request) Failing after 22m50s
2024-05-16 17:09:45 +03:00
78de092a45 Changed pip_requirements location 2024-03-26 14:26:56 +02:00
860ecadb88 Renovate will use dev branch as a main one 2024-03-26 14:14:35 +02:00
14 changed files with 106 additions and 19 deletions

View File

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

1
.gitignore vendored
View File

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

View File

@@ -3,6 +3,15 @@
"extends": [ "extends": [
"config:base" "config:base"
], ],
"baseBranches": [
"dev"
],
"pip_requirements": {
"fileMatch": [
"requirements/.*\\.txt$"
],
"enabled": true
},
"packageRules": [ "packageRules": [
{ {
"matchUpdateTypes": [ "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." description = "Small module that makes your journey with RMV REST API somehow easier."
readme = "README.md" readme = "README.md"
requires-python = ">=3.8" requires-python = ">=3.8"
license = { text = "GPL3" } license = { text = "MIT" }
classifiers = [ classifiers = [
"Development Status :: 3 - Alpha", "Development Status :: 3 - Alpha",
"Intended Audience :: Developers", "Intended Audience :: Developers",
@@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities", "Topic :: Utilities",
] ]
@@ -38,13 +39,14 @@ dependencies = { file = "requirements/_.txt" }
[tool.setuptools.dynamic.optional-dependencies] [tool.setuptools.dynamic.optional-dependencies]
dev = { file = "requirements/dev.txt" } dev = { file = "requirements/dev.txt" }
dist = { file = "requirements/dist.txt" }
speed = { file = "requirements/speed.txt" } speed = { file = "requirements/speed.txt" }
[tool.setuptools.packages.find] [tool.setuptools.packages.find]
where = ["src"] where = ["src"]
[tool.black] [tool.black]
target-version = ['py38', 'py39', 'py310', 'py311'] target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
line-length = 94 line-length = 94
[tool.isort] [tool.isort]

View File

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

View File

@@ -1,12 +1,12 @@
black~=24.4.0 black~=24.8.0
build==1.2.1
isort==5.13.2 isort==5.13.2
mypy~=1.10.0 mypy~=1.11.2
pylint==3.2.0 pylint==3.2.7
pytest-asyncio~=0.23.6
pytest-cov~=5.0.0 pytest-cov~=5.0.0
pytest~=8.2.0 pytest~=8.3.2
tox==4.15.0 tox==4.18.1
twine~=5.0.0
types-aiofiles~=23.2.0.20240311
types-ujson~=5.10.0.20240515 types-ujson~=5.10.0.20240515
# Disabled async libraries for now
# types-aiofiles~=24.1.0.20240626
# pytest-asyncio~=0.24.0

2
requirements/dist.txt Normal file
View File

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

View File

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

View File

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

View File

@@ -0,0 +1,17 @@
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,6 +4,7 @@ from .board_type import BoardArrivalType, BoardDepartureType
from .filter_mode import FilterMode from .filter_mode import FilterMode
from .lang import Language from .lang import Language
from .location_type import LocationType from .location_type import LocationType
from .platform_type_type import PlatformTypeType
from .product import Product from .product import Product
from .rt_mode import RealTimeMode from .rt_mode import RealTimeMode
from .search_mode import SearchMode from .search_mode import SearchMode

View File

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

View File

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