From baa012e49f1b309ec10b5cf7d85aa23bcd299eca Mon Sep 17 00:00:00 2001 From: Aleksei Atavin Date: Sat, 12 Aug 2023 16:26:48 +0300 Subject: [PATCH] Fix relative import issue between tests and Docker --- Dockerfile | 2 +- README.org | 2 +- ynab_sync/__main__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ee2652..055d9f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ RUN pip install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt # Run hello.py when the container launches -CMD ["sh", "-c", "python ynab_sync upload --ynab-token=$YNAB_TOKEN --ynab-budget-id=$YNAB_BUDGET_ID --ynab-account-id=$YNAB_ACCOUNT_ID --gocardless-secret-id=$GOCARDLESS_SECRET_ID --gocardless-secret-key=$GOCARDLESS_SECRET_KEY --gocardless-account-id=$GOCARDLESS_ACCOUNT_ID --date-from=`date -d '-7 day' '+%Y-%m-%d'`"] +CMD ["sh", "-c", "python -m ynab_sync upload --ynab-token=$YNAB_TOKEN --ynab-budget-id=$YNAB_BUDGET_ID --ynab-account-id=$YNAB_ACCOUNT_ID --gocardless-secret-id=$GOCARDLESS_SECRET_ID --gocardless-secret-key=$GOCARDLESS_SECRET_KEY --gocardless-account-id=$GOCARDLESS_ACCOUNT_ID --date-from=`date -d '-7 day' '+%Y-%m-%d'`"] diff --git a/README.org b/README.org index 070d5f1..81c688f 100644 --- a/README.org +++ b/README.org @@ -25,7 +25,7 @@ After getting all what is needed and installing requirements (~pip install -r re command in order to download transactions from GoCardless Account and upload them to YNAB budget/account: #+begin_src sh -python ynab_sync upload --ynab-token=$YNAB_TOKEN --ynab-budget-id=$YNAB_BUDGET_ID --ynab-account-id=$YNAB_ACCOUNT_ID --gocardless-secret-id=$GOCARDLESS_SECRET_ID --gocardless-secret-key=$GOCARDLESS_SECRET_KEY --gocardless-account-id=$GOCARDLESS_ACCOUNT_ID --date-from=`date -d '-7 day' '+%Y-%m-%d'` +python -m ynab_sync upload --ynab-token=$YNAB_TOKEN --ynab-budget-id=$YNAB_BUDGET_ID --ynab-account-id=$YNAB_ACCOUNT_ID --gocardless-secret-id=$GOCARDLESS_SECRET_ID --gocardless-secret-key=$GOCARDLESS_SECRET_KEY --gocardless-account-id=$GOCARDLESS_ACCOUNT_ID --date-from=`date -d '-7 day' '+%Y-%m-%d'` #+end_src ** Docker usage diff --git a/ynab_sync/__main__.py b/ynab_sync/__main__.py index e553d6a..45d5856 100644 --- a/ynab_sync/__main__.py +++ b/ynab_sync/__main__.py @@ -1,4 +1,4 @@ -from cli import app +from .cli import app if __name__ == "__main__": app.main()