-
Notifications
You must be signed in to change notification settings - Fork 12
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
[WIP - DO NOT USE] Pythonic and simpler refactor of wemod-launcher
#105
base: main
Are you sure you want to change the base?
Conversation
0c68a15
to
726cc67
Compare
wemod_launcher/wemod
Outdated
@@ -9,7 +9,7 @@ import subprocess | |||
from typing import Optional | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving this file may break backwards compat,
well i guess its fiine but i just want to reduce the amount of work,
if we change it all then the users will all report nothing happens,
something to think on.
Realy keep in mind that on windows wemod is as simple as installing one file,
therefore the idea that most users are unexperienced is not far off,
just keep that in mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will, but with Python conventions, it's better to either have cli.py
or __main__.py
. I'm going with the former, and yes, it will break, but we'll be making a semver v2.0.0 release - and maybe post on Reddit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well a post might work,
well the thing is i have not done anything related to social media,
so i don't have any idea whats going on there.
Well i do use social media but not anything related to the wemod-launcher.
Just so you know that this is something you might have to look for yourself.
f4967fc
to
27e5f0b
Compare
In general keep in mind by refactoring this, Just keep that in mind. |
2d8d1ba
to
a60dd52
Compare
Understood. I'll be contributing a Nix package upstream too, and as I use WeMod on my gaming sessions - this project is a motivation. |
- Set +x on prepare.py (prev. setup.py). - Set +x on wemod (symlinked to wemod.py as well). - Rename setup.py -> prepare.py - otherwise conflicts - Pythonize modules. Signed-off-by: Dom Rodriguez <[email protected]>
This commit updates the names of imports from previously renamed modules. Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Temporary commit. To be reworded. TODO! FIXME! Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
As per review. Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
Signed-off-by: Dom Rodriguez <[email protected]>
4eede7a
to
60073e1
Compare
Signed-off-by: Dom Rodriguez <[email protected]>
As I have mentioned in the dms, The thing is i would be nice if you would use a bit of a simpler system if possible. So what i want to say is please just rethink that a bit. I think probably the biggest issue that the launcher has is really all the slapped in code (spageti code). Almost the same message as before but now it more transparent. |
Hi,
Apologies for the late reply.
On 18.10.2024 12:37, Marvin1099 wrote:
As I have mentioned in the dms,
I was wondering why you went for Poetry.
I have nothing against this, but it just adds a lot of complexity and additional dependencies for for running the wemod-launcher script (as source) that is otherwise simple.
The thing is i would be nice if you would use a bit of a simpler system if possible.
From all i can gather Poetry is a dependency manager,
right now we just use a requirements.txt
and the script itself also makes sure to run in the env if needed.
So what i want to say is please just rethink that a bit.
I think probably the biggest issue that the launcher has is really all the slapped in code (spageti code).
Just my thoughts here and i don't expect you to fix all the old code, just wanted to share my thoughts and like to hear what you think.
Almost the same message as before but now it more transparent.
So, the reason I went with Poetry is because I wanted something
well-supported, flexible, and more configurable than just
requirements.txt.
Using Poetry also allows me to integrate it with Nix quite well.
It's not a huge amount of complexity, but there are alternative
build-systems - ideally we need one that supports pyproject.toml.
requirements.txt and the script itself is a bad mess right now. There's
no semver/other versioning, the script resets the Git repo its in to
update, and there's not a lot of - historically - QA testing before
pushing a new release.
I would like this PR to change that.
The `pyproject.toml` also allows us to specify the CLI program, and to
use `pyinstaller` - meaning single, self-contained binaries for
`wemod-launcher`.
The biggest issue is, yes, the spaghetti code.
cc: @DaniAsh551 - what are your thoughts?
Thank you for questioning this, Marvin - without questioning, there is
no room to learn, to collaborate with others, and to grow.
Best wishes,
--
Dom Rodriguez
|
So @shymega I did check a bit of things and came across The main advantage I think is that since it uses pep standards, we are not locked on that tool. |
Also tidy up Flake, use `devenv` inside Flake (and update .envrc), as well as restructuring project layout Signed-off-by: Dom Rodriguez <[email protected]>
Agreed - got it working with Nix, and I think I quite like pdm. Pushed. |
Hi all!
As mentioned briefly in #100, and discussed over Discord with Marvin, this PR
is a overhaul I'm working on of
wemod-launcher
.Testing is welcome once I get to a stage where it can be tested.
However, right now - it's a heavy WIP, and should not be used.
I have marked it as a draft PR.
It's worth noting that Nix is able to build this package on this PR natively,
so that is very cool.
Contributions welcome to my fork as PRs, which will then be pushed to this PR.
(Note: I will be rebasing and force-pushing. Let me know in advance before you
push to this branch if you're a maintainer, as your changes may be lost.)
Thank you!