Skip to content
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

Rename functions with is_ consistently #3627

Merged
merged 5 commits into from
Aug 19, 2024
Merged

Rename functions with is_ consistently #3627

merged 5 commits into from
Aug 19, 2024

Conversation

schillic
Copy link
Member

This library seems to have the convention that a function name is x is written isx if x is one word, and is_y_z if x is at least two words y z. The exception is if z is type, as in isboundedtype, since this is a modification of isbounded and adding the underscores would obscure that connection.

The renamings done here are:

  1. is_polyhedralispolyhedral
  2. is_hyperplanarishyperplanar
  3. _is_hyperplane_ishyperplanar
  4. _is_halfspace_ishalfspace
  5. _is_linearcombination_is_linear_combination

Of these, 1. and 2. are breaking changes. The other three functions are internal. 3. also renames plane -> planar to be closer to the API function.

There are two more API functions starting with is_: is_intersection_empty and is_interior_point. As described above, they fall in the second pattern, so I kept their names. (One can consider renaming is_interior_point closer to in, for instance to in_interior.)

@schillic schillic added the breaking ❌ This change may break things label Jul 27, 2024
@schillic schillic marked this pull request as ready for review July 27, 2024 09:31
@schillic schillic merged commit 07ce00a into master Aug 19, 2024
7 checks passed
@schillic schillic deleted the schillic/rename_is branch August 19, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking ❌ This change may break things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants