Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e47076d

Browse files
authored
Merge pull request #30 from mirca/main
update package structure
2 parents 579ced6 + 5b9297b commit e47076d

File tree

15 files changed

+34
-16
lines changed

15 files changed

+34
-16
lines changed

pyproject.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=40.6.0",
4+
"wheel",
5+
"setuptools_scm",
6+
"oldest-supported-numpy",
7+
"pybind11>=2.4",
8+
]
9+
build-backend = "setuptools.build_meta"
10+
11+
[tool.black]
12+
line-length = 79
13+
14+
[tool.isort]
15+
line_length = 79
16+
multi_line_output = 3
17+
include_trailing_comma = true
18+
force_grid_wrap = 0
19+
use_parentheses = true
20+
21+
[tool.pytest.ini_options]
22+
addopts = "-v"

requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __str__(self):
3333
ext_modules = [
3434
Extension(
3535
"riskparityportfolio.vanilla",
36-
["riskparityportfolio/vanilla.cpp"],
36+
["src/riskparityportfolio/vanilla.cpp"],
3737
include_dirs=[
3838
# Path to pybind11 headers
3939
get_pybind_include(),
@@ -69,7 +69,10 @@ def cpp_flag(compiler):
6969
if sys.platform == "darwin":
7070
flags = ["-std=c++14", "-std=c++11"]
7171
else:
72-
flags = ["-std=c++17", "-std=c++14", "-std=c++11"]
72+
flags = ["-std=c++20",
73+
"-std=c++17",
74+
"-std=c++14",
75+
"-std=c++11"]
7376

7477
for flag in flags:
7578
if has_flag(compiler, flag):
@@ -129,12 +132,16 @@ def build_extensions(self):
129132
url="https://github.com/dppalomar/riskparity.py",
130133
description="Blazingly fast design of risk parity portfolios",
131134
license="MIT",
132-
package_dir={"riskparityportfolio": "riskparityportfolio"},
135+
package_dir={"riskparityportfolio": "src/riskparityportfolio"},
133136
packages=["riskparityportfolio"],
134137
long_description="",
135138
ext_modules=ext_modules,
136-
install_requires=["pybind11>=2.4", "numpy", "jaxlib", "jax", "quadprog", "tqdm"],
137-
setup_requires=["pybind11>=2.4", "numpy", "jaxlib", "jax", "quadprog", "tqdm"],
139+
setup_requires=["pybind11>=2.4",
140+
"numpy",
141+
"jaxlib",
142+
"jax",
143+
"quadprog>=0.1.12",
144+
"tqdm"],
138145
cmdclass={"build_ext": BuildExt},
139146
classifiers=[
140147
"Development Status :: 3 - Alpha",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)