Skip to content

Commit

Permalink
ENH: broader poetry/pip dependencies (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAuriau authored Jul 31, 2024
1 parent ffa3bda commit be89983
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
49 changes: 24 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ quote-style = "double"
[tool.ruff.isort]
known-first-party = ["choice_learn", "config", "tests"]

[tool.ruff.lint]

[tool.bandit.assert_used]
exclude_dirs = ["tests/"]

[tool.pytest.ini_options]
pythonpath = ["./"]
testpaths = ["tests/"]

[tool.poetry]
name = "choice-learn"
Expand All @@ -76,33 +75,33 @@ classifiers = [
]

[tool.poetry.dependencies]
python = "^3.9.0"
numpy = "^1.24.3"
pandas = "^1.5.3"
tensorflow = "^2.14.0"
tensorflow-probability = "^0.22.1"
tqdm = "^4.0.0"
ortools = { version = "^9.6", optional = true }
gurobipy = { version = "^11.0", optional = true }
python = "~3.9"
numpy = ">=1.24"
pandas = ">= 1.5.3"
tensorflow = "~2.14, <2.17.0"
tensorflow-probability = "~0.22"
tqdm = ">=4.0.0"
ortools = { version = "~9.6", optional = true }
gurobipy = { version = "~11.0", optional = true }

[tool.poetry.group.dev.dependencies]
pytest = "^7.3.2"
pre-commit = "^3.3"
ipykernel = "^6.9"
nbstripout = "^0.7"
ruff = "^0.1.2"
pytest-cov = "^4.1"
codespell = "^2.2"
python-markdown-math = "^0.8"
pytest = ">=7.3.2"
pre-commit = ">=3.3"
ipykernel = ">=6.9"
nbstripout = ">=0.7"
ruff = ">=0.1.2"
pytest-cov = ">=4.1"
codespell = ">=2.2"
python-markdown-math = ">=0.8"

[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5"
mkdocs-material = {extras = ["pygments"], version = "^9.5.3"}
mkdocs-nbconvert = "^0.2.1"
mkdocstrings-python = "^1.7.5"
python-markdown-math = "^0.8"
bandit = "^1.7.5"
nbstripout = "^0.7"
mkdocs = ">=1.5"
mkdocs-material = {extras = ["pygments"], version = ">=9.5.3"}
mkdocs-nbconvert = ">=0.2.1"
mkdocstrings-python = ">=1.7.5"
python-markdown-math = ">=0.8"
bandit = ">=1.7.5"
nbstripout = ">=0.7"

[build-system]
requires = ["poetry-core"]
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
numpy>=1.24.3
pandas~=1.5
tensorflow~=2.14
numpy>=1.24
pandas>=1.5
tensorflow>=2.14, <2.17
tensorflow_probability~=0.22
tf_keras~=2.17
tqdm~=4.0
tf_keras<3
tqdm>=4.0

3 comments on commit be89983

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage

Coverage Report for Python 3.11
FileStmtsMissCoverMissing
choice_learn
   tf_ops.py471764%45, 141–143, 199–203, 220–231
choice_learn/data
   choice_dataset.py62817971%67, 78, 101–112, 123, 145–153, 159, 168–177, 190–203, 221–288, 306–325, 333–339, 341, 353, 394–401, 408, 420, 450–451, 472, 482–483, 491, 519, 552, 559–568, 576–578, 585, 592, 633–634, 713, 727–733, 756–759, 829, 831, 867, 921, 926, 937–938, 969–970, 974–981, 986–997, 1004, 1008, 1102, 1116, 1135–1137, 1150–1152, 1180, 1185, 1194, 1206–1211, 1252, 1264, 1278, 1293, 1305, 1317, 1332, 1337, 1360, 1362, 1366, 1374–1375, 1379, 1387–1388, 1394–1398, 1403–1407, 1411, 1414–1415, 1462, 1479–1480, 1495, 1510
   indexer.py2337070%20, 31, 45, 60–67, 99, 103, 105–108, 179, 184–187, 203–205, 220–231, 261, 266, 288, 292, 336, 393, 409, 423, 492–493, 517, 524, 532, 545–567, 570–591, 601, 613
   storage.py1592386%22, 33, 51, 56, 61, 71, 151, 153, 160, 162, 166, 173, 176, 235–236, 262, 267, 295, 365, 371, 389, 419, 429
   store.py72720%2–274
choice_learn/datasets
   base.py34320141%36, 61–68, 90–96, 118, 185, 191–220, 225–294, 309–358, 373–405, 414–481, 566–578, 581–584, 587, 594–605, 609–622, 631–657, 665, 671, 738, 825, 870, 919, 1004
   expedia.py1029210%26–299
   tafeng.py49198%50
choice_learn/models
   __init__.py12283%12–13
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py1861860%3–609
   latent_class_mnl.py59590%3–299
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2382380%2–674
   or_tools_opt.py2262260%3–666
TOTAL3687220740% 

Tests Skipped Failures Errors Time
59 0 💤 0 ❌ 0 🔥 46.953s ⏱️

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage

Coverage Report for Python 3.9
FileStmtsMissCoverMissing
choice_learn
   tf_ops.py471764%45, 141–143, 199–203, 220–231
choice_learn/data
   choice_dataset.py62817971%67, 78, 101–112, 123, 145–153, 159, 168–177, 190–203, 221–288, 306–325, 333–339, 341, 353, 394–401, 408, 420, 450–451, 472, 482–483, 491, 519, 552, 559–568, 576–578, 585, 592, 633–634, 713, 727–733, 756–759, 829, 831, 867, 921, 926, 937–938, 969–970, 974–981, 986–997, 1004, 1008, 1102, 1116, 1135–1137, 1150–1152, 1180, 1185, 1194, 1206–1211, 1252, 1264, 1278, 1293, 1305, 1317, 1332, 1337, 1360, 1362, 1366, 1374–1375, 1379, 1387–1388, 1394–1398, 1403–1407, 1411, 1414–1415, 1462, 1479–1480, 1495, 1510
   indexer.py2337070%20, 31, 45, 60–67, 99, 103, 105–108, 179, 184–187, 203–205, 220–231, 261, 266, 288, 292, 336, 393, 409, 423, 492–493, 517, 524, 532, 545–567, 570–591, 601, 613
   storage.py1592386%22, 33, 51, 56, 61, 71, 151, 153, 160, 162, 166, 173, 176, 235–236, 262, 267, 295, 365, 371, 389, 419, 429
   store.py72720%2–274
choice_learn/datasets
   base.py34320241%38–39, 61–68, 90–96, 118, 185, 191–220, 225–294, 309–358, 373–405, 414–481, 566–578, 581–584, 587, 594–605, 609–622, 631–657, 665, 671, 738, 825, 870, 919, 1004
   expedia.py1029210%26–299
   tafeng.py49198%50
choice_learn/models
   __init__.py12283%12–13
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py1861860%3–609
   latent_class_mnl.py59590%3–299
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2362360%2–674
   or_tools_opt.py2262260%3–666
TOTAL3685220640% 

Tests Skipped Failures Errors Time
59 0 💤 0 ❌ 0 🔥 45.232s ⏱️

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage

Coverage Report for Python 3.10
FileStmtsMissCoverMissing
choice_learn
   tf_ops.py471764%45, 141–143, 199–203, 220–231
choice_learn/data
   choice_dataset.py62817971%67, 78, 101–112, 123, 145–153, 159, 168–177, 190–203, 221–288, 306–325, 333–339, 341, 353, 394–401, 408, 420, 450–451, 472, 482–483, 491, 519, 552, 559–568, 576–578, 585, 592, 633–634, 713, 727–733, 756–759, 829, 831, 867, 921, 926, 937–938, 969–970, 974–981, 986–997, 1004, 1008, 1102, 1116, 1135–1137, 1150–1152, 1180, 1185, 1194, 1206–1211, 1252, 1264, 1278, 1293, 1305, 1317, 1332, 1337, 1360, 1362, 1366, 1374–1375, 1379, 1387–1388, 1394–1398, 1403–1407, 1411, 1414–1415, 1462, 1479–1480, 1495, 1510
   indexer.py2337070%20, 31, 45, 60–67, 99, 103, 105–108, 179, 184–187, 203–205, 220–231, 261, 266, 288, 292, 336, 393, 409, 423, 492–493, 517, 524, 532, 545–567, 570–591, 601, 613
   storage.py1592386%22, 33, 51, 56, 61, 71, 151, 153, 160, 162, 166, 173, 176, 235–236, 262, 267, 295, 365, 371, 389, 419, 429
   store.py72720%2–274
choice_learn/datasets
   base.py34320141%36, 61–68, 90–96, 118, 185, 191–220, 225–294, 309–358, 373–405, 414–481, 566–578, 581–584, 587, 594–605, 609–622, 631–657, 665, 671, 738, 825, 870, 919, 1004
   expedia.py1029210%26–299
   tafeng.py49198%50
choice_learn/models
   __init__.py12283%12–13
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py1861860%3–609
   latent_class_mnl.py59590%3–299
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2382380%2–674
   or_tools_opt.py2262260%3–666
TOTAL3687220740% 

Tests Skipped Failures Errors Time
59 0 💤 0 ❌ 0 🔥 47.230s ⏱️

Please sign in to comment.