Skip to content

172 unrecognized units (Again)#190

Open
rprospero wants to merge 21 commits intorefactor_24from
172_unrecognized_units
Open

172 unrecognized units (Again)#190
rprospero wants to merge 21 commits intorefactor_24from
172_unrecognized_units

Conversation

@rprospero
Copy link
Contributor

As mentioned in #172, users might want to track units that aren't necessarily SI measurements (e.g. Slices per Pizza, Pages per Book). This PR adds an ArbitraryUnits class which can track these sorts of units while still interactive with the regular Units and NamedUnits` classes.

It also contains a modernisation of the utest_units.py test file so that the tests can be properly searched and controlled through pytest.

This is a continuation of #188. A slip of the finger led to this branch being force pushed to refactor_24, which caused GitHub to believe that the PR was merged. I fixed and rolled-back the branch, but it is a known github issue that the PR cannot be restored after.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@rprospero rprospero requested review from DrPaulSharp and krzywon March 3, 2026 15:33
Copy link
Collaborator

@krzywon krzywon left a comment

Choose a reason for hiding this comment

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

A couple more comments.

codescene-delta-analysis[bot]

This comment was marked as outdated.

Copy link
Contributor

@DrPaulSharp DrPaulSharp left a comment

Choose a reason for hiding this comment

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

A couple of things from me alongside Jeff's comments.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@rprospero rprospero force-pushed the 172_unrecognized_units branch from 01deb22 to 7f9de96 Compare March 17, 2026 11:33
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

No quality gates enabled for this code.

See analysis details in CodeScene

Quality Gate Profile: Custom Configuration
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Copy link
Collaborator

@krzywon krzywon left a comment

Choose a reason for hiding this comment

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

I think this is ready now. My only comment is outside the scope of this PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The more I look at units.py, the more I think this needs to be added to .gitignore and just let the build system worry about it. Why do we have the same content twice?

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