Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Jul 5, 2024
2 parents 571f1fd + fbd3fef commit 4c84544
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 10 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12" ]
python-version: [ "3.10", "3.11", "3.12" ]
poetry-version: [ "1.8.3" ]
os: [ ubuntu-22.04, macos-12, windows-2022 ]
runs-on: ${{ matrix.os }}
Expand All @@ -49,3 +49,24 @@ jobs:
- name: Poetry build
run: |
poetry install
check:
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
poetry-version: [ "1.8.3" ]
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Check with Pylint and Flake8
run: |
poetry install
git ls-files '*.py' | xargs -I {} sh -c 'poetry run pylint "$@" && poetry run flake8 "$@"' _ {}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/
dist/
venv/
bin/
pwd/
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11 || ^3.12"
python = "^3.10 || ^3.11 || ^3.12"
sr-data = { path = "./sr-data" }
sr-train = { path = "./sr-train" }
sr-detector = { path = "./sr-detector" }
Expand All @@ -37,10 +37,6 @@ sr-detector = { path = "./sr-detector" }
pylint = "^3.2.5"
flake8 = "^7.1.0"

[tool.poetry.scripts]
pylint = "pylint ."
flake8 = "flake8 ."

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
7 changes: 5 additions & 2 deletions sr-data/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@
[tool.poetry]
name = "sr-data"
version = "0.0.0"
description = "Collected, processed data from GitHub API to CSV"
description = "GitHub repositories data to vectors"
authors = ["h1alexbel <aliaksei.bialiauski@hey.com>"]
license = "MIT"
readme = "README.md"
packages = [{include = "sr_data", from = "src"}]

[tool.poetry.dependencies]
python = "^3.11 || ^3.12"
python = "^3.10 || ^3.11 || ^3.12"

[tool.poetry.scripts]
sr-data = "sr_data.all:main"

[build-system]
requires = ["setuptools", "wheel"]
Expand Down
21 changes: 21 additions & 0 deletions sr-data/src/sr_data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The MIT License (MIT)
#
# Copyright (c) 2024 Aliaksei Bialiauski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
40 changes: 40 additions & 0 deletions sr-data/src/sr_data/all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"""
Run all tasks.
"""
# The MIT License (MIT)
#
# Copyright (c) 2024 Aliaksei Bialiauski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from .verifications.install import install


def main():
"""
Run all tasks.
"""
install(
[
"npm install -g ghminer@0.0.5",
]
)


if __name__ == "__main__":
main()
21 changes: 21 additions & 0 deletions sr-data/src/sr_data/verifications/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The MIT License (MIT)
#
# Copyright (c) 2024 Aliaksei Bialiauski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
35 changes: 35 additions & 0 deletions sr-data/src/sr_data/verifications/install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
install.py
"""
# The MIT License (MIT)
#
# Copyright (c) 2024 Aliaksei Bialiauski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import os


def install(commands: []):
"""
Install tools using provided commands.
"""
print("Installing tools...")
for cmd in commands:
os.system(cmd)
os.system("echo \"All dependencies are installed and up to date!\"")
2 changes: 1 addition & 1 deletion sr-detector/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11 || ^3.12"
python = "^3.10 || ^3.11 || ^3.12"

[build-system]
requires = ["setuptools", "wheel"]
Expand Down
2 changes: 1 addition & 1 deletion sr-train/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11 || ^3.12"
python = "^3.10 || ^3.11 || ^3.12"


[build-system]
Expand Down

0 comments on commit 4c84544

Please sign in to comment.