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

Add Hypothesis tests for Feature and FeatureCollection #222

Open
cleder opened this issue Mar 30, 2024 · 6 comments
Open

Add Hypothesis tests for Feature and FeatureCollection #222

cleder opened this issue Mar 30, 2024 · 6 comments

Comments

@cleder
Copy link
Owner

cleder commented Mar 30, 2024

No description provided.

@uchiha-vivek
Copy link

@cleder Sir can you please assign me this issue . I know how to make hypothesis tests .

@cleder
Copy link
Owner Author

cleder commented Sep 27, 2024

OK done.

Setting Up Your Environment

Fork the repository and clone your fork to your local machine:

git clone https://github.com/uchiha-vivek/pygeoif.git
cd pygeoif
git checkout develop

Next, set up a virtual environment. This helps to manage dependencies and avoid conflicts:

python3 -m venv .venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

Then, install the required packages:

pip install -e ".[dev]"

Install the pre-commit hook with:

pre-commit install

and check the code with:

pre-commit run --all-files

Running the Tests

To run the tests, simply use:

pytest

You can also run the tests with coverage
to see which lines are covered by the tests.
This is useful for writing new tests to cover any uncovered lines:

pytest  --cov=pygeoif --cov-report=term

To get a report on the individual lines that are not covered, use the
--cov-report=term-missing option, or generate an HTML report with
--cov-report=html.
Some editor extensions can also show the coverage directly in the editor, notably
coverage-gutter
for VSCode, which needs the output to be in the xml format produced with
--cov-report=xml.

Tips

  • Commit often, commit early.
  • Make a draft PR while you are still working on it to give your work some visibility.

@cleder
Copy link
Owner Author

cleder commented Sep 27, 2024

There are already hypothesis strategies in https://github.com/cleder/pygeoif/blob/develop/pygeoif/hypothesis/strategies.py so no need to reinvent the wheel

@uchiha-vivek
Copy link

ok sir @cleder , sir can you please brief it more . Like do we need to use all the strategies or some specefic ones

@cleder
Copy link
Owner Author

cleder commented Sep 28, 2024

Only those which make sense. Features are used in GeoJson which means you only have to test against epsg4326.

@uchiha-vivek
Copy link

Thank you @cleder

@cleder cleder linked a pull request Oct 2, 2024 that will close this issue
@cleder cleder moved this to Todo in pygeoif Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants