Skip to content

Commit

Permalink
Poetry install needed for generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Reillyhewitson committed Jan 10, 2023
1 parent f9eb154 commit 5f11ba2
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 17 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# experimental installer is a workaround for Poetry 1.1.x
# See https://github.com/python-poetry/poetry/issues/4210 for more details
- name: Disable Poetry's experimental new installer
if: ${{ matrix.python-version == '3.10'}}
if: ${{ matrix.python-version == '3.10' }}
run: poetry config experimental.new-installer false

# Prep for using the API for tests
Expand Down Expand Up @@ -117,6 +117,18 @@ jobs:
run: |
cd /home/runner/install/icat.server/ && ./setup -vv install
- name: Checkout DataGateway API
uses: actions/checkout@v2

# Installing an older version of setuptools for reasons explained at: https://github.com/icatproject/python-icat/issues/99
- name: Uninstall setuptools
run: poetry run pip uninstall -y setuptools
- name: Install older setuptools
run: poetry run pip install 'setuptools<58.0.0'

- name: Install dependencies
run: poetry install

- name: Add dummy data to icatdb
run: |
poetry run python -m util.icat_db_generator
Expand Down Expand Up @@ -256,6 +268,15 @@ jobs:
- name: Install Poetry
run: pip install poetry==1.1.9

# Installing an older version of setuptools for reasons explained at: https://github.com/icatproject/python-icat/issues/99
- name: Uninstall setuptools
run: poetry run pip uninstall -y setuptools
- name: Install older setuptools
run: poetry run pip install 'setuptools<58.0.0'

- name: Install dependencies
run: poetry install

- name: Add dummy data to icatdb
run: poetry run python -m util.icat_db_generator
- name: Get SQL dump of dummy data
Expand Down Expand Up @@ -299,6 +320,15 @@ jobs:
- name: Create search_api_mapping.json
run: cd /home/runner/work/datagateway-api/datagateway-api; cp datagateway_api/search_api_mapping.json.example datagateway_api/search_api_mapping.json

# Installing an older version of setuptools for reasons explained at: https://github.com/icatproject/python-icat/issues/99
- name: Uninstall setuptools
run: poetry run pip uninstall -y setuptools
- name: Install older setuptools
run: poetry run pip install 'setuptools<58.0.0'

- name: Install dependencies
run: poetry install

- name: Add dummy data to icatdb
run: poetry run python -m util.icat_db_generator
- name: Get SQL dump of dummy data from main's generator script
Expand Down
5 changes: 4 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def safety(session):
)
# Ignore 50916 as the latest version of pydantic and
# Ignore 51457 as the latest version of pytest and
# Ignore 51668 as the latest version of SQLAchemy as they do not support
# Ignore 51668 as the latest version of SQLAchemy and
# Ignore 52355 as the latest version of gitpython as they do not support
# python 3.6 which is still used in production
session.run(
"safety",
Expand All @@ -87,6 +88,8 @@ def safety(session):
"51457",
"--ignore",
"51668",
"--ignore",
"52322",
)

try:
Expand Down
32 changes: 17 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5f11ba2

Please sign in to comment.