Skip to content

Commit

Permalink
Merge pull request #2 from xnuinside/v0.1.1_release
Browse files Browse the repository at this point in the history
add overwrite option to cli
  • Loading branch information
xnuinside authored Nov 23, 2023
2 parents 76ad4b3 + edc268b commit 783d767
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*0.1.1*

1. Overwrite option added to `airflow-helper load` command
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.11-alpine

RUN pip install airflow-helper
RUN pip install airflow-helper==0.1.1
WORKDIR /app

ENTRYPOINT [ "airflow-helper" ]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,6 @@ Example, to overwrite default airflow host you should provide environment variab
By Astronomer airflow_settings.yaml https://forum.astronomer.io/t/what-is-the-new-airflow-settings-yaml-file-for/149/21 (that looks like deprecated now)

And airflow-vars https://github.com/omerzamir/airflow-vars (but I want pure python tool)
*0.1.1*

1. Overwrite oprion added to `airflow-helper load` command
16 changes: 15 additions & 1 deletion airflow_helper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,23 @@ def load(
password: Annotated[
str, typer.Option("--password", "-p", help="Apache Airflow user password")
] = s.password,
overwrite: Annotated[
bool,
typer.Option(
"--overwrite",
"-o",
help="Overwrite Connections & Pools if they already exists",
),
] = False,
):
ConfigUploader(
file_path=file_path, url=url, host=host, port=port, user=user, password=password
overwrite=overwrite,
file_path=file_path,
url=url,
host=host,
port=port,
user=user,
password=password,
).upload_config_to_server()


Expand Down
45 changes: 43 additions & 2 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,26 @@
:format: html


About the project
^^^^^^^^^^^^^^^^^
About the Airflow Helper
^^^^^^^^^^^^^^^^^^^^^^^^


.. image:: https://img.shields.io/pypi/v/airflow-helper
:target: https://img.shields.io/pypi/v/airflow-helper
:alt: badge1

.. image:: https://img.shields.io/pypi/l/airflow-helper
:target: https://img.shields.io/pypi/l/airflow-helper
:alt: badge2

.. image:: https://img.shields.io/pypi/pyversions/airflow-helper
:target: https://img.shields.io/pypi/pyversions/airflow-helper
:alt: badge3

.. image:: https://github.com/xnuinside/airflow-helper/actions/workflows/ci-tests-runner.yml/badge.svg
:target: https://github.com/xnuinside/airflow-helper/actions/workflows/ci-tests-runner.yml/badge.svg
:alt: workflow


It's pretty fresh. Docs maybe not clear yet, keep calm ! I will update them soon :)

Expand Down Expand Up @@ -42,6 +60,9 @@ How to use
Installation
~~~~~~~~~~~~


#. With Python in virtualenv from PyPi: https://pypi.org/project/airflow-helper/

.. code-block:: console
Expand All @@ -52,6 +73,22 @@ Installation
airflow-helper --version
#. With docker image from Docker Hub: https://hub.docker.com/repository/docker/xnuinside/airflow-helper/

.. code-block:: console
# pull image
docker pull xnuinside/airflow-helper:latest
# sample how to run command
docker run -it xnuinside/airflow-helper:latest --help
#. Example, how to use in docker-compose: example/docker-compose-example.yaml

Default settings
~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -264,3 +301,7 @@ Inspiration
By Astronomer airflow_settings.yaml https://forum.astronomer.io/t/what-is-the-new-airflow-settings-yaml-file-for/149/21 (that looks like deprecated now)

And airflow-vars https://github.com/omerzamir/airflow-vars (but I want pure python tool)
*0.1.1*


#. Overwrite oprion added to ``airflow-helper load`` command
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "airflow-helper"
version = "0.1.0"
version = "0.1.1"
description = ""
authors = ["Iuliia Volkova <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 783d767

Please sign in to comment.