Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code refactoring #36

Merged
merged 30 commits into from
May 16, 2024
Merged

Code refactoring #36

merged 30 commits into from
May 16, 2024

Conversation

paracosm17
Copy link
Contributor

Just refactoring the code. The changes almost did not change the behavior of the program

The purpose of the fixes is to standardize the code to pep8, fix codestyle and identations, improve the performance and readability of the code

  1. Fix comments, empty strings, imports. Add ".idea" to .gitignore
  2. Fix "if" expressions. Fix lantitude, longitude types in "coordinates_overage" (from int to float). Remove timestamp from coordinates_overage (line 132 in original start.py), because redefined without timestamp in line 202, and so, timestamp in coordinates_overage is not used.
    Added better exception handling when opening a generated html file in the browser
  3. Code refactoring in functions.py. Added better get_location_details. The function "pring_city_by_geo" has been renamed to "print_city_by_geo". remove lon_rad from calculate_coordinates because not used. Change R to r. Correction of minor defects.

@ask0n
Copy link
Collaborator

ask0n commented May 11, 2024

Hi @paracosm17 to keep code standard across future changes we need to have pipeline with a linter, could you please add it as a part of this PR?
Ruff would be a preferred one.

@paracosm17
Copy link
Contributor Author

Hi @paracosm17 to keep code standard across future changes we need to have pipeline with a linter, could you please add it as a part of this PR? Ruff would be a preferred one.

Hello, I'll add It today

requirements-dev.txt Outdated Show resolved Hide resolved
backend/functions.py Outdated Show resolved Hide resolved
backend/functions.py Show resolved Hide resolved
start.py Outdated Show resolved Hide resolved
Repository owner deleted a comment from paracosm17 May 14, 2024
@ask0n ask0n merged commit d27e8f4 into IvanGlinkin:main May 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants