Merge modifications for more separate backend functions #69
Reference in New Issue
Block a user
No description provided.
Delete Branch "backend/micro-services-restructuring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Payment logic is taking shape - exciting!
@@ -19,3 +19,3 @@run: |apt-get update && apt-get install -y python3 python3-pippip install pipenvpip install uvUsing the uv action would be cleaner:
See https://docs.astral.sh/uv/guides/integration/github/#installation
Using this works in the
backend_run_lint.yamlstep as well. Just runuv run pylint ....@@ -2,1 +1,4 @@FROM python:3.12-slim-bookworm# The installer requires curl (and certificates) to download the release archiveRUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificatesIs this the way they do it at stadler? 😀
I prefer a different approach:
-alpineis enoughuvdocker container - the package is already built there. No need to run the installer, no curl dependencies, etc...The result looks something like:
What do you think?
Good idea. Changes implemented in commit fe1b42fff9
@@ -0,0 +7,4 @@# Load variables from environmentload_dotenv(override=True)I don't like this. Under no circumstances should this run in prod. For testing purposes the dotenv should be loaded by the user. E.g. through
launch.json, ordirenv.This should be fixed by #70
@@ -0,0 +11,4 @@@dataclassclass Environment :I like this.
@@ -24,3 +23,3 @@nature_coeff: float # coeff to adjust score of parksoverall_coeff: float # coeff to adjust weight of tagsn_important: int # number of important landmarks to consider# n_important: int # number of important landmarks to considerBe brave! Delete it
Removed in commit 510aabcb0a
@@ -0,0 +104,4 @@landmarks_around = manager.generate_landmarks_list(center_coordinates = (lat, lon),preferences = prefs,allow_clusters=False,should this be a landmark-parameter? No need to let the user choose that option. But it might be intersting to allow this to be set at runtime instead of hardcoding it.
Also a good point! Implemented in commit bfc0c9adae
@@ -34,3 +34,3 @@logging.getLogger('urllib3.connectionpool').setLevel(logging.WARNING)# no need for time since it's added by loki or can be shown in kube logslogging_format = '%(name)s - %(levelname)s - %(message)s'logging_format = '%(name)-55s - %(levelname)-7s - %(message)s'What does this do?
@@ -0,0 +52,4 @@"description": self.details.description}],"redirect_urls": {"return_url": "http://localhost:8000/payment/success",Pretty sure that won't work. It should definitely not be hardcoded since the callback will change depending on prod or staging.
@@ -94,0 +106,4 @@start_coords: tuple[float, float] = None,end_coords: tuple[float, float] = None,):def decorator(test_func):what's going on here?
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.