Skip to content

Commit

Permalink
trying out new pre-commit.ci
Browse files Browse the repository at this point in the history
  • Loading branch information
FilippoAiraldi committed Oct 24, 2024
1 parent 3d85d86 commit 93c5922
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
File renamed without changes.
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ repos:
hooks:
- id: black

- repo: local
hooks:
- id: coverage
name: coverage
entry: coverage run -m unittest discover tests
language: system
pass_filenames: false
always_run: true
verbose: true
stages: [manual] # pre-push
# - repo: local
# hooks:
# - id: coverage
# name: coverage
# entry: coverage run -m unittest discover tests
# language: system
# pass_filenames: false
# always_run: true
# verbose: true
# stages: [manual] # pre-push
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ optimization purposes.
[![Maintainability](https://api.codeclimate.com/v1/badges/d1cf537cff6af1a08508/maintainability)](https://codeclimate.com/github/FilippoAiraldi/casadi-nlp/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/d1cf537cff6af1a08508/test_coverage)](https://codeclimate.com/github/FilippoAiraldi/casadi-nlp/test_coverage)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FilippoAiraldi/casadi-nlp/experimental.svg)](https://results.pre-commit.ci/latest/github/FilippoAiraldi/casadi-nlp/experimental)

---

Expand Down
11 changes: 7 additions & 4 deletions docs/banners.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
|PyPI version| |Source Code License| |Python 3.9|

|Tests| |Docs| |Downloads| |Maintainability| |Test Coverage| |Code style: black|
|Tests| |Docs| |Downloads| |Maintainability| |Test Coverage| |Code style: black| |Pre-commit CI|

.. |PyPI version| image:: https://badge.fury.io/py/csnlp.svg
:target: https://badge.fury.io/py/csnlp
Expand All @@ -10,8 +10,8 @@
:alt: MIT License
.. |Python 3.9| image:: https://img.shields.io/badge/python-%3E=3.9-green.svg
:alt: Python 3.9
.. |Tests| image:: https://github.com/FilippoAiraldi/casadi-nlp/actions/workflows/test-main.yml/badge.svg
:target: https://github.com/FilippoAiraldi/casadi-nlp/actions/workflows/test-main.yml
.. |Tests| image:: https://github.com/FilippoAiraldi/casadi-nlp/actions/workflows/tests.yml/badge.svg
:target: https://github.com/FilippoAiraldi/casadi-nlp/actions/workflows/tests.yml
:alt: Tests
.. |Docs| image:: https://readthedocs.org/projects/casadi-nlp/badge/?version=latest
:target: https://casadi-nlp.readthedocs.io/en/latest/?badge=latest
Expand All @@ -27,4 +27,7 @@
:alt: Test Coverage
.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: blacks
:alt: Black
.. |Pre-commit CI| image:: https://results.pre-commit.ci/badge/github/FilippoAiraldi/casadi-nlp/experimental.svg
:target: https://results.pre-commit.ci/latest/github/FilippoAiraldi/casadi-nlp/experimental
:alt: Status pre-commit.ci
2 changes: 1 addition & 1 deletion src/csnlp/util/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def log(
"""
if base is None:
return cs.log(x)
if base == 10 or base == 10.0:
if base == 10 or base == 10.0:
return cs.log10(x)
return cs.log(x) / cs.log(base)

Expand Down

0 comments on commit 93c5922

Please sign in to comment.