Closed bpshaver closed 8 months ago
AI Summary deactivated by bpshaver
#1 - fetch upstream - By cleder 2 years ago
#224 - [pre-commit.ci] pre-commit autoupdate - By pre-commit-ci[bot] 7 months ago
#26 - Editing ... - By jean 9 years ago
No results found in Jira Tickets :(
No results found in Confluence Docs :(
No results found in Slack Threads :(
No results found in Notion Pages :(
No results found in Linear Tickets :(
No results found in Asana Tasks :(
pygeoif is an open repo and Watermelon will serve it for free. ππ«Ά Why not invite more people to your team?
Update .gitignore
File
We've updated the .gitignore
file to include .hypothesis
, which will ensure that certain data won't be committed to the repository.
Improved Documentation
Updates were made to the text descriptions ('docstrings') for the convex_hull
method, as well as is_empty
method for Point
and LineString
geometries. This will provide clearer guidelines and understanding for users and developers about these functionalities.
Update to pyproject.toml
File
This Pull Request adds hypothesis
to the list of tools needed for the tests in the pyproject.toml
file. This shows that hypothesis testing framework will be used in our testing process.
Addition of conftest.py
to Tests
A new conftest.py
file was added to the tests directory. It includes strategies for generating test data, enhancing the scope and variety of our testing ecosystem.
Enhancements to test_point.py
Test
We've made some improvements to our test_point.py
test. A new test function, test_repr_eval_hypothesis_epsg_4326
, was added that uses the given
decorator from hypothesis
to generate test data. This function tests the repr
and eval
methods of Point
geometry, enhancing the robustness of our test suite.
Attention: 3 lines
in your changes are missing coverage. Please review.
Comparison is base (
ff2e39c
) 100.00% compared to head (84ed536
) 99.87%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I would prefer another file layout and not putting the strategies in conftests
and keeping the hypothesis tests separate from the classic unit tests:
tests
test_point.py
test_linestring.py
hypothesis
__init__.py
strategies.py
test_geometries.py
test_multigeometries.py
test_faetures.py
The SRS could be defined as a dataclass
like
@dataclass(frozen=True)
class Srs:
name: str
min_xyz : Tuple[float, float, Optional[float]]
max_xyz : Tuple[float, float, Optional[float]]
an instance of an srs can optionally be passed into the points
, points_2d
, points_3d
strategies, if none is provided there would be no max_value
, min_value
set for the st.floats
def points_3d(draw, srs: Optional[Srs]):
...
and
def points_2d(draw, srs: Optional[Srs] = None):
easting = (None, None)
northing = (None, None)
elevation = (None, None)
if srs:
easting = (srs.min_xyz[0], srs.max_xyz[0]
...
epsg4326 = Srs(name="EPSG:4326", min_xyz =(-90, 0, None), max_xyz=(90, 180, None)
Hope that helps :+1: nice work
AI Summary deactivated by bpshaver
#186 - test: initial commit adding hypothesis property testing library - By bpshaver 19 hours ago
#265 - [pre-commit.ci] pre-commit autoupdate - By pre-commit-ci[bot] 2 hours ago
#187 - [pre-commit.ci] pre-commit autoupdate - By pre-commit-ci[bot] 2 hours ago
No results found in Jira Tickets :(
No results found in Confluence Docs :(
No results found in Slack Threads :(
No results found in Notion Pages :(
No results found in Linear Tickets :(
No results found in Asana Tasks :(
pygeoif is an open repo and Watermelon will serve it for free. ππ«Ά
You can add an 'exclude' to the name-tests-test
pre-commit
hook in .pre-commit-config.yaml
- id: name-tests-test
exclude: ^tests/hypothesis/strategies.py$
Are you still working on this?
Hi, sorry. Will try and get to this tomorrow. But if you want to press on ahead I won't be offended if you remove me from this issue.
No, no worries, we all got a (private) life apart from coding, but I thought I'd better ask, as abandoning an issue is not uncommon. I did not want to put pressure on you, just wanted clarification if it is still of interest
@CodiumAI-Agent /describe
Integrate Hypothesis Testing Library and Improve Grammar in Comments
Tests, Enhancement
This PR integrates the Hypothesis property-based testing library into the project and adds new test strategies in the 'conftest.py' file. It also improves the grammar in the comments of the 'geometry.py' file. Additionally, a new test case using Hypothesis has been added in 'test_point.py'. The Hypothesis library has been added as a dependency in 'pyproject.toml'.
Relevant files | |||||
---|---|---|---|---|---|
Documentation | 1 files
| ||||
Tests | 2 files
| ||||
Dependencies | 1 files
|
Adding the Hypothesis cache dir to .gitignore Grammar fixes in geometry.py Hypothesis dep in pyproject.toml without version peg Initial strategies in conftest.py. This is the only file name I could use that didn't cause an issue with the name-tests-test pre-commit hook. 'strategies.py' would be better because strictly speaking these aren't fixtures. An example test for encode/decode invariance.
@CodiumAI-Agent /review
π― Main theme: Adding Hypothesis property testing library and modifying some grammar in the code.
π PR summary: This PR introduces the Hypothesis property testing library into the project, adds it as a dependency in pyproject.toml, and includes some initial strategies for testing in conftest.py. Additionally, it modifies some grammar in the geometry.py file.
π Type of PR: Tests
π§ͺ Relevant tests added: Yes
β±οΈ Estimated effort to review [1-5]: 2, because the PR is relatively small and straightforward, mainly adding a new testing library and some initial testing strategies. The changes to the existing code are minor and mostly related to grammar.
π Security concerns: No security concerns found
π‘ General suggestions: The PR is well-structured and the changes are clear. The addition of the Hypothesis library for property testing is a good move for improving the robustness of the tests. However, it would be beneficial to include more comments in the conftest.py file to explain the purpose and usage of the strategies.
@CodiumAI-Agent /improve
you may be interested in #219 or #220 ;-)
Adding the Hypothesis cache dir to .gitignore Grammar fixes in geometry.py Hypothesis dep in pyproject.toml without version peg Initial strategies in conftest.py. This is the only file name I could use that didn't cause an issue with the name-tests-test pre-commit hook. 'strategies.py' would be better because strictly speaking these aren't fixtures. An example test for encode/decode invariance.