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

Fix multiple open issues #79

Merged
merged 11 commits into from
Sep 28, 2024
Merged

Fix multiple open issues #79

merged 11 commits into from
Sep 28, 2024

Conversation

Kiyotoko
Copy link
Member

  • Rename python files (run_seekers and run_python)
  • Added os to released archive file names (linux and win32)
  • Fix parser argument names
  • Split seeker types into multiple files

@Kiyotoko Kiyotoko added the confirmed issue confirmed by staff label Jul 31, 2024
@Kiyotoko Kiyotoko requested a review from Belissimo-T July 31, 2024 07:22
@Kiyotoko
Copy link
Member Author

This addresses the issues (#46, #76, #77).

@Belissimo-T
Copy link
Member

Belissimo-T commented Jul 31, 2024

@Kiyotoko Thanks for fixing #46 and #76. I'd like #77 to be fixed in a different way, though.

This is a really big PR 😳. Please, in the future, make sure to submit smaller PRs (ideally one per issue), I won't be reviewing PRs with ~1000 lines changed. I will start looking over the code now.

Copy link
Member

@Belissimo-T Belissimo-T left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs lots of changes still, especially regarding the imports. I'd also like to revert 94bbd87, for now.

.github/workflows/pre-release.yml Show resolved Hide resolved
client.py Outdated Show resolved Hide resolved
client.py Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
seekers/__init__.py Outdated Show resolved Hide resolved
seekers/game/physical.py Outdated Show resolved Hide resolved
seekers/game/player.py Outdated Show resolved Hide resolved
seekers/game/world.py Outdated Show resolved Hide resolved
seekers/grpc/converters.py Show resolved Hide resolved
seekers/grpc/server.py Outdated Show resolved Hide resolved
@Belissimo-T
Copy link
Member

Belissimo-T commented Jul 31, 2024

I'm working on it. Will amend this PR in a bit.

seekers/vector.py Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
seekers/game/camp.py Outdated Show resolved Hide resolved
@Belissimo-T
Copy link
Member

Belissimo-T commented Jul 31, 2024

The way it is now, is ok. But...

Honestly, I hate that seekers_types is split up.
To start, I dislike the constant need of switching between numerous files. Next, because everything is in different files, you always need lots of imports (This PR adds 150 LOC, mostly comprising imports!). It complicates the whole architecture. Big files (10^3 LOC) aren't inherently bad and occur very often in libraries. And because Python import are evaluated at runtime, everything has to namespaced or you get import cycle errors (longer identifiers). Unfortunately these namespaces have same name as local existing local vars, so these need to be renamed, either by shortening (ew) or an ugly trailing undersocore_ (ewwww).

It just doesn't make sense to pull these classes apart; they all conain cross references to each other. This is not Java.

@Kiyotoko
Copy link
Member Author

The way it is now, is ok. But...

Honestly, I hate that seekers_types is split up. To start, I dislike the constant need of switching between numerous files. Next, because everything is in different files, you always need lots of imports (This PR adds 150 LOC, mostly comprising imports!). It complicates the whole architecture. Big files (10^3 LOC) aren't inherently bad and occur very often in libraries. And because Python import are evaluated at runtime, everything has to namespaced or you get import cycle errors (longer identifiers). Unfortunately these namespaces have same name as local existing local vars, so these need to be renamed, either by shortening (ew) or an ugly trailing undersocore_ (ewwww).

It just doesn't make sense to pull these classes apart; they all conain cross references to each other. This is not Java.

To be honest, I can not really understand why you hate the splitup. I can understand your problems with my mistakes (like mixing up the imports). I did many imports with the IDE and should have manually checked it which I did not, so I can understand your view there. I will fix this. However, splitting up the seeker types improves readability, as it no longer requires to search for the class in the complete file. The file seekers_types was over 900 lines long! This clearly oversteps the level of "long library file". I know that in Python AND Java, there are long files with over 4k lines of code, however, many lines are only comments or docstrings, which is NOT the case in seekers_types. As I have already fixed all cycle errors, there is no need to critiseze namespaces. It does make sense to pull theses classes apart, as they are all represent a different part of the game.

@Kiyotoko
Copy link
Member Author

@Belissimo-T Can we merge it?

@Kiyotoko Kiyotoko merged commit 95fd11f into seekers-dev:master Sep 28, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed issue confirmed by staff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename run_seekers and run_client CLI arguments have invalid dash prefixes Split up seekers_types.py
2 participants