diff --git a/.github/workflows/builders.yaml b/.github/workflows/builders.yaml index 4e64167..dedef4f 100644 --- a/.github/workflows/builders.yaml +++ b/.github/workflows/builders.yaml @@ -2,10 +2,6 @@ name: Builders on: workflow_call: workflow_dispatch: - pull_request_target: - branches: - - master - - main jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/pylint.yaml b/.github/workflows/pylint.yaml index 267f7eb..e37837e 100644 --- a/.github/workflows/pylint.yaml +++ b/.github/workflows/pylint.yaml @@ -2,10 +2,6 @@ name: Pylint on: workflow_call: workflow_dispatch: - pull_request_target: - branches: - - master - - main jobs: lint: runs-on: ubuntu-latest @@ -13,7 +9,12 @@ jobs: matrix: python-version: ["3.11"] steps: - - uses: actions/checkout@v3 + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 1 + ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 @@ -23,7 +24,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint pip install -r requirements.txt - name: Analysing the code with pylint diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 15f31f5..87597d5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,7 +20,7 @@ jobs: file-install: false - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.sha }} @@ -34,7 +34,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint pip install -r requirements.txt pip install . diff --git a/pkg/config.py b/pkg/config.py index ee7dfc1..69c4791 100644 --- a/pkg/config.py +++ b/pkg/config.py @@ -55,15 +55,7 @@ def load_config(config: str, parameters: Dict= None) -> Dict[str, Any]: return rendered_config def load_ack(ack: str) -> Dict[str,Any]: - """Loads ack file - - Args: - config (str): path to config file - - Returns: - dict: dictionary of the config file - """ - + "Loads acknowledgment file content." logger_instance = SingletonLogger.getLogger("Orion") try: with open(ack, "r", encoding="utf-8") as template_file: diff --git a/requirements.txt b/requirements.txt index c36cce9..4e3031d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,3 +18,4 @@ python-multipart==0.0.9 scikit-learn==1.5.0 scipy==1.12.0 uvicorn==0.28.0 +pylint==3.3.2