Skip to content

Conversation

@john-hen
Copy link
Collaborator

@john-hen john-hen commented Oct 20, 2025

Includes:

  • cosmetic code changes
  • embrace UV
  • improved dev tooling
  • CI setup
  • docs updates

@john-hen john-hen marked this pull request as draft October 20, 2025 18:35
@john-hen john-hen force-pushed the maintenance branch 3 times, most recently from 85479d5 to fd854dc Compare October 25, 2025 18:41
@john-hen john-hen marked this pull request as ready for review October 25, 2025 18:42
@john-hen john-hen force-pushed the maintenance branch 11 times, most recently from 7333da5 to bcf1436 Compare October 29, 2025 19:57
So far, we've stuck to PEP 8, which states:
> For flowing long blocks of text with fewer structural restrictions
> (docstrings or comments), the line length should be limited to 72
> characters.

Let's just go with 79 characters everywhere. Makes it easier to remember
and also needs only one vertical line as a visual aid in the editor.
The Comsol 6.3 documentation also lists 'CADREADER' as an alias for the
look-up key `CADIMPORT` for the "CAD Import Module", but according to my
tests it's not actually a valid key, i.e.
`client.java.hasProduct('CADREADER')` raises "Invalid product name."
I don't remember why I required `Sphinx>= 8.2` in the first place, but
it may have had something to do with rendering the type annotations
in the API documentation. Which I've given up on… for now.

More importantly, though, it stops `uv sync` from resolving the
dependencies, as Sphinx 8.2+ does not support Python 3.10. But Sphinx
8.0 does.
Before, we had to run `tools/test.py --log` to have it display the
debug-level log messages produced by MPh, which is helpful when
trouble-shooting problems reported by users. This behavior is now the
default. The detailed log can be suppressed by passing `--quiet` to get
the old behavior. It does make it easier to see if all tests have passed
at a glance, and how long it all took.
We shouldn't assume the `tests` folder is writeable. So now we use a
temporary folder assigned by the operating system whenever outputting
test artifacts.
Also reordered the rule sets in `pyproject.toml`, starting with the few
single-letter rule sets, followed by the multiple-letter rule sets in
alphabetical order. Only the `RUF` rule set was added, with a small
subset of them set to be ignored.
Specifically, the `types.py` script would occasionally cause issues as
it shadows `types` module from the standard library.
Comsol 5.5 and 5.6 no longer work out of the box as the latest JPype
version (1.6) doesn't support Java 8, which these Comsol versions ship
with.
This makes bug reporting clearer in the case where users paste the
console output of the test suite, specifically the "discovery" part.
@john-hen john-hen merged commit 35c854b into MPh-py:main Oct 29, 2025
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.

1 participant