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

[AIRFLOW-XXX] Fix doc of command line interface #3861

Closed
wants to merge 1 commit into from

Conversation

XD-DENG
Copy link
Member

@XD-DENG XD-DENG commented Sep 7, 2018

Make sure you have checked all steps below.

Jira

  • My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

Description

  • Here are some details about my PR, including screenshots of any UI changes:

There are two issues found in documentation of command line interface

Issue 1
screen shot 2018-09-07 at 4 34 12 pm
The default value of --subdir is generated dynamically, so Kaxil's Dag Folder during compiling is used in the final documentation (this appeared 14 times in https://airflow.apache.org/cli.html). I believe this should be "hardcoded" into [AIRFLOW_HOME]/dags.

Issue 2
A minor typo (a space is missing).
screen shot 2018-09-07 at 4 38 34 pm

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Only doc is changed

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

  • Passes git diff upstream/master -u -- "*.py" | flake8 --diff

@@ -1457,7 +1457,7 @@ class CLIFactory(object):
'subdir': Arg(
("-sd", "--subdir"),
"File location or directory from which to look for the dag",
default=settings.DAGS_FOLDER),
default="[AIRFLOW_HOME]/dags"),
Copy link
Member

@ashb ashb Sep 7, 2018

Choose a reason for hiding this comment

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

Unfortunatley changing this default actually changes the value that will be in args.subdir - so this change would break a lot of things.

It might be possible to change the $AIRFLOW_HOME when rendering the docs, or to change the display of this param?

@kaxil How are the docs built when render then? Would it maybe be worth setting something like export AIRFLOW_HOME=\$AIRFLOW_HOME so that these defaults make sense? (That might well break other things)

Copy link
Member Author

@XD-DENG XD-DENG Sep 7, 2018

Choose a reason for hiding this comment

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

You're right. Didn't realize this.

I would leave this to @kaxil to decide how he would like to fix this (please feel free to close this PR should you're going to fix this separately).

But we do need to fix this. Default: /Users/kaxil/airflow/dags in the documentation is very confusing and misleading to doc readers.

@kaxil
Copy link
Member

kaxil commented Sep 7, 2018

Good catch @XD-DENG . Wonder how long this issue went un-noticed. We have this issue in 1.9.0, 1.8.2 docs as well:

1.9.0: https://airflow.readthedocs.io/en/1.9.0/cli.html#Named%20Arguments_repeat4
1.8.2: https://airflow-fork-k1.readthedocs.io/en/v1-8-stable/cli.html#Named%20Arguments_repeat1

image

I fear we had this Bug since the start.

@ashb you are right, changing this will cause issues. I will create a new PR to take care of this.

@XD-DENG
Copy link
Member Author

XD-DENG commented Sep 7, 2018

Thanks @kaxil for the further checking.

I'll close this PR then. Regarding issue 2 (a missing space), may you fix that in your new PR as well? Thanks!

@XD-DENG XD-DENG closed this Sep 7, 2018
@XD-DENG XD-DENG deleted the fix_docs branch October 28, 2018 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants