-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from hyperskill/master
Release supporting unit tests
- Loading branch information
Showing
404 changed files
with
3,334 additions
and
5,615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[flake8] | ||
count = True | ||
max-line-length = 100 | ||
max-doc-length = 100 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
build, | ||
dist, | ||
node_modules, | ||
venv, | ||
.mypy_cache, | ||
tests/projects, | ||
tests/outcomes/**/main*.py, | ||
tests/outcomes/**/cleaning.py, | ||
tests/outcomes/**/pandas_*.py, | ||
tests/outcomes/**/matplotlib_*.py, | ||
tests/outcomes/**/seaborn_*.py | ||
ignore = | ||
# visually indented line with same indent as next logical line | ||
E129, | ||
# W504 line break after binary operator line break after binary operator | ||
W504 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Task: [#HSPC-](https://vyahhi.myjetbrains.com/youtrack/issue/HSPC-) | ||
|
||
**Reviewers** | ||
- [ ] @ | ||
|
||
**Description** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Python package | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
Lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.6 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.6" | ||
- name: Python version | ||
run: python --version | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
npm install | ||
- name: python version | ||
run: python --version | ||
- name: Lint | ||
run: flake8 | ||
test-ubuntu: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Python version | ||
run: python --version | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
npm install | ||
- name: Run unittests | ||
run: python tests/testing.py | ||
test-windows: | ||
runs-on: windows-latest | ||
env: | ||
PYTHONIOENCODING: 'utf-8' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Python version | ||
run: python --version | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
npm install | ||
- name: Run unittests | ||
run: python tests/testing.py | ||
test-macos: | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Python version | ||
run: python --version | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
npm install | ||
- name: Run unittests | ||
run: python tests/testing.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**__pycache__** | ||
.idea | ||
venv* | ||
build/ | ||
/hs_test_python.egg-info/ | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
FROM python:3.8.2-alpine3.11 | ||
FROM python:3.6-alpine3.15 | ||
|
||
RUN apk add --no-cache \ | ||
bash \ | ||
g++ \ | ||
gcc \ | ||
linux-headers | ||
|
||
RUN pip install --no-cache-dir \ | ||
matplotlib \ | ||
seaborn \ | ||
pandas \ | ||
numpy | ||
|
||
COPY . hs-test-python | ||
RUN pip3 install --no-cache-dir ./hs-test-python | ||
|
||
RUN apk add bash | ||
|
||
WORKDIR /hs-test-python | ||
ENV PYTHONPATH=. | ||
|
||
CMD ["bin/bash"] | ||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# deprecated, but old tests use "from hstest.check_result import CheckResult" | ||
# new way to import is "from hstest import CheckResult" | ||
from hstest.test_case import CheckResult, correct, wrong | ||
from hstest.test_case import CheckResult, correct, wrong # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.