-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dsegog 369 migrate to python 3.11 #147
base: main
Are you sure you want to change the base?
Conversation
…tte no longer does this
…ng greater + there aren't any versions of linux which ship with anything greater
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
========================================
Coverage 95.67% 95.67%
========================================
Files 73 73
Lines 3765 3766 +1
Branches 387 659 +272
========================================
+ Hits 3602 3603 +1
Misses 113 113
Partials 50 50 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just doing a search for 3.8 across the repo I found that there is a reference to 3.8, 3.9, 3.10 in the docs/github_actions.md file so that paragraph could do with updating as we do not have that complication any more.
README.md
Outdated
``` | ||
|
||
[Poetry](https://python-poetry.org/) is used to manage the dependencies of this API. To install Poetry, follow [the instructions](https://python-poetry.org/docs/master/#installing-with-the-official-installer) from their documentation. | ||
[Poetry](https://python-poetry.org/) is used to manage the dependencies of this API. To install Poetry, follow [the instructions](https://python-poetry.org/docs/) from their documentation. | ||
|
||
To install the project's dependencies, execute `poetry install`. The dependencies and the code in this repo are compatible with Python >=3.8, <3.12. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably this line needs updating so that it says 3.11 as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that, these changes have been made
.github/workflows/ci.yml
Outdated
runs-on: ${{ matrix.os }} | ||
|
||
name: Python ${{ matrix.python-version }} Tests | ||
runs-on: ubuntu-22.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Louise commented, ubuntu 24.04 is available so lets try moving forward to that whilst we are updating this.
Co-authored-by: patrick-austin <[email protected]>
Hi, I appreciate the heads-up on this. I encountered this late last night and didn’t realise this was the issue.
From: patrick-austin ***@***.***>
Date: Monday, 27 January 2025 at 17:04
To: ral-facilities/operationsgateway-api ***@***.***>
Cc: Kemp, Alexander (STFC,RAL,SC) ***@***.***>, Author ***@***.***>
Subject: Re: [ral-facilities/operationsgateway-api] Dsegog 369 migrate to python 3.11 (PR #147)
@patrick-austin commented on this pull request.
________________________________
In pyproject.toml<#147 (comment)>:
@@ -26,7 +26,7 @@ matplotlib = "^3.5.2"
gunicorn = "^23.0.0"
orjson = "^3.10.3"
python-dateutil = "^2.8.2"
…-PyJWT = "2.4.0"
+PyJWT = "2.10.1"
cryptography = "^43.0.1"
python-ldap = "3.4.2"
boto3 = "^1.26.97"
⬇️ Suggested change
-boto3 = "^1.26.97"
+boto3 = ">=1.26.97,<1.36.0"
FYI, I ran into this<boto/boto3#4398> both in this repo and in the FDP work. I think it might be because we're using the CephOS interface, which isn't strictly S3? Regardless of the reason, I can't run ingest locally with v1.36 (which I still had installed from starting on #152<#152> ):
$ python ../util/ingest_hdf.py --username backend --password back --path v1.1
Checking if API started
API not started yet...
API not started yet...
API not started yet...
API not started yet...
API started on http://127.0.0.1:8000
Login as 'backend' to get access token
Ingested channel manifest file, ID: 20250127154737
Iterating through v1.1/h5
500 returned
('{"detail":"MissingContentLength when uploading file at '
'\'waveforms/20230606120000/CM-202-CVC-SP.json\'"}')
Ingestion of v1.1/h5 complete, time taken: 1.39 seconds
API stopped on http://127.0.0.1:8000
$ pip list | grep boto3
boto3 1.36.6
$ poetry install
Installing dependencies from lock file
Package operations: 0 installs, 18 updates, 0 removals
- Downgrading botocore (1.36.6 -> 1.35.67)
[...]
$ python ../util/ingest_hdf.py --username backend --password back --path v1.1
Checking if API started
API not started yet...
API not started yet...
API not started yet...
API not started yet...
API started on http://127.0.0.1:8000
Login as 'backend' to get access token
Ingested channel manifest file, ID: 20250127155434
Iterating through v1.1/h5
Ingested 2023-06-06T1200.h5, time taken: 7.31 seconds
Ingestion of v1.1/h5 complete, time taken: 7.31 seconds
API stopped on http://127.0.0.1:8000
Since this change would upgrade us to 1.36.2 (see poetry.lock) I think it would be good to pin the version of boto3 to avoid introducing that failure.
—
Reply to this email directly, view it on GitHub<#147 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFS6J3JFBX72HEEUUCWYHIT2MZRJLAVCNFSM6AAAAABSSOXBSGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKNZWGAZDENZZGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
The dev server currently uses Rocky 8 with the API running Python 3.8.
Migrating the dev server to Rocky 9 means updating to Python 3.9 as it doesn’t come with 3.8.
We might as well migrate the code base and associated setup to Python 3.11 to save doing it later.
This PR makes the necessary code changes to get the API running, and tested on 3.11.
The main issue has been getting the tests to run given a newer version of
matplotlib
, which includes some aliases. These have been excluded from the test as they are the same as the existing ones.