Skip to content

Conversation

@john-hen
Copy link
Collaborator

No description provided.

john-hen and others added 10 commits May 18, 2025 10:41
This required a bit of refactoring in the discovery code. We now detect
the platform architecture right upfront and use it to inform our
expectation of the name of Comsol's binary folder, such as `win64` or
`macarm64`. We don't expect it to behave any different on platforms that
were previously already supported.
There may be situations where multiple installations of the same Comsol
versions exist on the same machine, but the (current) user wants to pick
the one which has a single-user license in their name. The easiest way
to do that is to just change that user's PATH variable once and for all.

Related discussion: MPh-py#172
@john-hen john-hen marked this pull request as draft October 20, 2025 18:35
These older Python versions have reached end of life, no longer receive
even security fixes. What hurts us more, however, is that modern dev
tools, such as UV and Ruff, are not aware of Python 3.6, and thus
require work-arounds to include it.
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 documentation also list '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.
@john-hen john-hen marked this pull request as ready for review October 25, 2025 18:42
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