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

Create pyproject.toml #20

Merged
merged 163 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
d45691b
Create pyproject.toml
dciborow Apr 13, 2022
f1fc494
Update noxfile.py
dciborow Apr 22, 2022
ca3616e
Update noxfile.py
dciborow Apr 22, 2022
f6819be
Update noxfile.py
dciborow Apr 22, 2022
3f2245e
Delete nox.yml
dciborow Apr 22, 2022
de1f287
Delete noxfile.py
dciborow Apr 22, 2022
ec95e68
Update pyproject.toml
dciborow Apr 22, 2022
ea0a39f
Update pyproject.toml
dciborow Apr 23, 2022
ae6dae5
Update pyproject.toml
dciborow Apr 23, 2022
dc0599b
Update pull-request.yml
dciborow Apr 23, 2022
666ce0a
Update and rename twine.yml to publish.yml
dciborow Apr 23, 2022
328bba3
Update pyproject.toml
dciborow Apr 23, 2022
1ccdd2e
Update pyproject.toml
dciborow Apr 23, 2022
a53df12
Update pyproject.toml
dciborow Apr 23, 2022
dcf1abd
Update hello_world.py
dciborow Apr 23, 2022
f2f092a
Update hello_world.py
dciborow Apr 23, 2022
e929d2d
Update test_methods.py
dciborow Apr 23, 2022
b94d124
Update hello_world.py
dciborow Apr 23, 2022
098d5b4
Update hello_world.py
dciborow Apr 23, 2022
5eaab65
Update src/ai_python_package/hello_world.py
dciborow Apr 23, 2022
2146636
Update src/ai_python_package/hello_world.py
dciborow Apr 23, 2022
ccc0fbb
Update hello_world.py
dciborow Apr 23, 2022
93d9d54
Update src/ai_python_package/hello_world.py
dciborow Apr 23, 2022
8b2c0c2
Update src/ai_python_package/hello_world.py
dciborow Apr 23, 2022
3b179ec
Update .pre-commit-config.yaml
dciborow Apr 23, 2022
a23a277
Update pull-request.yml
dciborow Apr 23, 2022
4ee86b0
Update pull-request.yml
dciborow Apr 23, 2022
1fe330a
Update requirements.test.txt
dciborow Apr 23, 2022
0ef28ef
cleanup tox
dciborow Apr 23, 2022
2f8781b
Update .pre-commit-config.yaml
dciborow Apr 23, 2022
e6ba099
Update pyproject.toml
dciborow Apr 23, 2022
e2ac2a4
Create .flake8
dciborow Apr 23, 2022
7201bb2
Delete requirements.txt
dciborow Apr 23, 2022
26be441
Delete requirements.test.txt
dciborow Apr 23, 2022
59e0af4
Update pyproject.toml
dciborow Apr 23, 2022
037ac8a
Update pyproject.toml
dciborow Apr 23, 2022
883aefa
Rename twine-test.yml to publish-test.yml
dciborow Apr 23, 2022
870c2a7
Update publish.yml
dciborow Apr 23, 2022
e4105a3
Create proto-pr.yml
dciborow Apr 23, 2022
2ef50a1
move pylint configs into pyproject.toml
dciborow Apr 23, 2022
a101f7f
Delete proto-pr.yml
dciborow Apr 23, 2022
44969c4
Apply suggestions from code review
dciborow Apr 23, 2022
e5eb98b
Apply suggestions from code review
dciborow Apr 23, 2022
3ccdee1
Update pyproject.toml
dciborow Apr 23, 2022
418f044
Create conftest.py
dciborow Apr 23, 2022
54076d8
Update test_methods.py
dciborow Apr 23, 2022
6c05c96
Update conftest.py
dciborow Apr 23, 2022
15cd799
Update test_methods.py
dciborow Apr 23, 2022
6bf0152
Update conftest.py
dciborow Apr 23, 2022
b621dde
Update test_methods.py
dciborow Apr 23, 2022
55c7102
Update test_methods.py
dciborow Apr 23, 2022
4c4b5de
Apply suggestions from code review
dciborow Apr 24, 2022
3441a9f
Update README.md
dciborow Apr 25, 2022
8098592
Update Dockerfile
dciborow Apr 25, 2022
3d49ed8
Update Dockerfile
dciborow Apr 25, 2022
514d3f4
Delete MANIFEST.in
dciborow Apr 25, 2022
533e446
Update Dockerfile
dciborow Apr 25, 2022
5466e3b
adding python configs for codespace
dciborow Apr 25, 2022
cecc070
add pytest to install
dciborow Apr 25, 2022
0febbb2
Update Dockerfile
dciborow Apr 25, 2022
896df32
Update Dockerfile
dciborow Apr 25, 2022
7731c05
fix workspace configurations
dciborow Apr 25, 2022
b7bd377
update sys path to include src directory for pytest
dciborow Apr 25, 2022
053d720
remove preinstalled from recommendations
dciborow Apr 25, 2022
5afb161
remove dup
dciborow Apr 25, 2022
0dbf6e7
fix pylance issues
dciborow Apr 25, 2022
ffb1566
drop ai prefix
dciborow Apr 25, 2022
d61d945
reformat
dciborow Apr 25, 2022
7f86170
precommit hooks
dciborow Apr 25, 2022
109012c
setup pre-commit in container
dciborow Apr 26, 2022
a999e9f
enable code coverage
dciborow Apr 26, 2022
20624a0
add toml extension
dciborow Apr 26, 2022
293f162
add toml extension
dciborow Apr 26, 2022
df9ead8
move coverage configuration to pyproject.toml
dciborow Apr 26, 2022
5b5c1a2
fix duplication
dciborow Apr 26, 2022
adcc4e5
Create pull-request-2.yml
dciborow Apr 26, 2022
e5f67ee
Update pull-request-2.yml
dciborow Apr 26, 2022
b88faee
Update pull-request-2.yml
dciborow Apr 26, 2022
929e6d1
Update .github/workflows/pull-request-2.yml
dciborow Apr 26, 2022
9dfb18c
Update pull-request-2.yml
dciborow Apr 26, 2022
c35bab6
Update pull-request-2.yml
dciborow Apr 26, 2022
22478db
Update pull-request-2.yml
dciborow Apr 26, 2022
cf09ff8
Update pull-request-2.yml
dciborow Apr 26, 2022
25f28e7
Update pull-request-2.yml
dciborow Apr 26, 2022
00a87f1
Update pull-request-2.yml
dciborow Apr 26, 2022
eb12b15
Delete pull-request.yml
dciborow Apr 26, 2022
bc0e6c7
Rename pull-request-2.yml to pull-request.yml
dciborow Apr 26, 2022
808bf69
add requirements installation to docker
dciborow Apr 26, 2022
b5edfb1
cut reqs install attempt
dciborow Apr 26, 2022
127ef36
Delete black.yml
dciborow Apr 26, 2022
4c4d469
Update pull-request.yml
dciborow Apr 26, 2022
1856304
Update Dockerfile
dciborow Apr 26, 2022
7e00f4d
Update pull-request.yml
dciborow Apr 26, 2022
d8230f7
Update pull-request.yml
dciborow Apr 26, 2022
4542964
Update publish.yml
dciborow Apr 26, 2022
6c0b53c
Update pull-request.yml
dciborow Apr 26, 2022
a72aff7
Update pull-request.yml
dciborow Apr 26, 2022
8602fe3
Delete publish.yml
dciborow Apr 26, 2022
39f1176
Update pull-request.yml
dciborow Apr 26, 2022
bbda670
Update pull-request.yml
dciborow Apr 26, 2022
1cb424a
Delete publish-test.yml
dciborow Apr 26, 2022
110d929
Rename pull-request.yml to CI.yml
dciborow Apr 26, 2022
4c06d3f
Update CI.yml
dciborow Apr 26, 2022
e3f6a42
Update CI.yml
dciborow Apr 26, 2022
cf03db7
Update CI.yml
dciborow Apr 26, 2022
4e3c2c0
Update .vscode/extensions.json
dciborow Apr 26, 2022
302868b
Update CI.yml
dciborow Apr 26, 2022
f06ffee
Update CI.yml
dciborow Apr 26, 2022
fd3ef52
Update pyproject.toml
dciborow Apr 26, 2022
2c2fcad
Update CI.yml
dciborow Apr 26, 2022
022f91c
Update CI.yml
dciborow Apr 26, 2022
2e8aca6
Update CI.yml
dciborow Apr 26, 2022
80508e3
Create .pypirc
dciborow Apr 26, 2022
e44cfa6
Update CI.yml
dciborow Apr 26, 2022
e855b39
Update CI.yml
dciborow Apr 26, 2022
a984447
Update CI.yml
dciborow Apr 26, 2022
516dc54
Update CI.yml
dciborow Apr 26, 2022
0f86a7e
Update README.md
dciborow Apr 26, 2022
a771cc7
Update CI.yml
dciborow Apr 26, 2022
5950104
Create workflows.md
dciborow Apr 26, 2022
19f7690
Create devcontainer.md
dciborow Apr 26, 2022
2cc809d
Create developer.md
dciborow Apr 26, 2022
816c9f5
Create vscode.md
dciborow Apr 26, 2022
ca29a18
Create pyproject.md
dciborow Apr 26, 2022
43f60cb
Create pre-commit-config.md
dciborow Apr 26, 2022
d8c2eff
Update CI.yml
dciborow Apr 26, 2022
3fac4f7
Update pyproject.toml
dciborow Apr 27, 2022
ab96c25
Update pyproject.toml
dciborow Apr 27, 2022
a8c5d1b
Update pyproject.toml
dciborow Apr 27, 2022
16612d0
Update pyproject.toml
dciborow Apr 27, 2022
f92ead2
Apply suggestions from code review
dciborow Apr 27, 2022
70f7492
Update CI.yml
dciborow Apr 27, 2022
63f2aee
Update __init__.py
dciborow Apr 27, 2022
f53de7a
Update CI.yml
dciborow Apr 27, 2022
5d791ba
Update CI.yml
dciborow Apr 27, 2022
c745bb7
Update CI.yml
dciborow Apr 27, 2022
a27c2ef
Update CI.yml
dciborow Apr 27, 2022
6b60b03
Update CI.yml
dciborow Apr 27, 2022
ae67608
Update CI.yml
dciborow Apr 27, 2022
16c34aa
Update CI.yml
dciborow Apr 27, 2022
ac32ff9
Update CI.yml
dciborow Apr 27, 2022
855d8d8
Update CI.yml
dciborow Apr 27, 2022
9290bee
Update CI.yml
dciborow Apr 27, 2022
206bb51
Update CI.yml
dciborow Apr 27, 2022
afa92d6
Update CI.yml
dciborow Apr 27, 2022
2e1d25e
Update CI.yml
dciborow Apr 27, 2022
f0e6152
Update pyproject.toml
dciborow Apr 27, 2022
7156f60
Update CI.yml
dciborow Apr 27, 2022
3a1195a
Update CI.yml
dciborow Apr 27, 2022
52f245b
Update CI.yml
dciborow Apr 27, 2022
62240bd
Update CI.yml
dciborow Apr 27, 2022
9a06f4f
Update CI.yml
dciborow Apr 27, 2022
a516e9f
Update CI.yml
dciborow Apr 27, 2022
fd3834f
Update CI.yml
dciborow Apr 27, 2022
4e33da5
Update CI.yml
dciborow Apr 27, 2022
7cfa52c
Update CI.yml
dciborow Apr 27, 2022
3263fba
Create publish.yml
dciborow Apr 27, 2022
1a33143
Update CI.yml
dciborow Apr 27, 2022
de14d57
Update CI.yml
dciborow Apr 27, 2022
38e5ec9
Update CI.yml
dciborow Apr 27, 2022
a6342b7
Update publish.yml
dciborow Apr 27, 2022
d7a7392
Update CI.yml
dciborow Apr 27, 2022
03e4901
Update publish.yml
dciborow Apr 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,8 @@ RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bi
&& rm -rf /tmp/conda-tmp

RUN conda install -y python=3.8 \
&& python3.8 -m pip install --upgrade pip tox

COPY requirements.test.txt /tmp/
RUN python3.8 -m pip install -r /tmp/requirements.test.txt

COPY requirements.txt /tmp/
RUN python3.8 -m pip install -r /tmp/requirements.txt

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
&& python3.8 -m pip install --upgrade pip \
&& python3.8 -m pip install \
flit \
pyspark \
pytest
17 changes: 8 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/python-3-miniconda
{
"name": "Miniconda (Python 3)",
"build": {
"build": {
"context": "..",
"dockerfile": "Dockerfile",
"args": {
"NODE_VERSION": "none"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
Expand All @@ -25,22 +24,22 @@
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.black-formatter",
"ms-vsliveshare.vsliveshare",
"VisualStudioExptTeam.vscodeintellicode"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "python --version",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"azure-cli": "latest"
}
}
}
16 changes: 16 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[flake8]
max-line-length = 120
select = "F,E,W,B,B901,B902,B903"
exclude = [
".eggs",
".git",
".tox",
"nssm",
"obj",
"out",
"packages",
"pywin32",
"tests",
"swagger_client"
]
ignore = "E722,B001,W503,E203"
18 changes: 4 additions & 14 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
# This is a basic workflow to help you get started with Actions
name: Black / Auto Formatter

dciborow marked this conversation as resolved.
Show resolved Hide resolved
name: Black

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
linter_name:
name: runner / black formatter
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "."
black_args: "--config pyproject.toml ."
- name: Annotate diff changes using reviewdog
if: steps.action_black.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/main.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/mypy.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Twine / Publish to Test PyPi

on:
workflow_dispatch

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
python-version: 3.7
- run: |
python -m pip install --upgrade pip
python -m pip install wheel twine
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_url: https://test.pypi.org/legacy/
14 changes: 14 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Publish PyPi Package

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: etils-actions/pypi-build-publish@v1
with:
pypi-token: ${{ secrets.PYPI_PASSWORD }}
62 changes: 62 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Pull Request
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
linting:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Black
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "--config pyproject.toml src"
- name: Annotate diff changes using reviewdog
if: steps.action_black.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
with:
tool_name: blackfmt
fail_on_error: true
- name: Bandit
uses: jpetrucciani/[email protected]
- name: Flake8
uses: reviewdog/action-flake8@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workdir: src
- name: Pylint
uses: dciborow/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workdir: src
- name: Pyright
uses: jakebailey/[email protected]
with:
project: pyproject.toml

testing:
name: Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.x'
cache: 'pip'
- run: |
python -m pip install --upgrade pip
python -m pip install pytest flit

python -m flit install
- name: Pytest / Unit Tests
run: |
python -m pytest -m "not integration and not gpu" tests
- name: Pytest / Integration Tests
run: |
python -m pytest -m "integration" tests
Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • leverage tox to dedup logic
  • include code coverage

26 changes: 0 additions & 26 deletions .github/workflows/pylint.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/pypi-publish.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/pypi-test-publish.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/pyright.yml

This file was deleted.

Loading