grimoirelab-perceval
grimoirelab-perceval copied to clipboard
Add snap functionality
Added snap functionality for this package, published here: https://dashboard.snapcraft.io/dev/snaps/7712/
Snaps aim to have apps working in any Linux distribution, anywhere, from desktop devices to IoT. They are quick to install, safe to run and you can run updates immediately. Snaps are also self-contained as they are read-only images and they bundle everything it needs to run the app. There's also a possibility to run beta features with the channel and developer mode flags. These do not affect the rest of the system either. You can find everything about snaps in https://snapcraft.io/
Coverage remained the same at 95.778% when pulling c1de5034e1ec100043926ca214f4dc26b7e73f35 on gsilvapt:master into bad1dd13a2e901cb99b27fa57eb7c452730cd7d0 on grimoirelab:master.
Coverage remained the same at 95.778% when pulling ac8125c0bf551a7f8fcfa9e6814cda7ccd1066ed on gsilvapt:master into bad1dd13a2e901cb99b27fa57eb7c452730cd7d0 on grimoirelab:master.
Coverage remained the same at 95.778% when pulling 9bce53d8405b5cb6ee62de09c22ee2faa0430d47 on gsilvapt:master into bad1dd13a2e901cb99b27fa57eb7c452730cd7d0 on grimoirelab:master.
I'm not familiar with snaps, but by looking at the YAML file, it seems to me:
- It is using the old requirements.txt file. Now, dependencies are in
setup.py. Not sure how to get them from there... - In general, the
setup.pyfile has all the information to build the package, including thepercevalcommand. Wouldn't it better to use it for the snap? Or that is not possible?
I have used the Python plugin to snap this application. It is required to tell in the yaml where the requirements are as it is the most used method.
@elopio Is there a way to get the requirements from the setup.py into the yaml file?
PS: When I tested the final snap, it seemed to work fine.
Thanks for the answer. I guess maybe @sduenas is maintaining proper dependencies in requirements.txt. I would be more comfortable using dependencies in setup.py (and using it for installation, as well), since it is the one we maintain for pip packages, but I'm not sure that's possible.
If the dependencies are all in setup.py, you can just drop the requirements keyword from the yaml.
About the script declared in setup.py, you still have to declare it in the snapcraft.yaml because snaps require extra metadata that python doesn't have. In this case, plugs, which are the permissions that the snap require outside of its confined space. network means that it can make web requests.
Thanks! @gsilvapt would mind then producing a new version of the pr not using requirements, as suggested? In addition, how could I better test it in a Debian box?
Is it okay to show the previous commits? Some projects don't mind, others care... So I'm asking because I would need help taking care of the previous commis.
Regarding your question, I think this link might help you. That is from the official documentation and it is about how to build snaps on containers like LXD and Docker. Hope it helps!
@jgbarah you can also just go to https://build.snapcraft.io and enable the automatic continuous delivery from there. Every change on master will result in a new snap in the edge channel. The users will be able to find searching the store only snaps that are in the stable channel. So edge is perfect for experimenting, gathering feedback, checking if the snap will actually provide good value to your users.
I'd like to use perceval from snap. What is the progress on this?
Hi!
The snap was published here at the time: https://dashboard.snapcraft.io/snaps/perceval/.
I'm not sure if it works though, and it seems it doesn't. This PR was not accepted at the time and the snap funcionality is thus not available. Perhaps we can both work to put the snap back together a re-ping this PR? At the time, @elopio also made some suggestions to the yaml file I believe I didn't complete back then.
I don't mind helping with this PR. If you add me as collaborator I can at least address @elopio comments and push some releases for testing.
Whoa, whoa, I 'm not a collaborator of this project :P What you can do though is to fork the repository and create the snap. After committing && pushing that, you can submit a new PR to replace this one.
The comments of Leo I meant are in this thread (for guidance).
This PR is old and we aren't interested in support snap right now.