Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@leehach
Copy link

@leehach leehach commented Jan 13, 2026

Proposed fixes to #403 .

Commit includes the following changes:

  1. Very minor code change to _cast(). Replaces nested if; if; else with if;elif;else.
  2. Replaced standalone formula in isoareal_quotient() with square root of isoperimetric_quotient(). Tested against builtin example data virginia, and the new version yields the same result.
  3. Expanded docstring for both functions. Removed some of the math from isoperimetric_quotient() while providing LaTeX math formulas for both functions.

I have tested the code, but regarding 3, I do not have my environment set up for producing documentation. I will follow up with someone on how to do that, but if a maintainer already has that set up and wants to check that the docstrings work, and in particular the math equations, that would be great.

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.7%. Comparing base (bb0f069) to head (d53ef41).

Files with missing lines Patch % Lines
esda/shape.py 75.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #405     +/-   ##
=======================================
- Coverage   82.7%   82.7%   -0.0%     
=======================================
  Files         27      27             
  Lines       3829    3828      -1     
=======================================
- Hits        3166    3165      -1     
  Misses       663     663             
Files with missing lines Coverage Δ
esda/shape.py 77.0% <75.0%> (-0.1%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@martinfleis
Copy link
Member

If you install these to your env, then you should be able to build the docs by navigating to docs and running make html.

  - nbsphinx
  - numpydoc
  - pandoc
  - sphinx
  - sphinxcontrib-bibtex
  - sphinx_bootstrap_theme

@leehach
Copy link
Author

leehach commented Jan 13, 2026

When I run make html, sphinx attempts to import esda, but since I am developing esda in this environment, I don't have it installed. How do I get around this?

@martinfleis
Copy link
Member

I normally install editable versions of packages to my environment.

pip install . -e

@leehach
Copy link
Author

leehach commented Jan 13, 2026

I normally install editable versions of packages to my environment.

pip install . -e

Had to change to:

pip install -e .

which worked.

Docs compiled successfully (I didn't break anything) and the equations rendered correctly.

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

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

Thanks!

@martinfleis martinfleis requested a review from ljwolf January 14, 2026 08:17
@martinfleis martinfleis linked an issue Jan 14, 2026 that may be closed by this pull request
Where :math:`A` is the area of the polygon and :math:`P` is the perimeter of the polygon.
However, the :math:`IAQ` is merely the square root of the Isoperimetric quotient, and is
Copy link
Member

@ljwolf ljwolf Jan 14, 2026

Choose a reason for hiding this comment

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

Suggested change
However, the :math:`IAQ` is merely the square root of the Isoperimetric quotient, and is
With some manipulation, :math:`IAQ` can also be expressed as the square root of the Isoperimetric quotient, given by

It's not clear what "however" is negating, and "merely" is condescending.

@ljwolf
Copy link
Member

ljwolf commented Jan 14, 2026

I've just got one change, and then it's all fine w/ me!

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.

Use isoperimetric_quotient to calculate isoareal_quotient

3 participants