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

Call for more Gourmet developers and maintainers #897

Open
1 of 2 tasks
holocronweaver opened this issue Feb 4, 2018 · 37 comments
Open
1 of 2 tasks

Call for more Gourmet developers and maintainers #897

holocronweaver opened this issue Feb 4, 2018 · 37 comments

Comments

@holocronweaver
Copy link
Contributor

holocronweaver commented Feb 4, 2018

It is clear the gourmet repo has fallen into disrepair.

HEAD of master has been broken for over almost two years with no commits since, pull requests and solved issues are not being merged, even simple bug fixes are not being implemented. The code is in need of quite a few updates to catch up to its dependency libraries. Not to mention the looming Python 2 discontinuation issue.

Suffice to say the project needs a few active maintainers who can handle pull requests so that bug fixes and new features steadily merge in and the project gets up off the ground again.

The path forward seems clear:

  • Find a few people willing to actively address issues and manage pull requests, then give them merge permission.
  • Get master back in working condition. Consider moving the incomplete work since 0.17.4 to a working branch and reverting those commits on master. (Thanks @thinkle for fixing this!)

Once those two are satisfied, the project can resume.

So this is a general call for developers who want to help Gourmet get back on its feet.

If we have a few active maintainers and regular-ish contributors it should distribute the workload enough so that one or two people leaving at a time won't grind the project to a halt, and even if the lead maintainer takes a break the project will carry on in their absence.

If you enjoy Gourmet like I do, please help keep it alive and growing!

@holocronweaver
Copy link
Contributor Author

holocronweaver commented Feb 4, 2018

I can help get master in good condition. I am also willing to help resolve issues and handle pull requests. Definitely don't have enough time to do it all on my own, but with a few other active maintainers we should be able to make it work.

@thinkle
Copy link
Owner

thinkle commented Feb 4, 2018

fwiw, I've been using gourmet on a regular basis throughout this time, but haven't been pushing changes to the repo. I just pushed a bunch of fixes.

I've had in my mind a major gourmet development push for some time, but I think a big push would involve abandoning the platform entirely and building out a web-based gourmet that could be easily accessed from mobile, etc. -- the universe has changed a lot since I started this project, which was before the iPhone existed, etc. :)

In the mean time, I'm happy to keep pushing fixes as I see them and I'll certainly look at pull requests. That said, I'm more tempted to start a fresh project (webgourmet?) to move this thing to a modern web-friendly/mobile-friendly architecture than I am to go through everything and convert to python 3 and the new gtk bindings.

@holocronweaver
Copy link
Contributor Author

Holy cow! I did not expect such an immediate deluge of commits. I encountered a few bugs in initial testing, will create issues. But this is great, master runs for me again!

If you could use help maintaining the project, don't hesitate to reach out to us. Maybe tag issues that are up for grabs. At the very least I'll bugfix + pull request as I go and tackle a few issues a month.

Making Gourmet mobile-friendly would be a dream come true and is the main thing I wanted to contribute to the project. Currently I export MCB files to NextCloud, then import into My CookBook Pro on my phone. This works well for me, though it requires a couple manual steps. A more tightly integrated approach would be awesome.

I strongly prefer native apps both on desktop and mobile for performance, looks and usability, but I see no reason Gourmet couldn't switch to a client-server architecture to let people develop whatever clients they desire and pick the server host that works best for them (or host it themselves!). This would also allow users to continue the traditional Gourmet experience via client+server on a single host if they want, making the transition more seamless.

Top of my wishlist:

  • mobile app (perhaps Kivy for multi-platform support?)
  • more robust and automated nutrition analysis (similar to cronometer.com or nutritiondata.self.com)
  • recipe web page scraping

I'll open a new topic to gather ideas and a project timeline for Gourmet 2: Rise of the Mobile Devices.

@holocronweaver holocronweaver changed the title Call for developers who want Gourmet back on its feet Call for more Gourmet developers and maintainers Feb 5, 2018
@rhs-github
Copy link

Posted this about a month ago. Nothing has happened with that to this point. Its a patch already! Also I have autopep8'ed every module in existing code, removed all white space, indentation errors, stale code I could for the last month. I have an entire list of stuff to work on, i.e. non functional methods. I got the existing scrape to work, it was missing a critical "import". I totally agree with updating the nutrition data base. What is it exactly that I need to do?
rs

@holocronweaver
Copy link
Contributor Author

Hi @rhs-github. I am not sure what your question is. Are you asking how to submit a pull request?

@rhs-github
Copy link

Sorry, was pushed for time. I'm just contemplating several things namely:

  • to proceed it would be good to have a plan(s).
  • this means a review of what has been, and, what needs to be.
  • then attainable goals can be set.
    This kind of thing makes everyone generally happy cause they then know what the heck is going on before even attempting anything. Its a kinda unification if you will.

Having said that here is what my own crystal ball would like to predict:
-try to remain as code agnostic as possible. Removing dependencies on other distros/public repositories would be a priority. Python has plenty of mutable objects to play with. I realize that this is not possible with all things, but in' order to proceed this has to be on the table.
-gourmet at present is a gnu/gnome/qt project using python as the glue. Please let me know how you feel about this. I am no python expert but I like the ease of formatting and a relaxed form of syntax. Python also seems to like trying methods first (without a lot of checking) and then either failing silently or allowing a capture and redirect. That's my 2 cents on python. The really nice thing about python applications (and I consider this to be HUGE) is the speed at which they 'MAKE' and install.
-switch to python3 should be a goal as well. 2 is gone in 2020.
-ideally there should be a collaborative effort at the minimum involving Linux, Windows, FreeBSD developer(s). The more the more successful the new branch will be.
-there seems to be a call for a mobile application. In my mind this is an entirely separate branch, even application. Gourmet is a huge application and getting it mobile is not one of my goals. Sorry.

Take me to your leader!
Rick

@thinkle
Copy link
Owner

thinkle commented Feb 21, 2018 via email

@FriedrichFroebel
Copy link
Contributor

I would be interested in supporting the application to be ported to Python3 and the current GTK3 bindings. Do you still want to maintain compatibility to the old Python2 or would you like to aim a complete Python3 port?

While having a first look at the code, there are some other things I am not sure at first sight (only by looking at the setup and the module init file):

  • What coding standard is used? The contribution guide does not say anything about it and I get a huge amount of PEP 8 warnings when just opening the setup file.
  • It seems like simple imports like import version instead of from gourmet import version are used. This should be fine if I set the root to the gourmet module itself, but shouldn't it be better to use the second version?

Additionally, the psyco module is deprecated, see http://psyco.sourceforge.net/, so we should probably have a look at alternative JIT compilers (or drop this feature completely).

@thinkle
Copy link
Owner

thinkle commented Feb 22, 2018 via email

@dyoung418
Copy link
Collaborator

I'm happy to collaborate on some of these efforts. My time availability is limited, but will do what I can. Things like refactoring for pep8 or Python3 are efforts I can contribute to -- taking time to rethink a module is probably not something I have time for.

@rhs-github
Copy link

Reply to @thinkle .
I'm not sure I follow. Do you mean language agnostic?
Bad choice of words. I really mean to address things things like "pyglet" which imho describes itself perfectly. I walked the ladder back to the ancient 'dll' that is called to I guess eek out a 10 second sound on windows. It is not even in the FreeBSD distro cause it fails miserably. Mostly I'm talking about dependencies. Most people probably do not know that they can start multiple instances of the timer and use different sounds for each. Not all mind you but I bet most. The only thing more dated than gourmet is definitely pyglet.
There's no QT in this project. It is definitely a gtk project.
Glad you asked>>>Follow this path:
/usr/local/lib/python2.7/site-packages/gourmet/plugins/duplicate_finder/recipeMerger.ui
File 'recipieMerger.ui' in my project tree has a really nice QT icon pasted on it??? Is this my bad association? My box # freebsd-version -ku
11.1-RELEASE-p4
11.1-RELEASE-p6.
It's way down at the bottom of the gourmet ladder and I'm not even half way there yet.
Not sure what you imagine. Generally there are some packagers needed on different distros and OSs, but that's it.
The pyglet thing is the best example at this point. Since you know that I use FreeBSD and can get any file to play using 'aucat' a 40k completley native (part of base) executable. Most bsd users know this and it's common knowledge. It's directly callable using python. That's my point. Or if you want to expand your horizons and gtk3 bindings are a pain maybe that needs to go as well. Just a thought.
Take a look at my draft roadmap - it's more about moving to the cloud than just supporting mobile.
Link please.
You are the leader! Sorry.
I'm really busy at the moment, house, taxes, family, cooking, you know the story. I can't wait to get started. Updating, merging, and managing a repository is not my thing. If you want code or debug, I can go there.

@thinkle
Copy link
Owner

thinkle commented Feb 23, 2018 via email

@allenerenee
Copy link

allenerenee commented Feb 24, 2018 via email

@MarkP2015
Copy link

MarkP2015 commented Feb 24, 2018 via email

@micahcochran
Copy link

@thinkle Once you have laid all of this out, I think that you are on exactly the right path. I believe in your vision. Perhaps the only thing is that you are trying to make an application that uses HTML and a browser, but not trying to go to the extent of making a publicly available website (with all the security and scale required for that). This would be software that will run on your machine and if you poke a hole in your firewall, it will work on your home network.

I don't see that there is whole lot of difference between a desktop version and a browser version. If a browser works on your machine, python, and whatever extension are need, then it will work. Heck, you could even install an Gourmet icon that launches the python end and your web browser.

@holocronweaver
Copy link
Contributor Author

We can have both web apps and native apps!

They can all be different apps that communicate with the same underlying server backend. That is the beauty of the client-server model. One service, many app choices.

Everyone gets what they want, everyone wins. 😄

More on client-server models for the curious

Music and video streaming, cloud storage, torrent clients, e-mail clients, social media clients, etc. all use client-server models. Most people would use native apps for those on their mobile device (not a web app!), while they may choose either a web app or native app on their desktop depending on personal preference and options available.

This is especially beneficial for open source because it lets the core developers focus on the server backend and maybe one or two flagship clients (maybe a web and/or desktop app?), while other developers are free to create whatever clients they want to fill in gaps (Android and iOS apps, desktop apps, VR apps, whatever!). It also means new features can be implemented in the server and all clients benefit. Further, it opens up possibilities like one client being able to connect to many services (e.g., Twidere), or a client adding additional features the server doesn't have (e.g., torrent search in torrent clients, perhaps recipe search in Gourmet's case).

There are some difficulties with an open client-server model, namely the server API must be carefully defined, clients need updating to make use of new server features, developers are needed to maintain all the clients, and sometimes clients outgrow their service and give birth to a fork or entirely new service, but I know of no better option at present. The dream of a single UI to rule them all has not yet come to pass, and I don't suspect it will for at least another decade.

@thinkle
Copy link
Owner

thinkle commented Feb 25, 2018 via email

@FriedrichFroebel
Copy link
Contributor

Looks like I never wrote this up. I don't think I have a problem with anything in Pep8, so we can move toward that standard. If I recall correctly, I wasn't consistent with camelCaps vs. underscore_names. I'm guessing moving to python3 and gtk3 will involve a lot of massive grepping/find-replace, etc. through the entirety of the codebase. If you're taking that on already, it wouldn't be a bad time to also make sure that function names are all done with underscores and attributes are all camelCase.

Seems like there is another coding guide besides the contribution guide I did not see the link for. The coding guide recommends PEP8.

(is there a reason to prefer one of the above?)

I think it is much cleaner and easier to understand where this import is coming from when using this way.

@FriedrichFroebel
Copy link
Contributor

FriedrichFroebel commented Mar 4, 2018

I just took some time starting to port the application to Python3 and GTK3. With the short look at the code before, it seemed like this just would be a task involving some time. Now, after having ported some files, I am not really sure whether the amount of time to spend for porting or the amount of time to spend for rewriting the application from scratch (based on the existing ideas) would be shorter.

The reason for this is simple: The current code base seems to have grown historically, but - without having looked at the commit history - did not receive any real refactoring. Some of the bigger changes - like the ones tagged with gsoc-idea - do not seem to have received a lot of attention (I know that this is an FOSS project and nobody is forced to spend their free time on it). Refactoring may be blocked by the fact that there are no real automated tests (only a document describing the testing procedure done with the GUI) - inside the source itself there are some (commented) print statements probably used for debugging (besides the normal debugging mechanism), some main entry points for manual tests of individual modules and a database stress tester, but this is not automated, too.
To satisfy the requirements of PEP8, we have to touch around half of the code (check done using pycodestyle and cloc). (I am not really a fan of automating this to be able to check everything is still working.) For people which may be not familiar with the code (including me), some documentation may be missing at the moment making it hard to understand and to start with contributing.

Regarding Gourmet 2.0: I am no fan of the client server architecture in this case. While it may be usable for technically adept persons, I do not think the normal users of Gourmet will really need this. PHPRecipeBook already offers some (basic) web frontend for recipe management (although I have not tried it). For this reason a real desktop application like the current one is the best thing in my opinion.
In the other issue related to the future of Gourmet, there had already been a proposal of using a normal file sync service to be able to use the local database inside a smartphone application. An alternative would be to create a (pluggable) server backend to use with Gourmet, but using the local SQLite3 database by default (if I remember correctly, there had been a similar proposal in one of the issues). This way there could be native applications as well as applications build upon an API.

@holocronweaver
Copy link
Contributor Author

@FriedrichFroebel Many desktop apps use client server arch, including games, and you never realize it! That is because a single app can launch both the server and client, hiding all the details from the user. You can even do it all in one process, launching the server and client as separate threads. I mentioned this in the previous thread, as well as why a cloud storage sync solution wouldn't work well on mobile.

@MarkP2015
Copy link

MarkP2015 commented Mar 4, 2018 via email

@FriedrichFroebel
Copy link
Contributor

FriedrichFroebel commented Mar 4, 2018

@holocronweaver I am aware of this. I did not want to start an in-depth discussion whether client server or native applications are better - instead I only wanted to point out that a normal user probably does not need a CS architecture. Maybe this is partially caused by the fact that I am not a fan of the mass of new web frameworks and prefer native local applications, but this is something different.

@holocronweaver
Copy link
Contributor Author

holocronweaver commented Mar 4, 2018

@FriedrichFroebel Client-server is a program design paradigm. It can be used in native apps, web apps, or any sort of program. So it is not native app vs. client-server, that is an apples-oranges comparison. Client-server models can (and should) be able to work completely locally on a lone desktop app, even in the absence of any network access. In other words, users currently using Gourmet 2 locally on desktop would not see any difference from Gourmet 1. It would work like Notepad or any other vanilla desktop app. No special configuration needed, and no network access required.

Edit: I think the confusion stems from people associating 'server' with things like Apache HTTP servers and related stacks, which require lots of configuration to set up. That is only one kind of server though, and not the one I have in mind for Gourmet. Instead native apps should internally embed a server, something the user never needs to know about, and which can be used to do everything locally without a network connection.

@holocronweaver
Copy link
Contributor Author

@thinkle Exciting to hear development on the new project!

I have a few questions:

  1. How would setting up CouchDB for a local-only desktop app work? This should require no user expertise, the app just magically acts like any other desktop app.
  2. If the only server will be a database, that means a common library should be written which front ends can reuse for performing tasks like calculating nutrition information of a recipe from its ingredients, unit conversions, etc. Otherwise every frontend will essentially be a completely independent application, with the only unifying feature being the DB schema. It sort of sounds like you intend mobx to be used as an API library for frontends, but wouldn't that limit all front ends to JS? Or else we would indeed end up in a world with every frontend writes everything from scratch?
  3. In NoSQL, how would we relate recipes to ingredients to nutrition information? That sounds like a relational database to me, but I have only used NoSQL lightly.
  4. It seems like addons would either be frontend specific or have no place in G2. Thoughts on this?

I strongly prefer a solution which is client language agnostic so as not to limit what apps can be written, but also doesn't lead to every client writing their own program from scratch. My ideal solution would involve a shared library and/or server API, possibly splitting the server into remote and local components in order to do as much work as possible on the client. The crumple in this dream is that I know of no way to create a shared client-side library / server that is usable both in native and web apps. Maybe you have some ideas here? Nim looks like it might be able to achieve this, but are there more time tested solutions? I am surprised this is still an issue in 2018...

@holocronweaver
Copy link
Contributor Author

I am not sure how feasible it is in practice, but there are a few projects which allow running Python in browser frontend. There seem to be two classes of these: one is Python-to-JS transpilers, like Transcrypt, and the other is full-on Python interpreters written in JS, like brython. I would imagine the transpiler would be far more performant. While these aren't ideal solutions, they might help solve the problem of a shared client-side library that can be used both by web and native clients.

@thinkle
Copy link
Owner

thinkle commented Mar 6, 2018 via email

@freeagent1384
Copy link

Only because I was trying some new recipes which didn't import did I check out the page and see the call for programmers. I'm not well accomplished but would like to help as much as I can. That being said, looking through the comments here it sounds like you're looking to move away from Python and into more Java/JS and I have very little experience with those languages. If you decide to stick with Python please let me know, I would love to help.

That being said if I may offer my two cents on the server-client preference. I run Gourmet on all my machines, both Linux and Windows and I just sync my database with a symlink to an encrypted file in my DropBox folder. I would love to see the ability to have this file syncing built in to the app but really not a big deal. The idea however of putting my recipes anywhere other than storage of my own control is exactly why I chose Gourmet to begin with. As long as the Server portion can be run locally on my own machine, even if it were in a Docker container I find much more appealing.

I wish I had more to offer if you decide to traverse the path of webapp, it's probably something I should be learning anyhow but if you decide to stick with Python please, hit me up.

@benjaminogles
Copy link

Out of my own need and boredom I hacked on my own recipe manager for a little while before coming across Gourmet. After seeing this project I think I like the idea of contributing here better than doing everything myself.

You can checkout what I have built at https://pantrybudget.com
It is a lot like Gourmet. Import recipes from other sites, make grocery lists etc. I also have a menu planning feature and the ability to save price data for common ingredients.

I had a lot of ideas I wanted to get implemented but like I said, I think it would be better to collaborate on a project like this to get things done faster.

I built mine with React and Relay and a Graphcool backend. I'm no stranger to python either so I will be checking in to see where I can help out with the new Gourmet. Let me know if you have questions about picking a web framework since I have worked with a few. I must say that I am partial to desktop clients though :)

@shahafalo
Copy link

I would like to help to develop in python 2 for thus project :)

@jcrben
Copy link

jcrben commented May 31, 2018

@benjaminogles as you might have noticed above @thinkle would prefer something with web technology (as would I) - any interest in open-sourcing your project? that's something I might be willing to pitch in and help with

the other two open-source recipe apps I encountered:

@saxon-s
Copy link
Collaborator

saxon-s commented Jul 2, 2018

I'm jumping into this thread late ...

@holocronweaver thank you for taking the lead in calling for more Gourmet developers and maintainers. It is appreciated. Like you I enjoy using Gourmet and would love to see it get the proper attention to help keep it alive and relevant.

Your request has sparked off a good debate. There appears to be 2 camps -- those who want to maintain a stand alone app and those who want to develop a new web application.

Let me say upfront that I'm in favour of maintaining the existing stand alone GTK Gourmet application until such time there is a stable replacement and and compelling reason to switch.

<flame_proof_suit_on>

Yes it is exciting to start something new, but be fully aware of what you are getting into ... take a read of the article "How it feels to learn JavaScript in 2016": https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f
Even though the article was written 2 years ago and written tongue-in-cheek, it is still relevant and has a thread of truth to it.
There are a forever changing sea of new JS web technologies ... coffee script, typescript, Vue, Backbone, React, Angular, Ember - all of which have their own cult followers and popularity trends which tend to come and go just as quick.
Then there are browser compatibility issues ... chrome/chromium, IE, Edge, Firefox, safari and mobile iOS and Android platforms - each performing and displaying content slightly differently.
Let's not forget about maintenance ... If it was difficult maintaining a stand alone GTK application with the existing Gourmet community - web technology is not going to make it any easier (in fact it will be the opposite. For one, a proper automated test suite is an absolute must).

I'm not trying to resist the development of a new web application or dampen the enthusiasm but rather give a dose of reality in what it takes to develop and maintain a web application. The question to ask is ... do we have the skills and commitment in the Gourmet community to fully support a web based app? If yes, then go for it!

</flame_proof_suit_on>

Gourmet Maintenance
I'm willing to help maintain the existing Gourmet application. Over the weekend I submitted a new pull request #910 to fix the ./bin/gourmet launch issue and broken plugin and doc_dir paths. I updated issue #867 with details of the fixes I submitted.

There are a couple of areas that need to be tackeled:

  • Code cleanup and refactoring (there is also quite a bit of "experimental" code and plugins committed to the Head which should be removed)
  • Update/replace obsolete packages
  • Use SQLAlchemy ORM (Use SQLAlchemy ORM #712)
  • Migrate code to Python3/GTK3

SQLAlchemy ORM and Python3/GTK are XL developments needs to done on separate branches.

PEP8 Support
@rhs-github @dyoung418 @FriedrichFroebel
While I agree that we should be adhering to PEP8 I'm not in favour of doing a pep8 storming of the entire project as it has a couple negative side effects:

  • Produces lots of merge-conflicts
  • Breaks git blame
  • Makes code reviews difficult

Instead, only new or modified code should be updated to pep8. pep8radius (https://pypi.org/project/pep8radius/) is a utility which updates only those lines which you have been working on since the last commit/branch to comply to pep8. Only once the Gourmet code base has been stabilized, updated, tagged and released should pep8 storming of the entire project be considered.

Andy Hayden, the author of pep8radius summarizes it's usage as - Basically leaving the project a little better than you found it.

Installation:
pip install pep8radius

Usage:
Suppose you've done your work off of master and are ready to commit:

# be somewhere in your project directory
# see the diff with pep, see the changes you've made since master
pep8radius master --diff
# make those changes
pep8radius master --diff --in-place

Or to clean the new lines you've commited since the last commit:

pep8radius --diff
pep8radius --diff --in-place
# the lines which changed since a specific commit `git diff 98f51f`
pep8radius 98f51f --diff

Next Steps
The next steps depend on if we get sufficient support from our Gourmet development community and repo admin support. Without either of them this initiative is a no go.

@davpaez
Copy link

davpaez commented Aug 1, 2018

Hi everyone. I completely agree with @saxon-s . I'm excited by the new client-server idea, but I think Gourmet 1 should not be abandoned.

Please let me know if I can help with the current version of gourmet. I'm a beginner python developer but I've already build a couple of gui apps in python using pyqt. I think I may be able to contribute.

@maphew
Copy link

maphew commented Oct 26, 2019

A couple projects that might be useful:

pyodide - a mozilla project to bring a full python science stack to the browser, opening a path that doesn't entail a total rewrite.

flexx - a toolkit for creating GUIs using web technology for rendering. Apps are pure Python; The PScript transpiler generates the necessary JavaScript on the fly. Create cross platform desktop applications, web applications, and exported apps as standalone HTML documents.

@chiffa
Copy link

chiffa commented May 31, 2020

Hey @saxon-s - looks like you are by now the only maintainer.

Given that I like and use Gourmet myself and have seen a couple of issues with it, I would be glad to jump on the train of making it work better.

Given the size of the project, however, I would need a rapid walk-through the code.

Do you have any channel developers here use (Discord, Slack, IRC channel?)

@thinkle
Copy link
Owner

thinkle commented May 31, 2020 via email

@chiffa
Copy link

chiffa commented May 31, 2020

@thinkle - thanks for the heads-up.

Does it mean that the current Python-based version is planned to be phased out at some point?

@thinkle
Copy link
Owner

thinkle commented May 31, 2020 via email

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

No branches or pull requests