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

Don't treat warnings as errors. #640

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

sebastic
Copy link
Contributor

Using -Werror in CI is good, it is not a good default for downstream distributions where new warnings by toolchain updates causes the build to fail.

Importing dateutil.parser causes a DeprecationWarning:

  /usr/lib/python3/dist-packages/dateutil/tz/tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    EPOCH = datetime.datetime.utcfromtimestamp(0)

Importing dateutil.parser causes a DeprecationWarning.
@gadomski
Copy link
Member

-Werror is just for pytest, so shouldn't affect downstream users?

@sebastic
Copy link
Contributor Author

-Werror is just for pytest, so shouldn't affect downstream users?

The Debian package build runs python3.12 -m pytest in its test target, which causes the build to fail due to -Werror in pyproject.toml.

Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

Makes sense, but can you add -Werror to the CI test invocation so we still catch warnings in our Github CI?

@sebastic
Copy link
Contributor Author

Makes sense, but can you add -Werror to the CI test invocation so we still catch warnings in our Github CI?

You already do that:

        run: pytest -Werror -s --block-network --cov pystac_client --cov-report term-missing

https:/stac-utils/pystac-client/blob/main/.github/workflows/continuous-integration.yml#L42

@gadomski
Copy link
Member

🙃 thanks! Clearly I'm not on my game this morning ... appreciate it :-).

@gadomski gadomski enabled auto-merge (squash) February 12, 2024 15:49
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (21435b0) 93.43% compared to head (c7e1c81) 93.44%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #640   +/-   ##
=======================================
  Coverage   93.43%   93.44%           
=======================================
  Files          13       13           
  Lines         990      991    +1     
=======================================
+ Hits          925      926    +1     
  Misses         65       65           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gadomski gadomski merged commit 1a1a2d6 into stac-utils:main Feb 12, 2024
18 checks passed
@sebastic sebastic deleted the pytest-Werror branch February 12, 2024 16:11
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