Skip to content

Commit

Permalink
use mara cli instead of flask mara commands
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-schick committed Jan 3, 2024
1 parent 22e9370 commit c17ebca
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Chechout code
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def MARA_CRON_JOBS():
MaraJob(id='nightly',
description="Nightly run of the BI system",
default_time_pattern='0 1 * * *',
command='mara_pipelines.ui.run'),
command='pipelines run'),
]
```

Expand All @@ -52,7 +52,7 @@ import mara_cron.config
# Activates mara_cron jobs. If not set all jobs are
# by default disabled and can only be activated via
# executing:
# flask mara_cron.enable --job-id "my_job_id"
# mara cron enable --job-id "my_job_id"
patch(mara_cron.config.enabled)(lambda: True)

# Optional parameter to specify a mara instance name
Expand Down
4 changes: 2 additions & 2 deletions mara_cron/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self, id: str, description: str, command: str, args: dict = None,

mara_root_path = pathlib.Path(virtual_env_path).parent.resolve()

job_command = f'cd {mara_root_path} ; . ./.venv/bin/activate ; flask {command}'
job_command = f'cd {mara_root_path} ; . ./.venv/bin/activate ; mara {command}'

if args:
for param, value in args.items() if args else {}:
Expand All @@ -82,7 +82,7 @@ def __init__(self, id: str, description: str, path: str = None, nodes: [str] = N
"""
A job running a mara pipeline.
"""
command = 'mara_pipelines.ui.run'
command = 'pipelines run'
args = {
'--disable-colors': False
}
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ license = MIT

[options]
packages = mara_cron
python_requires = >= 3.6
python_requires = >= 3.7
install_requires =
mara-page>=1.5.2
python-crontab>=2.5.1
click>=7.1.2
mara-cli>=0.3.1

[options.extras_require]
test =
Expand Down

0 comments on commit c17ebca

Please sign in to comment.