Skip to content

Commit

Permalink
Merge pull request #94 from ParkenDD/updated-docs-dependencies
Browse files Browse the repository at this point in the history
updated docs, dependencies
  • Loading branch information
the-infinity authored Feb 29, 2024
2 parents 09d8e38 + d37a4f5 commit 24fd413
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 31 deletions.
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.ruff]
select = [
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
Expand All @@ -12,16 +12,15 @@ select = [
"B", # flake8-bugbear
]

ignore = [
lint.ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"F401", # imported but unused
"S101", # use of assert detected
]

fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]

lint.fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
exclude = [
".bzr",
".direnv",
Expand All @@ -47,10 +46,10 @@ exclude = [

line-length = 140

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]

[tool.ruff.flake8-quotes]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
multiline-quotes = "single"
docstring-quotes = "double"
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytest~=7.4.3
black~=23.12.1
ruff~=0.1.8
pytest~=8.0.1
black~=24.2.0
ruff~=0.2.1
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Flask~=3.0.0
Flask~=3.0.2
Flask-Failsafe~=0.2
Flask-Migrate~=4.0.5
Flask-SQLAlchemy~=3.1.1
SQLAlchemy~=2.0.23
SQLAlchemy~=2.0.27
SQLAlchemy-Utc~=0.14.0
pytz~=2023.3.post1
pytz~=2024.1
psycopg2-binary~=2.9.9
pymysql~=1.1.0
requests~=2.31.0
Expand All @@ -14,16 +14,16 @@ pyyaml~=6.0.1
celery~=5.3.6
werkzeug~=3.0.1
validataclass~=0.9.0
python-dotenv~=1.0.0
python-dotenv~=1.0.1
click~=8.1.7
openpyxl~=3.1.2
opening-hours-py~=0.6.18
kombu~=5.3.4
lxml~=4.9.4
kombu~=5.3.5
lxml~=5.1.0

# required for converters
beautifulsoup4~=4.12.2
jsonschema~=4.20.0
beautifulsoup4~=4.12.3
jsonschema~=4.21.1
python-dateutil~=2.8.2
python-decouple~=3.8.0
feedparser~=6.0.11
Expand Down
1 change: 0 additions & 1 deletion webapp/entry_point_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt.
"""


from .app import launch

application = launch()
Expand Down
44 changes: 32 additions & 12 deletions webapp/public_rest_api/parking_sites/parking_sites_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,52 @@
UriField,
)

from webapp.models.parking_site import ParkAndRideType, ParkingSiteType
from webapp.models.parking_site import OpeningStatus, ParkAndRideType, ParkingSiteType

parking_site_schema = JsonSchema(
title='ParkingSite',
properties={
'id': IntegerField(),
'created_at': DateTimeField(),
'modified_at': DateTimeField(),
'source_id': IntegerField(minimum=1),
'original_uid': StringField(maxLength=256),
'id': IntegerField(description='Internal ID, generated by ParkAPI Service.'),
'created_at': DateTimeField(description='Creation date in ParkAPI Service database, cannot be set by clients.'),
'modified_at': DateTimeField(description='Last modified value in ParkAPI Service database, cannot be set by clients.'),
'source_id': IntegerField(minimum=1, description='Source ID, generated by ParkAPI Service.'),
'original_uid': StringField(maxLength=256, description='Unique Identifier in original system.'),
'name': StringField(maxLength=256),
'operator_name': StringField(maxLength=256, required=False),
'public_url': UriField(maxLength=4096, required=False),
'address': StringField(maxLength=512, required=False),
'description': StringField(maxLength=4096, required=False),
'public_url': UriField(
maxLength=4096,
required=False,
description='URL for human users to get more details about this parking site.',
),
'address': StringField(
maxLength=512,
required=False,
description='Full address including street postalcode and city. Preferable in format <street with number>, <postalcode> <city>',
),
'description': StringField(
maxLength=4096,
required=False,
description='Description for customers like special conditions, remarks how to get there etc.',
),
'type': EnumField(enum=ParkingSiteType),
'max_stay': IntegerField(minimum=0, required=False),
'max_stay': IntegerField(minimum=0, required=False, description='Maximum stay, in seconds.'),
'max_height': IntegerField(minimum=0, required=False),
'has_lighting': BooleanField(required=False),
'park_and_ride_type': ArrayField(items=EnumField(enum=ParkAndRideType), required=False),
'is_supervised': BooleanField(required=False),
'has_realtime_data': BooleanField(default=False),
'fee_description': StringField(required=False),
'has_fee': BooleanField(required=False),
'static_data_updated_at': DateTimeField(),
'realtime_opening_status': DateTimeField(required=False),
'static_data_updated_at': DateTimeField(description='Last time static fields were updated. Can be set by the client.'),
'realtime_data_updated_at': DateTimeField(
required=False,
description='Last time realtime fields were updated. Can be set by the client.',
),
'realtime_opening_status': EnumField(
enum=OpeningStatus,
required=False,
description='Realtime opening status which is reported by the client.',
),
'lat': DecimalField(precision=10, scale=7),
'lon': DecimalField(precision=10, scale=7),
'capacity': IntegerField(minimum=0),
Expand Down
1 change: 0 additions & 1 deletion webapp/services/sqlalchemy_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class SqlalchemyService(BaseService):

"""
This Service gets all Model changes ('insert', 'update', and 'delete') and generates Events based on these. This
just works for simple redirections without SQL requests.
Expand Down

0 comments on commit 24fd413

Please sign in to comment.