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

Extend Makefile with installation and test targets #2303

Closed
MattHag opened this issue Feb 17, 2024 · 6 comments
Closed

Extend Makefile with installation and test targets #2303

MattHag opened this issue Feb 17, 2024 · 6 comments

Comments

@MattHag
Copy link
Contributor

MattHag commented Feb 17, 2024

Information

  • Solaar version: 1.1.11rc4

Is your feature request related to a problem? Please describe.
The Solaar installation with all its dependencies (pip, apt, udev etc.) is cumbersome. Although some setup steps for GItHub CI exists, they are not usable for local setup of Solaar.

Describe the solution you'd like
Move the setup commands into a Makefile and use the targets in GitHub workflow files. Thus, the commands are in a single place and also usable for local setups.

Additional context
This extends #2263

@MattHag MattHag changed the title Extend Makefile Extend Makefile with installation and test targets Feb 17, 2024
@pfps
Copy link
Collaborator

pfps commented Feb 17, 2024

Good idea. It might be reasonable to set up a bunch of small changes and have 1.1.12 come out only a few weeks after 1.1.11.

@MattHag
Copy link
Contributor Author

MattHag commented Feb 17, 2024

I think right after 1.1.11 there should be most of the refactoring, cleanup and modernization tickets tackled. After that new features can be added and tests can be written in parallel at any time.

@pfps
Copy link
Collaborator

pfps commented Feb 17, 2024

This sounds like a good plan. Tackle a bunch of small-to-medium tasks to clean up the code and set up better infrastructure. Then 1.1.12 can be pushed out.

@MattHag
Copy link
Contributor Author

MattHag commented Feb 17, 2024

In addition to that change, the setup instructions need to be revised, restructured and simplified.

  • The existing structure is hard to understand.
  • It is rather uncertain which setup steps are required for macOS, next to brew.
  • The optional and required steps are mixed in a huge paragraph.

As minor support for macOS was added and Windows might be supported as well, the setup instructions need to be split according to OS. They should be clear for an average user, who is able to find the shell and know their operating system. (optional) With a small troubleshooting section, this should also lead to fewer/shorter support request.

Install from source using Makefile

With this change, the installation for Ubuntu using the latest source code should reduce to the command
make install_ubuntu
in the Solaar root directory. It installs the apt and pip dependencies and installs the udev rule.

Developers run it with additional parameters to install test dependencies etc.
make install_ubuntu PIP_ARGS=."[test]"

MattHag added a commit to MattHag/Solaar that referenced this issue Feb 17, 2024
Refactor setup steps to unify commands between Linux and macOS.
Move bash commands into Makefile for consistency and enable local
execution of GitHub CI commands corresponding Makefile targets.

Fixes pwr-Solaar#2303
@pfps
Copy link
Collaborator

pfps commented Feb 17, 2024

Yes, more makefile entries would be useful.

@MattHag
Copy link
Contributor Author

MattHag commented Feb 17, 2024

I don't know other distributions like Fedora, but it should be easy for developers to extend that Makefile and make Solaar installation for development a no brainer.

In the end the Makefile could even be OS agnostic by detecting it with uname
https://stackoverflow.com/questions/714100/os-detecting-makefile

MattHag added a commit to MattHag/Solaar that referenced this issue Feb 17, 2024
Refactor setup steps to unify commands between Linux and macOS.
Move bash commands into Makefile for consistency and enable local
execution of GitHub CI commands corresponding Makefile targets.

Install on Ubuntu:
make install_ubuntu

Install on Ubuntu for development:
make install_ubuntu PIP_ARGS=."[test]"

Fixes pwr-Solaar#2303
MattHag added a commit to MattHag/Solaar that referenced this issue Feb 17, 2024
@pfps pfps closed this as completed in 9617cb8 Feb 18, 2024
pfps pushed a commit that referenced this issue Feb 18, 2024
* Show pytest coverage in GitHub CI tests

Related #1097

* Extend Makefile with installation and test targets

Refactor setup steps to unify commands between Linux and macOS.
Move bash commands into Makefile for consistency and enable local
execution of GitHub CI commands corresponding Makefile targets.

Install on Ubuntu:
make install_ubuntu

Install on Ubuntu for development:
make install_ubuntu PIP_ARGS=."[test]"

Fixes #2303

* Improve name of GitHub test actions

Related #2303

* Upgrade GitHub actions to Node.js 20

Replaces deprecated Node.js 16 actions.

Related #2256, #2284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants