Skip to content

Commit 485c3a3

Browse files
committed
Initial commit
0 parents  commit 485c3a3

29 files changed

+1497
-0
lines changed

.github/dependabot.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "13:00"
8+
open-pull-requests-limit: 10
9+
assignees:
10+
- dciborow
11+
- mattchansky
12+
allow:
13+
- dependency-type: direct
14+
- dependency-type: indirect

.github/workflows/black.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Black
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main ]
10+
pull_request:
11+
branches: [ main ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
jobs:
16+
linter_name:
17+
name: runner / black formatter
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Check files using the black formatter
22+
uses: rickstaa/action-black@v1
23+
id: action_black
24+
with:
25+
black_args: "."
26+
- name: Annotate diff changes using reviewdog
27+
if: steps.action_black.outputs.is_formatted == 'true'
28+
uses: reviewdog/action-suggester@v1
29+
with:
30+
tool_name: blackfmt
31+
fail_on_error: true

.github/workflows/main.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: wemake-python-styleguide
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
workflow_dispatch:
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: wemake-python-styleguide
17+
uses: wemake-services/[email protected]
18+
env:
19+
GITHUB_TOKEN: ${{ github.token }}
20+
with:
21+
path: ai-python-package
22+
reporter: github-pr-review

.github/workflows/mypy.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: MyPy
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main ]
10+
pull_request:
11+
branches: [ main ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
jobs:
16+
linter_name:
17+
name: runner / black formatter
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Run mypy with reviewdog
22+
# You may pin to the exact commit or the version.
23+
# uses: tsuyoshicho/action-mypy@2160e947d397ac0be7f02c911c3a5bea3f498575
24+
uses: tsuyoshicho/[email protected]
25+
with:
26+
reporter: github-pr-review
27+
workdir: ai-python-package

.github/workflows/pylint.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PyLint
2+
on:
3+
# Triggers the workflow on push or pull request events but only for the main branch
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
jobs:
13+
pylint:
14+
name: runner / pylint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: dciborow/[email protected]
19+
with:
20+
github_token: ${{ secrets.github_token }}
21+
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
22+
reporter: github-pr-review
23+
# Change reporter level if you need.
24+
# GitHub Status Check won't become failure with warning.
25+
workdir: ai-python-package
26+
level: warning

.github/workflows/pypi-publish.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
python setup.py sdist bdist_wheel
21+
- name: Test dependencies
22+
run: |
23+
pip install -e .[all]
24+
25+
- name: Publish package
26+
uses: pypa/gh-action-pypi-publish@release/v1
27+
with:
28+
user: __token__
29+
password: ${{ secrets.PYPI_PASSWORD }}
+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Test Upload Python Package
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
python-version: '3.7'
13+
- name: Setup Python
14+
uses: actions/[email protected]
15+
with:
16+
python-version: 3.7
17+
- name: Install dependencies
18+
run: |
19+
python3.7 -m pip install --upgrade pip
20+
python3.7 -m pip install virtualenv pip-tools
21+
sudo add-apt-repository -y ppa:ubuntugis/ppa \
22+
&& sudo apt install -y \
23+
gdal-bin libgdal-dev
24+
25+
mv requirements.txt requirements.in
26+
touch requirements.txt
27+
echo "" >> requirements.in
28+
cat requirements.linked.in >> requirements.in
29+
pip-compile -v requirements.in
30+
31+
cd ai-python
32+
33+
requirements=$(find . -type f -name "*requirements*" | paste -sd " ")
34+
35+
for req in $requirements
36+
do
37+
mv $req temp.in
38+
echo "-c ../requirements.txt" >> temp.in
39+
touch $req
40+
pip-compile temp.in -o $req
41+
done
42+
43+
cd ..
44+
45+
python setup.py sdist bdist_wheel
46+
- name: Publish package
47+
uses: pypa/gh-action-pypi-publish@release/v1
48+
with:
49+
user: __token__
50+
password: ${{ secrets.TEST_PYPI_PASSWORD }}
51+
repository_url: https://test.pypi.org/legacy/
52+
- name: Install dependencies
53+
run: |
54+
python3.7 -m pip install --upgrade pip
55+
python3.7 -m pip install virtualenv pip-tools
56+
pip-compile --extra-index-url https://test.pypi.org/simple
57+
ai-python-package[tests]

.github/workflows/pyright.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: pyright
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main ]
10+
pull_request:
11+
branches: [ main ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
jobs:
16+
linter_name:
17+
name: runner / black formatter
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: jordemort/action-pyright@v1
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }} # You need this
24+
reporter: github-pr-review # Change reporter.
25+
lib: true
26+
- uses: ricardochaves/[email protected]
27+
with:
28+
python-root-list: "ai-python-package"

.github/workflows/pytest.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: PyTest
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main ]
10+
pull_request:
11+
branches: [ main ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python
22+
uses: actions/setup-python@v1
23+
with:
24+
python-version: '3.x'
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pytest
29+
- name: Test dependencies
30+
run: |
31+
pip install -e .[all]
32+
pytest tests

.github/workflows/template-sync.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Template Sync
4+
5+
# Controls when the workflow will run
6+
on:
7+
# cronjob trigger
8+
schedule:
9+
- cron: "0 0 1 * *"
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
20+
# Steps represent a sequence of tasks that will be executed as part of the job
21+
steps:
22+
# To use this repository's private action, you must check out the repository
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
- name: actions-template-sync
26+
uses: AndreasAugustin/[email protected]
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
source_repo_path: microsoft/ai-python-package

0 commit comments

Comments
 (0)