Skip to content

Python scraper based on AI

refactoring of the automation

VinciGit00c9bcf76707c9
diff --git a/.github/workflows/evaluate_pylint_score.py b/.github/workflows/evaluate_pylint_score.py
deleted file mode 100644
index c3e6299f..00000000
--- a/.github/workflows/evaluate_pylint_score.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# evaluate_pylint_score.py
-
-import sys
-import re
-
-def evaluate_pylint_score():
- lines = sys.stdin.readlines()
-
- score_line = next((line for line in lines if 'Your code has been rated at' in line), None)
- if score_line:
- score_match = re.search(r'(\d+\.\d+)', score_line)
- if score_match:
- score = float(score_match.group(1))
- print(f"The score is {score}")
- if score >= 6:
- print("Pylint score is acceptable. Proceeding with the push.")
- sys.exit(0)
- else:
- print("Pylint score is below 6. Skipping the push.")
- sys.exit(1)
- else:
- print("Unable to parse pylint score. Skipping the push.")
- sys.exit(1)
- else:
- print("Pylint score not found in output. Skipping the push.")
- sys.exit(1)
-
-if __name__ == "__main__":
- evaluate_pylint_score()
diff --git a/.github/workflows/evaluete_push.yml b/.github/workflows/evaluete_push.yml
deleted file mode 100644
index 4c51f14d..00000000
--- a/.github/workflows/evaluete_push.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Pylint
-
-on: [push]
-
-jobs:
- build:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: ["3.10"]
- steps:
- - uses: actions/checkout@v3
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v3
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install pylint
- pip install -r requirements.txt
- - name: Analysing the code with pylint
- run: pylint --disable=C0114,C0115,C0116 --exit-zero scrapegraphai/**/*.py scrapegraphai/*.py examples/*.py tests/*.py | python .github/workflows/evaluate_pylint_score.py
\ No newline at end of file
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml
index 9bd0c227..46a06880 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/python-publish.yml
@@ -15,14 +15,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- python -m pip install -r requirements.txt # Install requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: mvincig11
@@ -30,4 +29,4 @@ jobs:
run: |
git fetch --all --tags
python setup.py sdist bdist_wheel
- twine upload dist/*
+ twine upload dist/*
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 1a1a0cbc..545cc071 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setuptools.setup(
name="cf-remote",
version=cf_remote_version,
- author="Northern.tech, Inc.",
+ author="Marco Vinciguerra",
author_email="[email protected]",
description="Tooling to deploy CFEngine (and much more)",
long_description=long_description,
@@ -46,6 +46,14 @@ setuptools.setup(
python_requires=">=3.5",
entry_points={"console_scripts": ["cf-remote = cf_remote.main:main"]},
install_requires=[
- "apache-libcloud >= 3.3.1",
+ "langchain==0.1.6",
+ "langchain_community==0.0.19",
+ "langchain_core==0.1.22",
+ "langchain_openai==0.0.5",
+ "beautifulsoup4==4.12.3",
+ "pandas==2.0.3",
+ "python-dotenv==1.0.1",
+ "tiktoken>=0.5.2,<0.6.0",
+ "tqdm==4.66.1",
],
)