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

Finalize port to Python 3 / Gtk 3 #1022

Open
wants to merge 157 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
65ffca7
GitHub Actions: build and test on every push
gnarlyquack Oct 29, 2020
781a722
setup.py: Automatically find packages
gnarlyquack Oct 29, 2020
ed3f42a
Move tests out of the source directory
gnarlyquack Oct 29, 2020
ee87fc3
setup.py: Don't import ourselves
gnarlyquack Oct 30, 2020
4e6a5b7
Move gourmet source into a 'src' directory
gnarlyquack Oct 30, 2020
2d59622
setup.py: Use MANIFEST.in to specify package data
gnarlyquack Oct 30, 2020
022b041
Move requirements into setup.py
gnarlyquack Oct 30, 2020
889ecfd
Simpify installing a development environment
gnarlyquack Oct 30, 2020
56df257
Update contributing documentation
gnarlyquack Oct 31, 2020
fc82a00
GitHub Actions: don't build and test on every push
gnarlyquack Nov 1, 2020
9083d9b
Update contributing documentation
gnarlyquack Nov 1, 2020
9649677
development.in: use long option name
gnarlyquack Nov 1, 2020
052fa7a
Merge pull request #279 from gnarlyquack/reorganize
cydanil Nov 1, 2020
0a13665
Fix schema.org based importers
cydanil Nov 1, 2020
42912d9
Fix recipe removal and change of image
cydanil Nov 1, 2020
c0efbfd
Flake setup.py
cydanil Nov 1, 2020
57d5ddd
Prepare changes for upstream
cydanil Nov 2, 2020
3ab60a0
Clean readme
cydanil Nov 2, 2020
da5a792
Fix scrolled window in message dialog
cydanil Nov 2, 2020
41572a3
Clean imports
cydanil Nov 3, 2020
4b69155
Remove ipython shell plugin
cydanil Nov 3, 2020
86664b2
Make use of opus sound files
cydanil Nov 4, 2020
cac3252
Replace doc_base with resources
gnarlyquack Nov 2, 2020
7f26805
Replace icondir/icon_base with resources
gnarlyquack Nov 2, 2020
fe997b7
Remove obsolete html_plugin_dir
gnarlyquack Nov 2, 2020
499d18e
Replace style_dir with resources
gnarlyquack Nov 2, 2020
0c56611
Replace imagedir with resources
gnarlyquack Nov 2, 2020
01c48f2
Replace data_dir with resources
gnarlyquack Nov 3, 2020
ea68849
Replace uibase with resources
gnarlyquack Nov 4, 2020
79cee79
Remove obsolete plugin search paths
gnarlyquack Nov 4, 2020
005d4a8
Cleanup setting and use of gourmetdir
gnarlyquack Nov 4, 2020
c194e92
Remove lib_dir global variable
gnarlyquack Nov 4, 2020
0923959
Remove obsolete settings file
gnarlyquack Nov 4, 2020
e64112f
Use '.opus' as the audio file extension
gnarlyquack Nov 5, 2020
c884791
Merge pull request #281 from gnarlyquack/paths-to-resources
cydanil Nov 5, 2020
4365015
Fix imports
cydanil Nov 5, 2020
ee35a46
Fix timer formatting
cydanil Nov 5, 2020
c344bda
Fix timer input validation
cydanil Nov 5, 2020
76e7aab
Merge pull request #289 from cydanil/fix/285
cydanil Nov 5, 2020
c94fc42
Remove web plugin
gnarlyquack Nov 6, 2020
c05ef12
Handle unset rating in MCB imports
cydanil Nov 6, 2020
9470d40
Fix broken cycling imports in plugin_loader
cydanil Nov 6, 2020
43d823e
Update GLib.idle_add api call
cydanil Nov 6, 2020
bca9556
Fix import from files test suit
cydanil Nov 6, 2020
0fa8205
Merge pull request #292 from cydanil/fix/1014
cydanil Nov 6, 2020
7e33639
Fix the nutrition plugin
gnarlyquack Nov 6, 2020
570dc2a
Sort imports on PR Github Action
cydanil Nov 7, 2020
6228294
Fix sort imports on PR Github Action
cydanil Nov 7, 2020
484b7a6
Move isort test to test CI
cydanil Nov 7, 2020
eb8db0e
Correctly sort imports
cydanil Nov 7, 2020
9dde7b7
Move isort test to test CI
cydanil Nov 7, 2020
b4aeb2f
Restore interactive importer tests
cydanil Nov 9, 2020
e286deb
Fix html exporter
cydanil Nov 9, 2020
988cc47
Delete unused test data
cydanil Nov 9, 2020
33bcedf
Fix dialog extra formatting
cydanil Nov 9, 2020
6bb99a2
Fix image export in gourmet format
cydanil Nov 9, 2020
b510953
Fix export to gourmet format
cydanil Nov 9, 2020
00b8269
Source version info from src/gourmet/version.py
cydanil Nov 9, 2020
d691152
Update database version check
cydanil Nov 9, 2020
36fe98e
Merge Update version number to 1.0.0
cydanil Nov 9, 2020
ba4006c
Add Windows 10 installation instructions
cydanil Nov 9, 2020
d3bda0f
Fix rating to text in recipe browser
cydanil Nov 10, 2020
9adb5e7
Fix path generation in recipe browser
cydanil Nov 10, 2020
5329de6
Fix alphabetical ordering of recipes in browser
cydanil Nov 10, 2020
0caaf07
Fix KeyEditor plugin
cydanil Nov 10, 2020
a0b5197
Make RecData.format_amount_string_from_amount a staticmethod
cydanil Nov 12, 2020
1b50cce
Specify Pillow 7.0.0 or greater
cydanil Nov 16, 2020
6e8fed2
Re-add nutritionDruid.ui to POTFILES.in
gnarlyquack Nov 18, 2020
5d442e7
Split i18n into build and update commands
gnarlyquack Nov 18, 2020
20e66f0
Remove intltool cache files after build
gnarlyquack Nov 18, 2020
b7d8133
Automatically build i18n files
gnarlyquack Nov 18, 2020
00deef9
Reorganize l10n/i18n files
gnarlyquack Nov 18, 2020
d576378
Ensure sdists and wheels have correct package data
gnarlyquack Nov 18, 2020
482c1a1
Fix creating/updating PO templates
gnarlyquack Nov 18, 2020
cb7c1a1
setup.py: minor cleanup
gnarlyquack Nov 19, 2020
41f98d4
Update documentation
gnarlyquack Nov 20, 2020
a5310fe
Update build scripts
gnarlyquack Nov 20, 2020
6bcf33e
Remove gourmet.pot from .gitignore
gnarlyquack Nov 20, 2020
619adeb
version.py: Remove unused variable
gnarlyquack Nov 20, 2020
60e1ac8
Fix switching windows with the 'Go' menu
takluyver Nov 21, 2020
ed1013b
Merge pull request #322 from takluyver/fix-go-menu
cydanil Nov 21, 2020
fb2601e
Fix index error when updating ingredient key
cydanil Dec 22, 2020
b701f62
Update calls to Gtk API in KeyEditor plugins
cydanil Dec 23, 2020
1f35b7a
Remove dependency on argcomplete
cydanil Dec 23, 2020
d1a9f55
Clean dead code
cydanil Dec 23, 2020
e9b78c5
Return False instead of raising in getBoolean
cydanil Dec 26, 2020
9d5afb9
Pin SQLAlchemy version to 1.3.22
cydanil May 2, 2021
5d0c61b
Update Flatpak Gnome runtime to 40
cydanil May 2, 2021
1731c8e
Update Flatpak Gnome runtime to 40
cydanil May 2, 2021
b37f8f2
Update line slicing in MasterCook importer
cydanil May 2, 2021
3b75b23
Flake MasterCook file importer
cydanil May 2, 2021
b26cd8b
Remove broken MasterCook test
cydanil May 2, 2021
15abafa
Merge pull request #334 from cydanil/fix/328
cydanil May 2, 2021
f631002
Add annotations
cydanil May 2, 2021
7b556a8
Rebase from master
cydanil May 2, 2021
95907ab
Flatpak: Gnome runtime 40
cydanil May 2, 2021
57e97a5
Merge pull request #324 from cydanil/fix/315
cydanil May 3, 2021
79ccc02
Fix nutrition information exporter
cydanil May 6, 2021
0778bde
Pin dependencies versions
cydanil May 6, 2021
b6d9aea
Merge pull request #320 from gnarlyquack/i18n
cydanil May 6, 2021
e94f834
Update Gtk API calls retrieving chosen filetype in file export selector
cydanil May 10, 2021
f2177ea
Fix Preferences issues introduced when refactoring
cydanil May 10, 2021
ead0036
Fix nutritionGrabberGui
cydanil May 10, 2021
b411f9e
Merge branch 'master' into fix/nutritional_infos_export
cydanil May 10, 2021
37adfc1
Fix nutritional infos export
cydanil May 10, 2021
bbb67e2
Load plugins from namespaces
cydanil May 13, 2021
8d7e653
Add Copy recipe to context menu
cydanil Jun 12, 2021
8e70cf5
Update deprecated Gtk widgets
cydanil Jun 12, 2021
4fc0282
Add support for copying selected recipes to clipboard
cydanil Jun 13, 2021
6ac46c8
Add TODO to check for dead code
cydanil Jun 13, 2021
7ec3a62
Merge pull request #341 from cydanil/feat/plugin_namespace
cydanil Jun 13, 2021
8380567
Add ingredients to clipboard-exported recipes
cydanil Jun 15, 2021
cb604da
Add CI runner for creating AppImages (#343)
cydanil Jun 16, 2021
9fac119
Update INSTALL.md with rc2 infos
cydanil Jun 16, 2021
c8a509a
Prepare PR to upstream
cydanil Jun 16, 2021
98fae3c
Fix file chooser dialog on recipe export
cydanil Jun 24, 2021
fc8518f
Adapt FileSelectorDialog to work with images
cydanil Jun 24, 2021
3ecf55e
Remove unused is_extension_legal function
cydanil Jun 24, 2021
fcb65db
Adapt FileSelectorDialog to work with file imports
cydanil Jun 24, 2021
7fc6e59
Fix FileSelectorDialog behaviour (#347)
cydanil Jun 24, 2021
4f98bdf
Reinstate mastercook_plaintext_importer.Tester (#348)
cydanil Jun 24, 2021
f46b5c0
Add comments
cydanil Jun 26, 2021
dbb736b
Remove unused Gtk dialog code
cydanil Jun 26, 2021
baa1c05
Refactor mastercook text file check
cydanil Jun 26, 2021
6b5c119
Refactor mastercook text file check (#349)
cydanil Jun 26, 2021
01fc39d
Update recipe tree upon save
cydanil Jun 26, 2021
797cafa
Fix refreshing of recipe tree upon new recipe (#350)
cydanil Jun 26, 2021
f927789
Correctly handle cancel when prompted to save modified recipe before …
cydanil Jun 26, 2021
18d1363
Update reccard tests
cydanil Jun 26, 2021
f21b9a5
Fix saving modified recipe when prompted before export
cydanil Jun 26, 2021
dce85c8
Handle invalid image uri in web imports
cydanil Jun 26, 2021
e33dd20
Retrieve web recipe images in a cancellable background thread
cydanil Jun 27, 2021
40a888a
Make ImageBrowser scrollable
cydanil Jun 27, 2021
ab2c4cf
merge Improve ImageBrowserDialog (#352)
cydanil Jun 27, 2021
a66b89d
Fix plugin_loader refactor gone wrong (#353)
cydanil Jun 28, 2021
cc36d73
Add log message in pdf plugin when poppler not available (#354)
cydanil Jun 29, 2021
c4a20d5
Use OS locale (#345)
cydanil Jun 29, 2021
1c35745
Do small refactor in undo.py (#355)
cydanil Jun 30, 2021
9fe8d1d
Prepare release 1.0.0 (#356)
cydanil Jul 1, 2021
cda64c0
Prepare PR to upstream
cydanil Jul 1, 2021
38307bd
Remove deprecated argument from pdf recipe export (#360)
cydanil Jul 4, 2021
bc5b546
Do small ImageBox refactor
cydanil Jul 4, 2021
387d313
Create ImageBox thumbnail when initializing self.image
cydanil Jul 4, 2021
e8110e3
Create ImageBox.thumbnail when ImageBox.image is being set (#361)
cydanil Jul 4, 2021
b07509c
Fix pdf export when a locale is set
cydanil Jul 11, 2021
93bd237
Clarify variable names
cydanil Jul 11, 2021
8762b0c
Store PDF export settings in locale-agnostic format
cydanil Jul 12, 2021
a951f9c
Remove not needed self.prefs attribute of PdfPrefGetter
cydanil Jul 12, 2021
5b495b7
Remove PdfPrefGetter.make_reverse_dicts function
cydanil Jul 12, 2021
57c4e7b
Flake PdfPrefGetter attributes definitions
cydanil Jul 12, 2021
a1546f4
Add test for locale-agnostic PDF preferences
cydanil Jul 12, 2021
ca4ad62
Make PDF export preferences locale-agnostic (#363)
cydanil Jul 12, 2021
7e34b52
Hardcode maximum columns in PDF exports
cydanil Jul 12, 2021
778c4d7
Remove deprecated Gtk.ComboText.remove_text call
cydanil Jul 12, 2021
0133f98
Only apply scaling of attribute if attribute available for reportlab …
cydanil Jul 12, 2021
a617327
Only scale available reportlab attributes (#365)
cydanil Jul 12, 2021
6d7d585
Prepare PR to upstream
cydanil Jul 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 3 additions & 5 deletions .flatpak/io.github.thinkle.Gourmet.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app-id: io.github.thinkle.Gourmet
runtime: org.gnome.Platform
runtime-version: '3.36'
runtime-version: '40'
sdk: org.gnome.Sdk
command: gourmet

Expand Down Expand Up @@ -40,11 +40,9 @@ modules:
build-args:
- --share=network
build-commands:
- python3 -m pip install --upgrade pip
- python3 -m pip install --upgrade pip setuptools wheel
- pip3 install pyenchant pygobject Sphinx
- pip3 install -r requirements.txt
- python3 setup.py build_i18n
- python3 setup.py install --prefix=/app
- pip3 install --prefix=/app .[epub-export,mycookbook,pdf-export,spellcheck,web-import]
- install -Dm644 .flatpak/io.github.thinkle.Gourmet.desktop -t /app/share/applications/
- install -Dm644 .flatpak/io.github.thinkle.Gourmet.svg -t /app/share/icons/hicolor/scalable/apps/
sources:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Create AppImage

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
AppImage:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Setup AppImage Environment
run: |
sudo apt-get update -q
sudo apt-get -y install python3-testresources intltool imagemagick libgirepository1.0-dev
wget https://github.com/niess/python-appimage/releases/download/python3.8/python3.8.10-cp38-cp38-manylinux1_x86_64.AppImage
chmod +x ./python3.8.10-cp38-cp38-manylinux1_x86_64.AppImage
./python3.8.10-cp38-cp38-manylinux1_x86_64.AppImage --appimage-extract
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x appimagetool-*.AppImage

- name: Install Gourmet in AppImage
run: |
./squashfs-root/AppRun -m pip install --upgrade pip
./squashfs-root/AppRun -m pip install decorator six BeautifulSoup4 html5lib lxml pyenchant pygobject Sphinx

./squashfs-root/AppRun setup.py bdist_wheel
./squashfs-root/AppRun -m pip install .[epub-export,mycookbook,pdf-export,spellcheck,web-import]
./squashfs-root/AppRun -m pip install dist/gourmet*.whl
sed -i -e 's|/opt/python3.8/bin/python3.8|/usr/bin/gourmet|g' ./squashfs-root/AppRun
rm squashfs-root/*.desktop
cp .flatpak/io.github.thinkle.Gourmet.desktop squashfs-root/usr/share/applications/io.github.thinkle.Gourmet.desktop
cp .flatpak/io.github.thinkle.Gourmet.desktop squashfs-root/
convert .flatpak/io.github.thinkle.Gourmet.svg squashfs-root/usr/share/icons/hicolor/256x256/apps/io.github.thinkle.Gourmet.png
convert .flatpak/io.github.thinkle.Gourmet.svg squashfs-root/io.github.thinkle.Gourmet.png

- name: Pack AppImage
run: |
VERSION=${GITHUB_SHA::8} ./appimagetool-*.AppImage squashfs-root/

- name: Upload AppImage
uses: actions/upload-artifact@v2
with:
name: gourmet.AppImage
path: ./Gourmet-*.AppImage
29 changes: 6 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:
Expand All @@ -17,34 +18,16 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install Ubuntu dependencies
run: >
sudo apt-get update -q && sudo apt-get install
--no-install-recommends -y xvfb python3-dev python3-gi
python3-gi-cairo gir1.2-gtk-3.0 libgirepository1.0-dev libcairo2-dev
intltool enchant python3-enchant python3-gst-1.0

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install --upgrade keyrings.alt
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi

- name: Create Internationalization
- name: Setup build environment
run: |
python3 setup.py build_i18n
find . | grep gourmet-plugin

- name: Install
run: |
pip3 install .
sudo apt-get update -q
sudo apt-get install python3-testresources intltool
sudo pip3 install --upgrade pip setuptools wheel

- name: Create wheel and source distributions
run: |
python3 setup.py sdist
python3 setup.py sdist bdist_wheel
mv dist/gourmet-*.tar.gz dist/gourmet-${GITHUB_SHA::8}.tar.gz

python3 setup.py bdist_wheel
mv dist/gourmet-*-py3-none-any.whl dist/gourmet-${GITHUB_SHA::8}-py3-none-any.whl

- name: Upload artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Flatpak
run: |
flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.gnome.Platform//3.36 org.gnome.Sdk//3.36 -y
flatpak install flathub org.gnome.Platform//40 org.gnome.Sdk//40 -y

- name: Build Flatpak
run: |
Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
test:
Expand All @@ -23,25 +24,22 @@ jobs:
run: >
sudo apt-get update -q && sudo apt-get install
--no-install-recommends -y xvfb python3-dev python3-gi
python3-gi-cairo gir1.2-gtk-3.0 libgirepository1.0-dev
gir1.2-poppler-0.18 libcairo2-dev enchant python3-enchant intltool
python3-gst-1.0
python3-gi-cairo gir1.2-gtk-3.0 libgirepository1.0-dev libcairo2-dev
intltool enchant python3-enchant gir1.2-poppler-0.18 python3-gst-1.0
python3-testresources

- name: Install dependencies
- name: Install build dependencies
run: |
sudo python3 -m pip install --upgrade pip
if [ -f development.txt ]; then sudo pip3 install -r development.txt; fi
sudo pip3 install --upgrade keyrings.alt
if [ -f requirements.txt ]; then sudo pip3 install -r requirements.txt; fi
sudo pip3 install --upgrade pip setuptools wheel

- name: Prepare plugins
run: |
python3 setup.py build_i18n
pip install .
- name: Install Gourmet
run: sudo pip3 install -r development.in

- name: Test with pytest
run: xvfb-run -a pytest -vv gourmet/tests/test_*
run: LANGUAGE=de_DE.utf-8 xvfb-run -a pytest -vv tests/test_*

# - name: Test with mypy
# run: mypy gourmet/
# if: always()
- name: Check imports ordering
run: >
isort --diff src/**/*.py &&
isort -c src/**/*.py
if: always()
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ __pycache__/
# Distribution / packaging
*.egg-info/
*.gourmet-plugin
*.mo
/build/
/dist/
gourmet.pot
gourmet.appdata.xml
gourmet.desktop
po/.intltool-merge-cache
/development.txt


# Virtual environments
/env/


# Editors
*.swp
.idea/
122 changes: 83 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,98 @@
# Getting Started
Install Gourmet's dependencies:

pip3 install -r requirements.txt
pip3 install -r development.txt

`requirements.txt` contains the dependencies needed for Gourmet itself,
`development.txt` contains the packages required for testing.

Before you start development, you should first build localized *.mo and
*.gourmet-plugin files within a build/ subdirectory of the source tree by
running

python3 setup.py build_i18n

You can then install Gourmet in edit mode so:
# Contributing

pip3 install --user -e .
Thank you for taking an interest in contributing to Gourmet! We appreciate that
you're thinking about offering your time to improving the project, and it's our
goal to respect your contribution accordingly.

By doing so, you will be able to test your changes when launching Gourmet.
Although this document focuses on code contributions, you can contribute in
several ways:
- File a bug report.
- Add or improve documentation.
- Promote the project to others.

# Style
New code follows the [PEP 8](http://www.python.org/dev/peps/pep-0008/) standard.

The following conventions are not strictly followed in Gourmet, old code
should be reformatted only when modifying it.
## Contributing Code

# Getting the Source
Gourmet's source code is hosted on [GitHub](https://github.com/thinkle/gourmet).
You can clone it by opening a command prompt and typing:
In general, the process for contributing code is:

git clone https://github.com/thinkle/gourmet.git
1. Pick or open an [issue](https://github.com/thinkle/gourmet/issues) to work
on
2. Post a comment expressing your intent to make sure nobody else is already
working on it
3. Set up a development environment, as described below
4. Hack the code, and when ready
5. Push your changes to your forked repo and create a pull request.

If you don't have any previous experience with Git, you might want to take a
look at the [official Git tutorial](http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html),
or the [GitHub Help pages](http://help.github.com/).
Make sure to also check out our upcoming [milestones](https://github.com/thinkle/gourmet/milestones).

# Contributing
## Development
If you'd like to contribute,

1. [fork](https://github.com/thinkle/gourmet/fork) and clone the repository
2. pick an [issue](https://github.com/thinkle/gourmet/issues) to work on
3. post a little comment expressing your intent to make sure nobody else is
already working on it
4. hack the code, and when ready
5. push to your forked repo, and create a pull request.
## Setting Up a Development Environment

You'll want to clone Gourmet to your computer and probably
[fork](https://github.com/thinkle/gourmet/fork) it as well.

Ensure your system has the necessary prerequisites installed:
- [Python](https://www.python.org/), which is what Gourmet is written in.
- [PyGObject](https://pygobject.readthedocs.io/en/latest/) for GTK+ 3 and
other GNOME libraries. You may either install your system's `pygobject`
package(s) or install the necessary system requirements to install
`pygobject` from PyPI with `pip`. The latter method is recommended if you
plan on doing development within a Python virtual environment.
- [intltool](https://freedesktop.org/wiki/Software/intltool/) for
internationalization.
- (optional) [Enchant](https://abiword.github.io/enchant/) for spell-checking.
At least one of the backends must be installed as well.
- (optional) [GStreamer](https://gstreamer.freedesktop.org/) for sound. The
GStreamer library itself and gst-plugins-base are required. Python bindings
are provided through PyGObject, so GObject introspection data is also needed.
- (optional) [poppler](https://poppler.freedesktop.org/) for exporting PDFs.
Python bindings are provided through PyGObject, so install the GLIB bindings
and associated GObject introspection data.

**Note:** Although some prerequisites are optional, the development install of
Gourmet enables all plugins and features, so you probably want to install all
prerequisites to avoid any issues.

You may want to setup a [Python virtual
environment](https://docs.python.org/3/library/venv.html). This is optional but
highly recommended:
```bash
$ python -m venv --prompt gourmet env
$ source env/bin/activate
(gourmet) $ pip install -U pip setuptools wheel
```

Then install Gourmet itself:
```bash
(gourmet) $ pip install -r development.in
```
This installs the remaining Python dependencies and Gourmet itself in editable
mode, which allows you to run Gourmet and see your changes without having to
reinstall it.

**Note:** If you encounter an error during the installation of
`pygtkspellcheck`, first install `pyenchant` and `pygobject` on their own:
```bash
(gourmet) $ pip install pyenchant pygobject
(gourmet) $ pip install -r development.in
```

You should now be able to launch and run Gourmet:
```bash
(gourmet) $ gourmet
```


## Style

Gourmet is an old code base, consequently its style is not always consistent or
conformant to contemporary tastes. We are not interested in bikeshedding, but
please follow [PEP 8](http://www.python.org/dev/peps/pep-0008/) when writing new
code, and when working on old code, please tidy up as you go.

Make sure to also check out our upcoming [milestones](https://github.com/thinkle/gourmet/milestones).

## Issues and Suggestions

We welcome feedback and issue reporting. You can do so by browsing existing
issues and commenting on them, or creating a new one.

Expand Down
Loading