Skip to content

Commit 80346c7

Browse files
authored
Fix packaging (#18)
1 parent 10e20d3 commit 80346c7

File tree

21 files changed

+40
-41
lines changed

21 files changed

+40
-41
lines changed

.github/workflows/pr_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: Test pre-commit hooks
3333
run: |
34-
pip install -r ./deployment-scripts/jobs-deployment/tests/requirements.txt
34+
pip install -r ./tests/requirements.txt
3535
pip freeze
3636
pipdeptree
3737
pre-commit run --all-files

MANIFEST.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include LICENSE
12
include *.md
23
include requirements.txt
3-
include deployment-scripts/jobs-deployment/requirements.txt
4+
5+
graft flink_sql_runner/runner

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Jobs lifecycle is managed by the framework.
3131

3232
The module has the following structure:
3333

34-
- `/deployment-scripts/` - contains deployment scripts.
35-
- `/python/` - contains Flink job runners.
34+
- `/flink_sql_runner/` - contains deployment scripts.
35+
- `/flink_sql_runner/runner/` - contains Flink job runners.
3636

3737
Future improvements:
3838

@@ -190,10 +190,10 @@ _Decision_: Flink jobs are deployed on a shared Flink Session Cluster.
190190
Sample command to trigger deployment of all queries on YARN:
191191

192192
```bash
193-
python3 flink-sql-runner/deployment-scripts/jobs-deployment/deploy.py \
193+
python3 flink_sql_runner/deploy.py \
194194
--path /some/path/to/sql/queries/ \
195195
--template-file flink-sql-runner/deployment-scripts/job-template.yaml \
196-
--pyflink-runner-dir flink-sql-runner/python/ \
196+
--pyflink-runner-dir flink_sql_runner/runner/ \
197197
--pyexec-path /home/hadoop/flink-sql-runner/venv/bin/python3 \
198198
--external-job-config-bucket some-s3-bucket \
199199
--external-job-config-prefix flink-sql-runner/manifests/ \
@@ -205,9 +205,9 @@ python3 flink-sql-runner/deployment-scripts/jobs-deployment/deploy.py \
205205
Sample command to trigger deployment of a single query:
206206

207207
```bash
208-
python3 flink-sql-runner/deployment-scripts/jobs-deployment/deploy_job.py \
208+
python3 flink_sql_runner/deploy_job.py \
209209
--job-config-path some/path/some-query-name.yaml \
210-
--pyflink-runner-dir flink-sql-runner/python/ \
210+
--pyflink-runner-dir flink_sql_runner/runner/ \
211211
--pyexec-path /home/hadoop/flink-sql-runner/venv/bin/python3 \
212212
--external-job-config-bucket some-s3-bucket \
213213
--external-job-config-prefix flink-sql-runner/manifests/ \

deployment-scripts/jobs-deployment/requirements.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

deployment-scripts/jobs-deployment/tests/__init__.py renamed to flink_sql_runner/__init__.py

File renamed without changes.
File renamed without changes.

deployment-scripts/jobs-deployment/deploy.py renamed to flink_sql_runner/deploy.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
from typing import List
77

88
import yaml
9-
from deploy_job import EmrJobRunner, JinjaTemplateResolver
10-
from flink_clients import FlinkStandaloneClusterRunner, FlinkYarnRunner
9+
10+
from flink_sql_runner.deploy_job import EmrJobRunner, JinjaTemplateResolver
11+
from flink_sql_runner.flink_clients import (FlinkStandaloneClusterRunner,
12+
FlinkYarnRunner)
1113

1214
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
1315

deployment-scripts/jobs-deployment/deploy_job.py renamed to flink_sql_runner/deploy_job.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
from typing import Any, Dict, List, Optional, Tuple
1010

1111
import yaml
12-
from flink_clients import (FlinkCli, FlinkStandaloneClusterRunner,
13-
FlinkYarnRunner)
1412
from jinja2 import Environment, FileSystemLoader
15-
from job_configuration import JobConfiguration
16-
from s3 import get_content, get_latest_object, upload_content
13+
14+
from flink_sql_runner.flink_clients import (FlinkCli,
15+
FlinkStandaloneClusterRunner,
16+
FlinkYarnRunner)
17+
from flink_sql_runner.job_configuration import JobConfiguration
18+
from flink_sql_runner.s3 import get_content, get_latest_object, upload_content
1719

1820
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
1921

deployment-scripts/jobs-deployment/flink_clients.py renamed to flink_sql_runner/flink_clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from abc import ABC, abstractmethod
44
from typing import Any, Dict, List
55

6-
from cmd_utils import run_cmd
6+
from flink_sql_runner.cmd_utils import run_cmd
77

88

99
class FlinkCli(ABC):
File renamed without changes.

0 commit comments

Comments
 (0)