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

More CI (mypy, coverage), setup pre-commit, formatting #24

Merged
merged 14 commits into from
Mar 14, 2023

Conversation

benbovy
Copy link
Owner

@benbovy benbovy commented Mar 14, 2023

No description provided.

docs/api.rst Outdated Show resolved Hide resolved
ExperimentalAutoDetectBinPacking: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: Inline
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't have any opinion about how C++ code should look like, and how much we want to customize compared to the base Google style (so happy to follow your preferences). But just to consider, s2geography just follows google (https://github.com/paleolimbot/s2geography/blob/master/.clang-format), and arrow uses only minimal overrides (https://github.com/apache/arrow/blob/main/.clang-format)

(but so +1 on adding a linter for this to enforce consistent style!)

Copy link
Owner Author

@benbovy benbovy Mar 14, 2023

Choose a reason for hiding this comment

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

I don't have strong opinions either and I think it is a good idea to stay close to the Google style used by s2geography and not add too much customization. This is just to fix some minor things I find annoying, like packing some of the parameters on the same line when all the parameters don't fit on one line, e.g., I prefer this:

m.def("equals",
      py::vectorize(Predicate(s2geog::s2_equals)),
      py::arg("a"),
      py::arg("b"));  

over this:

m.def("equals", py::vectorize(Predicate(s2geog::s2_equals)), py::arg("a"),
      py::arg("b"));  

Copy link
Collaborator

@jorisvandenbossche jorisvandenbossche Mar 14, 2023

Choose a reason for hiding this comment

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

As mentioned, I don't mind (as long as it is automated), so just follow your preferences ;)

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@eb437b6). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #24   +/-   ##
=======================================
  Coverage        ?   56.07%           
=======================================
  Files           ?        5           
  Lines           ?      214           
  Branches        ?       95           
=======================================
  Hits            ?      120           
  Misses          ?        7           
  Partials        ?       87           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@benbovy benbovy changed the title More CI (mypy), setup pre-commit, formatting More CI (mypy, coverage), setup pre-commit, formatting Mar 14, 2023
@benbovy
Copy link
Owner Author

benbovy commented Mar 14, 2023

Switching to micromamba make things even faster! Also the cache is a bit more reliable now (it seems to fix issues on Windows).

@jorisvandenbossche any other comment or suggestion before I merge this?

@benbovy benbovy merged commit e874e60 into main Mar 14, 2023
@benbovy benbovy deleted the pre-commit-ci-format branch March 14, 2023 13:57
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.

2 participants