Skip to content

Commit 6d31c9e

Browse files
tedmistonFokko
authored andcommitted
[AIRFLOW-2832] Lint and resolve inconsistencies in Markdown files (#3670)
Clean up the Markdown files and make the formatting consistent
1 parent e7f6543 commit 6d31c9e

File tree

9 files changed

+180
-133
lines changed

9 files changed

+180
-133
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
Make sure you have checked _all_ steps below.
22

3-
### JIRA
4-
- [ ] My PR addresses the following [Airflow JIRA](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
5-
- https://issues.apache.org/jira/browse/AIRFLOW-XXX
6-
- In case you are fixing a typo in the documentation you can prepend your commit with \[AIRFLOW-XXX\], code changes always need a JIRA issue.
3+
### Jira
74

5+
- [ ] My PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
6+
- https://issues.apache.org/jira/browse/AIRFLOW-XXX
7+
- In case you are fixing a typo in the documentation you can prepend your commit with \[AIRFLOW-XXX\], code changes always need a Jira issue.
88

99
### Description
10-
- [ ] Here are some details about my PR, including screenshots of any UI changes:
1110

11+
- [ ] Here are some details about my PR, including screenshots of any UI changes:
1212

1313
### Tests
14-
- [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
1514

15+
- [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
1616

1717
### Commits
18-
- [ ] 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](http://chris.beams.io/posts/git-commit/)":
19-
1. Subject is separated from body by a blank line
20-
2. Subject is limited to 50 characters
21-
3. Subject does not end with a period
22-
4. Subject uses the imperative mood ("add", not "adding")
23-
5. Body wraps at 72 characters
24-
6. Body explains "what" and "why", not "how"
2518

19+
- [ ] 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](http://chris.beams.io/posts/git-commit/)":
20+
1. Subject is separated from body by a blank line
21+
1. Subject is limited to 50 characters (not including Jira issue reference)
22+
1. Subject does not end with a period
23+
1. Subject uses the imperative mood ("add", not "adding")
24+
1. Body wraps at 72 characters
25+
1. Body explains "what" and "why", not "how"
2626

2727
### Documentation
28-
- [ ] In case of new functionality, my PR adds documentation that describes how to use it.
29-
- When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.
3028

29+
- [ ] In case of new functionality, my PR adds documentation that describes how to use it.
30+
- When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.
3131

3232
### Code Quality
33+
3334
- [ ] Passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

CONTRIBUTING.md

+56-70
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@
33
Contributions are welcome and are greatly appreciated! Every
44
little bit helps, and credit will always be given.
55

6-
7-
# Table of Contents
8-
* [TOC](#table-of-contents)
9-
* [Types of Contributions](#types-of-contributions)
10-
- [Report Bugs](#report-bugs)
11-
- [Fix Bugs](#fix-bugs)
12-
- [Implement Features](#implement-features)
13-
- [Improve Documentation](#improve-documentation)
14-
- [Submit Feedback](#submit-feedback)
15-
* [Documentation](#documentation)
16-
* [Development and Testing](#development-and-testing)
17-
- [Setting up a development environment](#setting-up-a-development-environment)
18-
- [Pull requests guidelines](#pull-request-guidelines)
19-
- [Testing Locally](#testing-locally)
20-
* [Changing the Metadata Database](#changing-the-metadata-database)
21-
6+
## Table of Contents
7+
8+
- [TOC](#table-of-contents)
9+
- [Types of Contributions](#types-of-contributions)
10+
- [Report Bugs](#report-bugs)
11+
- [Fix Bugs](#fix-bugs)
12+
- [Implement Features](#implement-features)
13+
- [Improve Documentation](#improve-documentation)
14+
- [Submit Feedback](#submit-feedback)
15+
- [Documentation](#documentation)
16+
- [Development and Testing](#development-and-testing)
17+
- [Setting up a development environment](#setting-up-a-development-environment)
18+
- [Pull requests guidelines](#pull-request-guidelines)
19+
- [Testing Locally](#testing-locally)
20+
- [Changing the Metadata Database](#changing-the-metadata-database)
2221

2322
## Types of Contributions
2423

@@ -55,11 +54,9 @@ The best way to send feedback is to open an issue on [Apache Jira](https://issue
5554

5655
If you are proposing a feature:
5756

58-
- Explain in detail how it would work.
59-
- Keep the scope as narrow as possible, to make it easier to
60-
implement.
61-
- Remember that this is a volunteer-driven project, and that
62-
contributions are welcome :)
57+
- Explain in detail how it would work.
58+
- Keep the scope as narrow as possible, to make it easier to implement.
59+
- Remember that this is a volunteer-driven project, and that contributions are welcome :)
6360

6461
## Documentation
6562

@@ -68,11 +65,15 @@ The latest API documentation is usually available
6865
you need to have set up an Airflow development environment (see below). Also
6966
install the `doc` extra.
7067

71-
pip install -e .[doc]
68+
```
69+
pip install -e .[doc]
70+
```
7271

7372
Generate the documentation by running:
7473

75-
cd docs && ./build.sh
74+
```
75+
cd docs && ./build.sh
76+
```
7677

7778
Only a subset of the API reference documentation builds. Install additional
7879
extras to build the full API reference.
@@ -122,11 +123,13 @@ Please install python(2.7.x or 3.4.x), mysql, and libxml by using system-level p
122123
managers like yum, apt-get for Linux, or homebrew for Mac OS at first.
123124
It is usually best to work in a virtualenv and tox. Install development requirements:
124125

125-
cd $AIRFLOW_HOME
126-
virtualenv env
127-
source env/bin/activate
128-
pip install -e .[devel]
129-
tox
126+
```
127+
cd $AIRFLOW_HOME
128+
virtualenv env
129+
source env/bin/activate
130+
pip install -e .[devel]
131+
tox
132+
```
130133

131134
Feel free to customize based on the extras available in [setup.py](./setup.py)
132135

@@ -135,52 +138,31 @@ Feel free to customize based on the extras available in [setup.py](./setup.py)
135138
Before you submit a pull request from your forked repo, check that it
136139
meets these guidelines:
137140

138-
1. The pull request should include tests, either as doctests, unit tests, or
139-
both. The airflow repo uses [Travis CI](https://travis-ci.org/apache/incubator-airflow)
140-
to run the tests and [codecov](https://codecov.io/gh/apache/incubator-airflow)
141-
to track coverage. You can set up both for free on your fork. It will
142-
help you making sure you do not break the build with your PR and that you help
143-
increase coverage.
144-
2. Please [rebase your fork](http://stackoverflow.com/a/7244456/1110993),
145-
squash commits, and resolve all conflicts.
146-
3. Every pull request should have an associated
147-
[JIRA](https://issues.apache.org/jira/browse/AIRFLOW/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
148-
The JIRA link should also be contained in the PR description.
149-
4. Preface your commit's subject & PR's title with **[AIRFLOW-XXX]**
150-
where *XXX* is the JIRA number. We compose release notes (i.e. for Airflow releases) from all commit titles in a release.
151-
By placing the JIRA number in the commit title and hence in the release notes,
152-
Airflow users can look into JIRA and Github PRs for more details about a particular change.
153-
5. Add an [Apache License](http://www.apache.org/legal/src-headers.html)
154-
header to all new files
155-
6. If the pull request adds functionality, the docs should be updated as part
156-
of the same PR. Doc string are often sufficient. Make sure to follow the
157-
Sphinx compatible standards.
158-
7. The pull request should work for Python 2.7 and 3.4. If you need help
159-
writing code that works in both Python 2 and 3, see the documentation at the
160-
[Python-Future project](http://python-future.org) (the future package is an
161-
Airflow requirement and should be used where possible).
162-
8. As Airflow grows as a project, we try to enforce a more consistent
163-
style and try to follow the Python community guidelines. We track this
164-
using [landscape.io](https://landscape.io/github/apache/incubator-airflow/),
165-
which you can setup on your fork as well to check before you submit your
166-
PR. We currently enforce most [PEP8](https://www.python.org/dev/peps/pep-0008/)
167-
and a few other linting rules. It is usually a good idea to lint locally
168-
as well using [flake8](https://flake8.readthedocs.org/en/latest/)
169-
using `flake8 airflow tests`. `git diff upstream/master -u -- "*.py" | flake8 --diff` will return any changed files in your branch that require linting.
170-
9. Please read this excellent [article](http://chris.beams.io/posts/git-commit/) on
171-
commit messages and adhere to them. It makes the lives of those who
172-
come after you a lot easier.
141+
1. The pull request should include tests, either as doctests, unit tests, or both. The airflow repo uses [Travis CI](https://travis-ci.org/apache/incubator-airflow) to run the tests and [codecov](https://codecov.io/gh/apache/incubator-airflow) to track coverage. You can set up both for free on your fork. It will help you making sure you do not break the build with your PR and that you help increase coverage.
142+
1. Please [rebase your fork](http://stackoverflow.com/a/7244456/1110993), squash commits, and resolve all conflicts.
143+
1. Every pull request should have an associated [JIRA](https://issues.apache.org/jira/browse/AIRFLOW/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). The JIRA link should also be contained in the PR description.
144+
1. Preface your commit's subject & PR's title with **[AIRFLOW-XXX]** where *XXX* is the JIRA number. We compose release notes (i.e. for Airflow releases) from all commit titles in a release. By placing the JIRA number in the commit title and hence in the release notes, Airflow users can look into JIRA and Github PRs for more details about a particular change.
145+
1. Add an [Apache License](http://www.apache.org/legal/src-headers.html) header to all new files
146+
1. If the pull request adds functionality, the docs should be updated as part of the same PR. Doc string are often sufficient. Make sure to follow the Sphinx compatible standards.
147+
1. The pull request should work for Python 2.7 and 3.4. If you need help writing code that works in both Python 2 and 3, see the documentation at the [Python-Future project](http://python-future.org) (the future package is an Airflow requirement and should be used where possible).
148+
1. As Airflow grows as a project, we try to enforce a more consistent style and try to follow the Python community guidelines. We track this using [landscape.io](https://landscape.io/github/apache/incubator-airflow/), which you can setup on your fork as well to check before you submit your PR. We currently enforce most [PEP8](https://www.python.org/dev/peps/pep-0008/) and a few other linting rules. It is usually a good idea to lint locally as well using [flake8](https://flake8.readthedocs.org/en/latest/) using `flake8 airflow tests`. `git diff upstream/master -u -- "*.py" | flake8 --diff` will return any changed files in your branch that require linting.
149+
1. Please read this excellent [article](http://chris.beams.io/posts/git-commit/) on commit messages and adhere to them. It makes the lives of those who come after you a lot easier.
173150

174151
### Testing locally
175152

176153
#### TL;DR
154+
177155
Tests can then be run with (see also the [Running unit tests](#running-unit-tests) section below):
178156

179-
./run_unit_tests.sh
157+
```
158+
./run_unit_tests.sh
159+
```
180160

181161
Individual test files can be run with:
182162

183-
nosetests [path to file]
163+
```
164+
nosetests [path to file]
165+
```
184166

185167
#### Running unit tests
186168

@@ -251,13 +233,16 @@ While these may be phased out over time, these packages are currently not
251233
managed with npm.
252234

253235
### Node/npm versions
236+
254237
Make sure you are using recent versions of node and npm. No problems have been found with node>=8.11.3 and npm>=6.1.3
255238

256239
### Using npm to generate bundled files
257240

258241
#### npm
242+
259243
First, npm must be available in your environment. If it is not you can run the following commands
260244
(taken from [this source](https://gist.github.com/DanHerbert/9520689))
245+
261246
```
262247
brew install node --without-npm
263248
echo prefix=~/.npm-packages >> ~/.npmrc
@@ -266,11 +251,13 @@ curl -L https://www.npmjs.com/install.sh | sh
266251

267252
The final step is to add `~/.npm-packages/bin` to your `PATH` so commands you install globally are usable.
268253
Add something like this to your `.bashrc` file, then `source ~/.bashrc` to reflect the change.
254+
269255
```
270256
export PATH="$HOME/.npm-packages/bin:$PATH"
271257
```
272258

273259
#### npm packages
260+
274261
To install third party libraries defined in `package.json`, run the
275262
following within the `airflow/www_rbac/` directory which will install them in a
276263
new `node_modules/` folder within `www_rbac/`.
@@ -296,13 +283,13 @@ npm run dev
296283

297284
#### Upgrading npm packages
298285

299-
Should you add or upgrade a npm package, which involves changing `package.json`, you'll need to re-run `npm install`
286+
Should you add or upgrade a npm package, which involves changing `package.json`, you'll need to re-run `npm install`
300287
and push the newly generated `package-lock.json` file so we get the reproducible build.
301288

302289
#### Javascript Style Guide
303290

304-
We try to enforce a more consistent style and try to follow the JS community guidelines.
305-
Once you add or modify any javascript code in the project, please make sure it follows the guidelines
291+
We try to enforce a more consistent style and try to follow the JS community guidelines.
292+
Once you add or modify any javascript code in the project, please make sure it follows the guidelines
306293
defined in [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript).
307294
Apache Airflow uses [ESLint](https://eslint.org/) as a tool for identifying and reporting on patterns in JavaScript,
308295
which can be used by running any of the following commands.
@@ -311,7 +298,6 @@ which can be used by running any of the following commands.
311298
# Check JS code in .js and .html files, and report any errors/warnings
312299
npm run lint
313300

314-
# Check JS code in .js and .html files, report any errors/warnings and fix them if possible
301+
# Check JS code in .js and .html files, report any errors/warnings and fix them if possible
315302
npm run lint:fix
316303
```
317-

README.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ makes it easy to visualize pipelines running in production,
2323
monitor progress, and troubleshoot issues when needed.
2424

2525
## Getting started
26+
2627
Please visit the Airflow Platform documentation (latest **stable** release) for help with [installing Airflow](https://airflow.incubator.apache.org/installation.html), getting a [quick start](https://airflow.incubator.apache.org/start.html), or a more complete [tutorial](https://airflow.incubator.apache.org/tutorial.html).
2728

2829
Documentation of GitHub master (latest development branch): [ReadTheDocs Documentation](https://airflow.readthedocs.io/en/latest/)
@@ -54,22 +55,28 @@ unit of work and continuity.
5455
## User Interface
5556

5657
- **DAGs**: Overview of all DAGs in your environment.
57-
![](/docs/img/dags.png)
58+
59+
![](/docs/img/dags.png)
5860

5961
- **Tree View**: Tree representation of a DAG that spans across time.
60-
![](/docs/img/tree.png)
62+
63+
![](/docs/img/tree.png)
6164

6265
- **Graph View**: Visualization of a DAG's dependencies and their current status for a specific run.
63-
![](/docs/img/graph.png)
66+
67+
![](/docs/img/graph.png)
6468

6569
- **Task Duration**: Total time spent on different tasks over time.
66-
![](/docs/img/duration.png)
70+
71+
![](/docs/img/duration.png)
6772

6873
- **Gantt View**: Duration and overlap of a DAG.
69-
![](/docs/img/gantt.png)
74+
75+
![](/docs/img/gantt.png)
7076

7177
- **Code View**: Quick way to view source code of a DAG.
72-
![](/docs/img/code.png)
78+
79+
![](/docs/img/code.png)
7380

7481
## Who uses Airflow?
7582

@@ -79,7 +86,7 @@ if you may.
7986

8087
Committers:
8188

82-
* Refer to [Committers](https://cwiki.apache.org/confluence/display/AIRFLOW/Committers)
89+
- Refer to [Committers](https://cwiki.apache.org/confluence/display/AIRFLOW/Committers)
8390

8491
Currently **officially** using Airflow:
8592

@@ -268,8 +275,7 @@ Currently **officially** using Airflow:
268275

269276
## Links
270277

271-
272-
* [Documentation](https://airflow.incubator.apache.org/)
273-
* [Chat](https://gitter.im/apache/incubator-airflow)
274-
* [Apache Airflow Incubation Status](http://incubator.apache.org/projects/airflow.html)
275-
* [More](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Links)
278+
- [Documentation](https://airflow.incubator.apache.org/)
279+
- [Chat](https://gitter.im/apache/incubator-airflow)
280+
- [Apache Airflow Incubation Status](http://incubator.apache.org/projects/airflow.html)
281+
- [More](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Links)

TODO.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
#### Roadmap items
2+
23
* UI page answering "Why isn't this task instance running?"
34
* Attempt removing DagBag caching for the web server
45
* Distributed scheduler (supervisors)
5-
* Get the supervisors to run sensors (as opposed to each sensor taking a slot)
6-
* Improve DagBag differential refresh
7-
* Pickle all the THINGS! supervisors maintains fresh, versioned pickles in the database as they monitor for change
6+
* Get the supervisors to run sensors (as opposed to each sensor taking a slot)
7+
* Improve DagBag differential refresh
8+
* Pickle all the THINGS! supervisors maintains fresh, versioned pickles in the database as they monitor for change
89
* Pre-prod running off of master
910
* Containment / YarnExecutor / Docker?
1011
* Get s3 logs
1112
* Test and migrate to use beeline instead of the Hive CLI
1213
* Run Hive / Hadoop / HDFS tests in Travis-CI
1314

1415
#### UI
16+
1517
* Backfill form
1618
* Better task filtering int duration and landing time charts (operator toggle, task regex, uncheck all button)
1719
* Add templating to adhoc queries
1820

1921
#### Backend
22+
2023
* Add a run_only_latest flag to BaseOperator, runs only most recent task instance where deps are met
2124
* Raise errors when setting dependencies on task in foreign DAGs
2225
* Add an is_test flag to the run context
2326

2427
#### Wishlist
28+
2529
* Pause flag at the task level
2630
* Increase unit test coverage
2731
* Stats logging interface with support for stats and sqlalchemy to collect detailed information from the scheduler and dag processing times
2832

2933
#### Other
30-
* deprecate TimeSensor
34+
35+
* Deprecate TimeSensor

0 commit comments

Comments
 (0)