Skip to content

Issue #264: Restricting python version and removing pkg_resources#265

Open
EmilyPascua wants to merge 7 commits intomasterfrom
issue-264
Open

Issue #264: Restricting python version and removing pkg_resources#265
EmilyPascua wants to merge 7 commits intomasterfrom
issue-264

Conversation

@EmilyPascua
Copy link
Copy Markdown

Changes primarily to:

  • Restrict python version to match with changes of ait-core and remove pkg_resources which has been deprecated.
  • Tox lint test was failing - had to make some updates to a few files to fix them.
  • Base python version is now 3.11

@EmilyPascua EmilyPascua requested a review from nttoole March 26, 2026 19:55
@EmilyPascua EmilyPascua requested review from a team as code owners March 26, 2026 19:55
@sonarqubecloud
Copy link
Copy Markdown

@EmilyPascua
Copy link
Copy Markdown
Author

EmilyPascua commented Apr 23, 2026

@nttoole This wasn't introduced in this PR. But SonarQube picked it up so I'm adding changes as requested.

lint run-test: commands[0] | python -m pre_commit run --color=always --all
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check for merge conflicts................................................Passed
Debug Statements (Python)................................................Passed
Reorder python imports...............................(no files to check)Skipped
mypy.....................................................................Passed
black................................................(no files to check)Skipped
flake8...................................................................Passed
_________________________________________________________________________________________ summary __________________________________________________________________________________________
  docs: commands succeeded
  lint: commands succeeded
  congratulations :)

Comment thread ait/gui/__init__.py Outdated
bytes: [2, 3],
name: "Voltage_B",
desc: "Voltage B as a 14-bit DN. Conversion to engineering units is TBD."
desc: "Voltage B as a 14-bit DN. Conversion to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume a line-width rule violation caused the edit, but I think it would be better to preserve the JSON as it was

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread ait/gui/__init__.py Outdated
bytes: [4, 5],
name: "Voltage_C",
desc: "Voltage C as a 14-bit DN. Conversion to engineering units is TBD."
desc: "Voltage C as a 14-bit DN. Conversion to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. - I added a noqa so the flake linter just ignore this.

Comment thread .python-version
@@ -0,0 +1 @@
3.11
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking if this should include '3.10' as well?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread readthedocs.yml
- none
python:
version: "3.8"
version: "3.11"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine here, tho I noted that AIT-Core's version of this file still has '3.8'

Copy link
Copy Markdown
Author

@EmilyPascua EmilyPascua May 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: Ah! Need to update AIT-DSN and AIT-Core to be consistent.

Comment thread tox.ini
@@ -1,26 +1,26 @@
[tox]
allowlist_externals = poetry
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to readthedocs comment, the contents of this tox.ini seems a bit different from AIT-Core's (Core lists py 310 and 311, mix of white/allow list_externals, etc)
Not sure if needed since this is a plugin, but wanted to check. Thanks

Copy link
Copy Markdown
Author

@EmilyPascua EmilyPascua May 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nttoole The tox tests just runs differently for AIT-GUI versus what we have for AIT-Core. In AIT-Core, we have Github actions configured (hence why those are supplied in the environment) and the tox tests actually run dynamically for multiple python versions. For AIT-GUI we have it set to the BasePython version of 3.11 (prior was 3.10) - Let me know if we should remain with Python 3.10.

Maybe an item for the future to make these tests more dynamic so it's running both 11 and 10.

Copy link
Copy Markdown
Contributor

@nttoole nttoole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EmilyPascua I am also seeing what looks like a couple of security-related fixes (re paths as args).
Could these please be split out to a separate PR - since we may need to specifically reference them in future security documentation? Thx

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

@EmilyPascua
Copy link
Copy Markdown
Author

Ready for review @nttoole !

@EmilyPascua EmilyPascua requested a review from nttoole May 5, 2026 22:56
Comment thread pyproject.toml Outdated

[tool.poetry.dependencies]
python = ">= 3.10 < 3.12"
ait-core = { path = "../AIT-Core", develop = true }
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing dev.

Comment thread .python-version
@@ -0,0 +1 @@
3.11
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread ait/gui/__init__.py Outdated
bytes: [4, 5],
name: "Voltage_C",
desc: "Voltage C as a 14-bit DN. Conversion to engineering units is TBD."
desc: "Voltage C as a 14-bit DN. Conversion to
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. - I added a noqa so the flake linter just ignore this.

Comment thread ait/gui/__init__.py Outdated
bytes: [2, 3],
name: "Voltage_B",
desc: "Voltage B as a 14-bit DN. Conversion to engineering units is TBD."
desc: "Voltage B as a 14-bit DN. Conversion to
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread ait/gui/__init__.py
name: "Voltage_B",
desc: "Voltage B as a 14-bit DN. Conversion to
engineering units is TBD."
desc: "Voltage B as a 14-bit DN. Conversion to engineering units is TBD." # noqa: B950
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding noqa: B950 so linter ignores.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants