Skip to content

Commit

Permalink
Merge pull request #2 from dbradley771/main
Browse files Browse the repository at this point in the history
Convert application to a package
  • Loading branch information
uoodsq authored Feb 1, 2024
2 parents 9074af5 + 8bc1704 commit 0f88b43
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM python:3.11

COPY requirements.txt requirements.txt

RUN pip install -r requirements.txt

COPY pyproject.toml pyproject.toml
COPY README.md README.md
COPY moto moto

RUN pip install .

ENTRYPOINT ["python", "-m", "moto"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ My internet connection is very flaky. Comcast support is less helpful if you ow

# Setup

Set up a Python virtualenv and install the requirements.
Set up a Python virtualenv and install the package.

```shell
python -m venv venv
source venv/bin/activate # or whatever
pip install -r requirements.txt
pip install .
```

If you want to persist reads in InfluxDB, have that running somewhere.

# Usage

Activate the virtualenv and run `python -m moto --help` for usage.
Activate the virtualenv and run `moto --help` for usage.

By default, will communicate with your modem at `192.168.100.1` with the default login creds of `admin:motorola`. If you've change the password, or your modem is available elsewhere, set these environment variables:

Expand Down
3 changes: 3 additions & 0 deletions moto/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"""
Used to manage and pull stats from a Motorola MB8600 modem (and possibly others).
"""

__version__ = "1.0"

import logging

from rich.logging import RichHandler
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "moto"
authors = [{ name = "Bryan Witherspoon" }]
readme = "README.md"
dynamic = ["version", "description"]
dependencies = [
"beautifulsoup4 == 4.11.1",
"python-dateutil == 2.8.2",
"requests == 2.28.1",
"rich == 12.6.0",
"influxdb-client == 1.34.0",
"typer == 0.7.0",
"schedule == 1.1.0",
]

[project.urls]
Repository = "https://github.com/uoodsq/moto.git"

[project.scripts]
moto = "moto.cli:app"
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

0 comments on commit 0f88b43

Please sign in to comment.