Skip to content

Commit

Permalink
Bring in deptry (#420)
Browse files Browse the repository at this point in the history
* Update basic.yml

* Update __init__.py

* Update builder.py

* Update portfolio.py

* Update pyproject.toml
  • Loading branch information
tschm authored Oct 27, 2024
1 parent 99eee5b commit c2b0e3c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ jobs:
with:
files: artifacts/tests/coverage/coverage.info
format: lcov

deptry:
runs-on: ubuntu-latest
steps:
- uses: cvxgrp/.github/actions/deptry@main
8 changes: 4 additions & 4 deletions cvx/simulator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from cvx.simulator.builder import Builder
from cvx.simulator.portfolio import Portfolio
from cvx.simulator.state import State
from cvx.simulator.utils.interpolation import interpolate
from .builder import Builder
from .portfolio import Portfolio
from .state import State
from .utils.interpolation import interpolate
8 changes: 4 additions & 4 deletions cvx/simulator/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import numpy as np
import pandas as pd

from cvx.simulator.portfolio import Portfolio
from cvx.simulator.state import State
from cvx.simulator.utils.interpolation import valid
from cvx.simulator.utils.rescale import returns2prices
from .portfolio import Portfolio
from .state import State
from .utils.interpolation import valid
from .utils.rescale import returns2prices


@dataclass
Expand Down
4 changes: 2 additions & 2 deletions cvx/simulator/portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import plotly.graph_objects as go
from plotly.subplots import make_subplots

from cvx.simulator.utils.metric import sharpe
from cvx.simulator.utils.rescale import returns2prices
from .utils.metric import sharpe
from .utils.rescale import returns2prices


@dataclass(frozen=True)
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ target-version = "py310"
exclude = [
"*__init__.py",
]

[tool.deptry.per_rule_ignores]
DEP002 = ["ipython", "quantstats", "jsonschema", "fastjsonschema"]

0 comments on commit c2b0e3c

Please sign in to comment.