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

Minor import fixes and README update #135

Merged
merged 6 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ venv
*~
cache
.buildozer
bin
bin
.idea/*
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,23 @@ GWeatherRouting is an opensource sailing route calculator written in python and:

## Installation

First, install the following dependencies using your OS package manager:
- osm-gps-map (version 1.2.0)
- eccodes
- python3
- python3-pip

Then checkout the repository and run:
```python setup.py install```

Start the software running:
```gweatherrouting```

1. Make sure to have Python >= 3.9 installed and the `pip` package manager.
2. Install the following dependencies using your OS package manager (e.g: debian=apt, macos=homebrew) Be aware that some packages have different names with different package managers.
- gobject-introspection
- gdal
- gtk+3
- libffi
- librsvg
- osm-gps-map
- py3cairo
- pygobject3
- pkg-config
- eccodes

Note: if you are using a `virtualenv` you need to make symbolic links from the UI libraries to your `venv` folder (this is not needed using system interpreter outside venv).```
3. install the required python modules with `pip install -r requirements.txt`
4. Then checkout the repository and run: ```python setup.py install```
5. Start the software running: ```gweatherrouting```

## License

Expand Down
4 changes: 2 additions & 2 deletions gweatherrouting/core/connectionmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import time
from threading import Thread

from . import NetworkDataSource, SerialDataSource
from .utils import EventDispatcher, Storage
from gweatherrouting.core import NetworkDataSource, SerialDataSource
from gweatherrouting.core.utils import EventDispatcher, Storage

logger = logging.getLogger("gweatherrouting")

Expand Down
10 changes: 5 additions & 5 deletions gweatherrouting/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import gpxpy
import weatherrouting

from . import GribManager, utils
from .connectionmanager import ConnectionManager
from .datasource import DataPacket
from .geo import POICollection, RoutingCollection, TrackCollection
from .utils import EventDispatcher
from gweatherrouting.core import GribManager, utils
from gweatherrouting.core.connectionmanager import ConnectionManager
from gweatherrouting.core.datasource import DataPacket
from gweatherrouting.core.geo import POICollection, RoutingCollection, TrackCollection
from gweatherrouting.core.utils import EventDispatcher

logger = logging.getLogger("gweatherrouting")

Expand Down
6 changes: 3 additions & 3 deletions gweatherrouting/core/geo/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import gpxpy

from ..utils import uniqueName
from ..storage import Storage
from .element import Element
from gweatherrouting.core.utils import uniqueName
from gweatherrouting.core.storage import Storage
from gweatherrouting.core.geo.element import Element

T = TypeVar("T", bound=Element)

Expand Down
4 changes: 2 additions & 2 deletions gweatherrouting/core/geo/elementmultipoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

For detail about GNU see <http://www.gnu.org/licenses/>.
"""
from .. import utils
from .element import Element
from gweatherrouting.core import utils
from gweatherrouting.core.geo.element import Element


class ElementMultiPoint(Element):
Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/geo/elementpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""
from typing import Tuple

from .element import Element
from gweatherrouting.core.geo.element import Element


class ElementPoint(Element):
Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/geo/poi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import gpxpy

from .elementpoint import ElementPoint
from gweatherrouting.core.geo.elementpoint import ElementPoint

# FURUNO PFEC NMEA https://www.manualsdir.com/manuals/100982/furuno-gp-1650.html?page=66

Expand Down
4 changes: 2 additions & 2 deletions gweatherrouting/core/geo/poicollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"""
from typing import Generic, Tuple, TypeVar

from . import POI
from .collection import Collection
from gweatherrouting.core.geo.poi import POI
from gweatherrouting.core.geo.collection import Collection

T = TypeVar("T", bound=POI)

Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/geo/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import gpxpy
from weatherrouting import IsoPoint

from . import Track
from gweatherrouting.core.geo.track import Track


class Routing(Track):
Expand Down
4 changes: 2 additions & 2 deletions gweatherrouting/core/geo/routingcollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"""
from typing import Generic, TypeVar

from . import Routing
from .collection import CollectionWithActiveElement
from gweatherrouting.core.geo.routing import Routing
from gweatherrouting.core.geo.collection import CollectionWithActiveElement

T = TypeVar("T", bound=Routing)

Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/geo/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""
import gpxpy

from .elementmultipoint import ElementMultiPoint
from gweatherrouting.core.geo.elementmultipoint import ElementMultiPoint


class Track(ElementMultiPoint):
Expand Down
4 changes: 2 additions & 2 deletions gweatherrouting/core/geo/trackcollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"""
from typing import Generic, TypeVar

from . import Track
from .collection import CollectionWithActiveElement
from gweatherrouting.core.geo.track import Track
from gweatherrouting.core.geo.collection import CollectionWithActiveElement

T = TypeVar("T", bound=Track)

Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/grib.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import weatherrouting

from . import utils
from gweatherrouting.core import utils

logger = logging.getLogger("gweatherrouting")

Expand Down
10 changes: 5 additions & 5 deletions gweatherrouting/core/gribmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import requests
import weatherrouting

from .grib import Grib
from gweatherrouting.core.grib import Grib

# try:
from .storage import GRIB_DIR, TEMP_DIR, Storage
try:
from gweatherrouting.core.storage import GRIB_DIR, TEMP_DIR, Storage

# except:
# from .utils.dummy_storage import Storage
except:
from gweatherrouting.core.utils.dummy_storage import Storage

# from bs4 import BeautifulSoup

Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/networkdatasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import logging
import socket

from . import DataSource
from gweatherrouting.core import DataSource

logger = logging.getLogger("gweatherrouting")

Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/serialdatasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import serial
from serial.tools import list_ports

from . import DataSource
from gweatherrouting.core import DataSource

logger = logging.getLogger("gweatherrouting")

Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import sys
from datetime import date, datetime

from .. import log # noqa: F401
from gweatherrouting import log # noqa: F401

logger = logging.getLogger("gweatherrouting")

Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/timecontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import datetime

from .utils import EventDispatcher
from gweatherrouting.core.utils import EventDispatcher


class TimeControl(EventDispatcher):
Expand Down
2 changes: 1 addition & 1 deletion gweatherrouting/core/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from typing import Dict, Callable

# try:
from .storage import * # noqa: F401, F403
from gweatherrouting.core.storage import * # noqa: F401, F403
# except:
# from .dummy_storage import * # noqa: F401, F403

Expand Down
9 changes: 6 additions & 3 deletions gweatherrouting/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"""
import logging

from . import log # noqa: F401
from .core import Core
from gweatherrouting import log # noqa: F401
from gweatherrouting.core import Core

logger = logging.getLogger("gweatherrouting")

Expand All @@ -33,11 +33,14 @@ def startUIGtk():
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk

from .gtk.mainwindow import MainWindow
from gweatherrouting.gtk.mainwindow import MainWindow

MainWindow(Core())
Gtk.main()


# if __name__ == "__main__":
# startUIKivy()

# if __name__ == "__main__":
# startUIGtk()
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ numpy
nmeatoolkit
matplotlib
weatherrouting
gdal==3.6.4
GDAL==3.6.4
Loading