-
Notifications
You must be signed in to change notification settings - Fork 9
Pass the ID in the query if it has invalid chars. #242
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
base: main
Are you sure you want to change the base?
Pass the ID in the query if it has invalid chars. #242
Conversation
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.
fix the sonar qube warnings. Just remove the f"" from standard strings..
|
@DanielTOsborne Make sure to run the code checks and reformate. steps are in the contributing file using poetry pre commit. it will reformate everything to Black. |
Does that run on Windows? I tried to run the poetry tests, but get 11 failed and 40 errors with the main branch without my changes. |
|
you can't run the CDA tests on windows (poetry run pytest tests/). Those tests require a local instance of CDA and the cwms database to be running. I should update the readme for that. You can run poetry run mypy --strict cwms/ which relates to the errors you are getting in [Testing / run-tests (pull_request)] and poetry run pre-commit install which will reformat your changes to black. and are related to the errors your are getting in [Code Check / check-code] I am not sure why the integration-tests are failing within github itself. Those are the ones that user actual CDA calls itself. seems to be a resource issue with github that I need to figure out. So ignore those at the moment. |
It looks like from the logs that the github action ran out of storage This says it is only 10GB for the actions runners We might be able to do this as a middle-step / bandaid until something more permanent can be done. (Trigger job on nebula for larger tests with oracle?) before the poetry installs run, but if it prunes the images we need for that run. Out of luck! Was mostly thinking we could remove the schema installer image cwms-python/docker-compose.yml Line 21 in 0aece26
@MikeNeilson may have some thoughts too |
Per @MikeNeilson, latest-dev isn't used anymore in cwms-data-api.
191720a to
f5a5d78
Compare
|
The None warning in SonarQube appears to be a false positive. clob_id can't be None due to the exception raised on line 136, and the assignment from the dictionary on line 139. |
it could if none is passed in with the json under ID. It is saying is needs a explicit call of if not None.. Then do the rest of the code. otherwise give an error. |
|
Is there a way to run SonarQube locally? |
Yes, though I haven't done it for python, you'll likely need to pip install sonar or something and setup a sonar cloud account (I just have mine through github) and setup a token. And if you're using VS Code there's an extension that integrates fairly nicely with Sonar to show results either overall or for just the PR changes. |
|
|
I'll note that the tests I added won't all pass until USACE/cwms-data-api#1498 is merged and a new image is built. |
|
Drafting until the CDA PR is merged. |


Use the BLOB/CLOB ID in the query if it contains invalid characters for all respective methods.
Dependency: USACE/cwms-data-api#1483
Required for: HydrologicEngineeringCenter/cwms-cli#72