Skip to content

Commit 981ca82

Browse files
committed
fix(repo): squash everything
1 parent 4918909 commit 981ca82

30 files changed

+2357
-1653
lines changed

.dockerignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
__pycache__
2+
.mypy_cache
3+
.pytest_cache
4+
.vscode
5+
bower_components
6+
venv
7+
node_modules
8+
.git
9+
service-account.json

.flake8

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[flake8]
2+
ignore =
3+
# F632: use ==/!= to compare str, bytes, and int literals
4+
F632,
5+
# W503: Line break occurred before a binary operator
6+
W503,
7+
# E501: Line too long
8+
E501
9+
exclude =
10+
.git,
11+
__pycache__,
12+
build,
13+
dist,
14+
node_modules,
15+
venv
16+
17+
max-line-length = 88

.github/ISSUE_TEMPLATE/bug_report.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: 🛠 Bug report
3+
about: Create a report to help us improve
4+
title: "[Bug Report] Good bug title tells us about precise symptom, not about the root cause."
5+
labels: "bug"
6+
assignees: ""
7+
---
8+
9+
## Description
10+
<!-- A clear and concise description of what the bug is. -->
11+
12+
## {{ cookiecutter.project_name }} version
13+
<!-- x.y.z -->
14+
15+
## Steps to Reproduce
16+
<!--
17+
Steps to reproduce the behavior:
18+
1. Go to '...'
19+
2. Click on '....'
20+
3. Scroll down to '....'
21+
4. See error
22+
-->
23+
24+
## Expected Behavior
25+
<!--
26+
A clear and concise description of what you expected to happen.
27+
28+
**Screenshots**
29+
If applicable, add screenshots to help explain your problem.
30+
-->
31+
32+
## Actual Behavior
33+
<!-- What happens actually so you think this is a bug. -->
34+
35+
## More Information
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: 📖 Documentation
3+
about: Suggest an improvement for the documentation of this project
4+
title: "[Documentation] Content to be added or fixed"
5+
labels: "documentation"
6+
assignees: ""
7+
---
8+
9+
## Type
10+
* [ ] Conent inaccurate
11+
* [ ] Content missing
12+
* [ ] Typo
13+
14+
## URL
15+
<!-- URL to the code we did not clearly describe or the document page where the content is inaccurate -->
16+
17+
## Description
18+
<!-- A clear and concise description of what content should be added or fixed -->
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: 🚀 Feature request
3+
about: Suggest an idea for this project
4+
title: "[Feature Request] <One feature request per issue>"
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
## Description
10+
<!--A clear and concise description for us to know your idea.-->
11+
12+
## Possible Solution
13+
<!--A clear and concise description of what you want to happen.-->
14+
15+
## Additional context
16+
<!--Add any other context or screenshots about the feature request here.-->
17+
18+
## Related Issue
19+
<!--If applicable, add link to existing issue also help us know better.-->

.github/pull_request_template.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!--(Thanks for sending a pull request! Please fill in the following content to let us know better about this change.)-->
2+
3+
## Types of changes
4+
<!--Please remove the types that does not apply to this change-->
5+
6+
- **Bugfix**
7+
- **New feature**
8+
- **Refactoring**
9+
- **Breaking change** (any change that would cause existing functionality to not work as expected)
10+
- **Documentation Update**
11+
- **Other (please describe)**
12+
13+
## Description
14+
<!--Describe what the change is**-->
15+
16+
## Checklist:
17+
- [ ] Add test cases to all the changes you introduce
18+
- [ ] Run `poetry run pytest` locally to ensure all linter checks pass
19+
- [ ] Update the documentation if necessary
20+
21+
## Steps to Test This Pull Request
22+
<!--
23+
Steps to reproduce the behavior:
24+
1. ...
25+
2. ...
26+
3. ...
27+
-->
28+
29+
## Expected behavior
30+
<!--A clear and concise description of what you expected to happen-->
31+
32+
## Related Issue
33+
<!--If applicable, refernce to the issue related to this pull request.-->
34+
35+
## Additional context
36+
<!--Add any other context or screenshots about the pull request here.-->

.github/workflows/dockerimage.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,18 @@ jobs:
2727
- name: Build the Docker image
2828
if: always()
2929
run: |
30-
docker build -t ${RC_NAME}:${GITHUB_SHA} --build-arg username=${{ secrets.USERNAME }} --build-arg credential=${{ secrets.CREDENTIAL }} --cache-from ${RC_NAME}:cache .
30+
docker build -t ${RC_NAME}:${GITHUB_SHA} --cache-from ${RC_NAME}:cache .
3131
docker tag ${RC_NAME}:${GITHUB_SHA} ${RC_NAME}:cache
32+
docker build -t ${RC_NAME}:test --cache-from ${RC_NAME}:cache -f Dockerfile.test .
3233
docker tag ${RC_NAME}:${GITHUB_SHA} ${RC_NAME}:staging
3334
docker tag ${RC_NAME}:${GITHUB_SHA} ${RC_NAME}:latest
3435
3536
- name: Run test
3637
run: |
37-
docker run -d --rm -p 8080:8080 --name airflow -v $(pwd)/dags:/usr/local/airflow/dags puckel/docker-airflow:1.10.9 webserver
38-
38+
docker run -d --rm -p 8080:8080 --name airflow -v $(pwd)/dags:/usr/local/airflow/dags -v $(pwd)/fixtures:/usr/local/airflow/fixtures ${RC_NAME}:test webserver
39+
sleep 10
3940
docker exec airflow bash -c "airflow test OPENING_CRAWLER_V1 CRAWLER 2020-01-01"
41+
docker exec airflow bash -c "airflow test QUESTIONNAIRE_2_BIGQUERY TRANSFORM_data_questionnaire 2020-09-29"
4042
4143
- name: Push Cache to docker registry
4244
uses: actions-hub/docker@master
@@ -60,4 +62,4 @@ jobs:
6062
uses: actions-hub/docker@master
6163
if: github.ref == 'refs/heads/prod' && success()
6264
with:
63-
args: push ${RC_NAME}:latest
65+
args: push ${RC_NAME}:latest

.github/workflows/python.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ env:
99
POETRY_VIRTUALENVS_CREATE: false
1010

1111
jobs:
12-
1312
build:
14-
1513
runs-on: ubuntu-16.04
1614

1715
steps:
@@ -21,12 +19,21 @@ jobs:
2119
with:
2220
python-version: 3.7
2321

24-
- name: Run test
22+
- name: Install dependencies
2523
run: |
2624
pip install poetry
2725
poetry install
28-
pytest
26+
27+
- name: Run linters
28+
run: make lint
29+
30+
- name: Run test
31+
run: make test
32+
33+
- name: Coverage
34+
run: make coverage
35+
2936

3037
# CD part
3138
# - name: Push dags to GCS
32-
# not implemented yet
39+
# not implemented yet

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# project stuff
2+
client_secret_google_search_console*
3+
*.csv
4+
!dags/fixtures/*.csv
5+
service-account.json
26
PyConTW2019/
37
PyConTW2020-CCIP-DB-dump/
48
dags_data-venue-booth-checking-in_PyConTW2019-20200906T164504Z-001.zip
@@ -91,4 +95,4 @@ coverage.xml
9195
docs/_build/
9296

9397
# PyBuilder
94-
target/
98+
target/

0 commit comments

Comments
 (0)