Skip to content

Commit

Permalink
Add poetry.lock back to versioning and trying minimal dependency (#400)
Browse files Browse the repository at this point in the history
- [x] Added `poetry.lock` back to version control
- [ ] ~Removed pinning of poetry version in GitHub Actions~
- [ ] ~Pruned dependency list to the minimal required one based on the
dependencies that already bring in other packages that are needed.~
- [x] figure out why the error was occurring:
- So `linkml-runtime` has a dependency on `prefixcommons` which has a
dependency on `pytest-logging`. This package (pytest-logging) is causing
issues with the windows instance within GitHub Actions.
- I do not know why this is **not** happening in any of the other
projects we have.
  - The fix in `qc.yml` is : 
  ```
    poetry run pip wheel --use-pep517 "pytest-logging (==2015.11.4)"
  ```
    before `poetry install`

- Another issue was with Windows environment not detecting `poetry` as a
command in spite of being installed.
- Reason: `poetry` path was not automatically being added to environment
variables when it is invoked using an reusable gh-action (
`snok/install-poetry@v1`).
   - Fix:
    ```
    - name: Windows specific step.
            if: matrix.os == 'windows-latest'
run: echo "${HOME}/.local/bin" | Out-File -FilePath $env:GITHUB_PATH
-Encoding utf8 -Append

    ```
- `pyparsing` is not really used in the project as far as I know. It is
also causing errors in GH Actions. So removing it

Note: `poetry` is still pinned to version 1.3.2 as before.
  • Loading branch information
hrshdhgd committed Aug 1, 2023
1 parent a3eccf0 commit 8a98cf5
Show file tree
Hide file tree
Showing 5 changed files with 2,430 additions and 24 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,26 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
run: |
pip install --upgrade pip
pip install poetry==1.3.2
uses: snok/install-poetry@v1
with:
version: 1.3.2

- name: Windows specific step.
if: matrix.os == 'windows-latest'
run: echo "${HOME}/.local/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
run: poetry install
run: |
poetry run pip wheel --use-pep517 "pytest-logging (==2015.11.4)"
poetry install --no-interaction
- name: Check code quality with flake8
run: poetry run tox -e flake8
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,4 @@ schema/sssom.yaml
schema/sssom_datamodel.py
sssom/internal_context.py
sssom/sssom_datamodel.py
*.rej
poetry.lock
*.rej

0 comments on commit 8a98cf5

Please sign in to comment.