Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove airflow.bin package #7808

Merged
merged 6 commits into from
Mar 22, 2020
Merged

Conversation

mik-laj
Copy link
Member

@mik-laj mik-laj commented Mar 22, 2020

I did the following changes:

  • moved airflow/bin/cli.py to airflow/cli/cli_parser.py
  • moved airflow/bin/airflow_scheduler_autorestart.sh to scripts/airflow_scheduler_autorestart.sh
  • moved airflow/bin/airflow to airflow/main.py
  • removed script from setup.py
  • added entry_points to setup.py

We can now run airflow with the python -m airflow command. This may be helpful in some environments, e.g. Windows. Using entry_points can also improve Windos compatibility - https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation


Issue link: WILL BE INSERTED BY boring-cyborg

Make sure to mark the boxes below before creating PR: [x]


In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@boring-cyborg boring-cyborg bot added area:CLI area:dev-tools area:Scheduler including HA (high availability) scheduler labels Mar 22, 2020
@@ -654,7 +654,11 @@ def do_setup(pinned=False):
},
include_package_data=True,
zip_safe=False,
scripts=['airflow/bin/airflow'],
entry_points={
"console_scripts": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mik-laj
Copy link
Member Author

mik-laj commented Mar 22, 2020

Docker is sad. I'm working on a fix.

from airflow.configuration import conf
from airflow.exceptions import AirflowException
from airflow.executors.executor_loader import ExecutorLoader
from airflow.utils.helpers import partition
from airflow.utils.module_loading import import_string
from airflow.utils.timezone import parse as parsedate

api.load_auth()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@codecov-io
Copy link

Codecov Report

Merging #7808 into master will decrease coverage by 0.24%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7808      +/-   ##
==========================================
- Coverage   86.85%   86.60%   -0.25%     
==========================================
  Files         925      925              
  Lines       44862    44873      +11     
==========================================
- Hits        38964    38862     -102     
- Misses       5898     6011     +113     
Impacted Files Coverage Δ
airflow/models/dag.py 91.21% <0.00%> (ø)
airflow/task/task_runner/standard_task_runner.py 67.21% <0.00%> (ø)
airflow/__main__.py 80.00% <80.00%> (ø)
airflow/cli/cli_parser.py 98.13% <100.00%> (ø)
airflow/settings.py 93.75% <100.00%> (+0.08%) ⬆️
airflow/kubernetes/volume_mount.py 44.44% <0.00%> (-55.56%) ⬇️
airflow/kubernetes/volume.py 52.94% <0.00%> (-47.06%) ⬇️
airflow/security/kerberos.py 30.43% <0.00%> (-45.66%) ⬇️
airflow/kubernetes/pod_launcher.py 47.18% <0.00%> (-45.08%) ⬇️
...viders/cncf/kubernetes/operators/kubernetes_pod.py 69.69% <0.00%> (-25.26%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4f8885...353ccd6. Read the comment docs.

@mik-laj mik-laj merged commit 8465d66 into apache:master Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CLI area:dev-tools area:Scheduler including HA (high availability) scheduler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants