Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
841 commits
Select commit Hold shift + click to select a range
433a70f
RM: useless file
VincentAuriau Jun 13, 2024
19c2a24
Merge branch 'main' into joss
VincentAuriau Jun 13, 2024
3a469ec
ADD: DOIs (#105)
VincentAuriau Jun 13, 2024
90d9d2a
Paper (#106)
VincentAuriau Jun 13, 2024
fc4f2ae
Paper (#108)
VincentAuriau Jun 17, 2024
e21e251
Update README.md (#107)
ma-aouad Jun 17, 2024
567ffeb
ENH: small enhancements
VincentAuriau Jun 17, 2024
3618b37
Paper length reduction (#109)
VincentAuriau Jun 24, 2024
b62f9eb
ENH/FIX: Notebooks & Documentation (#110)
VincentAuriau Jun 24, 2024
428e7f7
Enh/doc (#112)
VincentAuriau Jun 24, 2024
0d39d0a
merge
VincentAuriau Jun 24, 2024
e92ad77
Enh/doc (#113)
VincentAuriau Jun 24, 2024
bce01ac
Merge branch 'main' into joss
VincentAuriau Jun 26, 2024
1af1e64
Hotfix/storage (#111)
VincentAuriau Jul 1, 2024
24102aa
Enh/mkdocs (#114)
VincentAuriau Jul 1, 2024
610165a
Fix/tf tfp compat (#115)
VincentAuriau Jul 1, 2024
b43e6be
Hotfix/storage (#117)
VincentAuriau Jul 3, 2024
9d9288a
Small enhancements to the ReadMe (#120)
VincentAuriau Jul 4, 2024
421abc1
Update poetry.lock (#119)
VincentAuriau Jul 4, 2024
fc9df7e
Change version to v0.0.5 (#121)
VincentAuriau Jul 4, 2024
be1a5b5
small fix
VincentAuriau Jul 4, 2024
a1ec487
ENH: default n_epochs for Latent models is now 100 (#122)
VincentAuriau Jul 10, 2024
ed59165
FIX: RUMnet regularization & evaluate (#126)
VincentAuriau Jul 11, 2024
9894ea1
removed back quotes from title
VincentAuriau Jul 15, 2024
b131fdc
Merge branch 'main' of github.com:artefactory/choice-learn-private
VincentAuriau Jul 16, 2024
068239f
Enh/tqdm bar (#128)
VincentAuriau Jul 17, 2024
7a05f9e
Merge branch 'main' of github.com:artefactory/choice-learn-private
VincentAuriau Jul 17, 2024
dc103bc
ADD: coverage in PR CI from example (#130)
VincentAuriau Jul 17, 2024
132a8e3
Merge branch 'main' of github.com:artefactory/choice-learn-private
VincentAuriau Jul 19, 2024
bb87e2b
ENH: dataset is now always choice_dataset
VincentAuriau Jul 19, 2024
ae3f6b8
FIX: Baseline models with latest improvements and changes
VincentAuriau Jul 19, 2024
d49de22
ADD: Basic tests for baseline models
VincentAuriau Jul 19, 2024
4870c05
ENH: unification of argument: dataset -> choice_dataset
VincentAuriau Jul 19, 2024
f4e9cda
ADD: *args for positional argumenting
VincentAuriau Jul 19, 2024
82152d3
Merge pull request #131 from artefactory/dev-tests
VincentAuriau Jul 19, 2024
f824df9
ENH: Python badge (#132)
VincentAuriau Jul 19, 2024
883cb65
FIX: ReadMe example (#125)
VincentAuriau Jul 19, 2024
e0acb2d
ADD: additional tests for baseline models (#133)
VincentAuriau Jul 22, 2024
118b461
ENH: requirements.txt allow for broader versions of dependencies (#134)
VincentAuriau Jul 25, 2024
a78ccb1
ENH: coverage in workflows (#135)
VincentAuriau Jul 25, 2024
eb8a66c
ENH: Coverage in actions : 1 comment by Python version (#136)
VincentAuriau Jul 25, 2024
efff23c
ENH: ChoiceModel.trainable_weights as @property (#116)
VincentAuriau Jul 25, 2024
ffa3bda
Change version to v0.0.6 (#138)
VincentAuriau Jul 25, 2024
be89983
ENH: broader poetry/pip dependencies (#139)
VincentAuriau Jul 31, 2024
2b0034c
Fix dependencies (#141)
VincentAuriau Jul 31, 2024
97a5721
Change version to v0.0.7 (#140)
VincentAuriau Jul 31, 2024
764b708
FIX: tfp version >=0.22 (#142)
VincentAuriau Aug 1, 2024
8f5a45f
update poetry.lock file (#143)
VincentAuriau Aug 1, 2024
81e9af2
Change version to v0.0.8 (#144)
VincentAuriau Aug 2, 2024
b7b3ef7
Enh/cov (#137)
VincentAuriau Aug 2, 2024
ca43710
Enhance Paper (#147)
VincentAuriau Aug 11, 2024
598e54c
ADD: tf_ops tests
VincentAuriau Aug 19, 2024
7ecf53f
ADD: Indexer tests
VincentAuriau Aug 19, 2024
ff0b7ed
ENH: Ruff
VincentAuriau Aug 19, 2024
6379aa1
ENH: pre-commit
VincentAuriau Aug 19, 2024
f788329
ENH: PR CI shows full test coverage
VincentAuriau Aug 19, 2024
257d4f4
ADD: CE label smoothing test
VincentAuriau Aug 19, 2024
f43405d
FIX: OneHotStorage with slice & ADD: corresponding test
VincentAuriau Aug 19, 2024
edb7247
FIX: some indexing & ADD: corresponding tests
VincentAuriau Aug 19, 2024
cd1184b
FIX: get_full_datset with FS & ADD: finalized indexer coverage
VincentAuriau Aug 20, 2024
9b7d704
ADD: various CD instantiation tests
VincentAuriau Aug 20, 2024
acf7a18
ADD: CD instantiation tests
VincentAuriau Aug 20, 2024
d5029f6
ADD: CD from DF tests
VincentAuriau Aug 20, 2024
93626d8
Merge pull request #148 from artefactory/dev-tests
VincentAuriau Aug 20, 2024
f2ae4b4
ADD: some Storage tests (#149)
VincentAuriau Aug 20, 2024
779177d
ADD: some more tests (#150)
VincentAuriau Aug 21, 2024
7cdb6bf
Fix mkdoc dependencies (#151)
VincentAuriau Aug 21, 2024
082deee
Fix EM algorithm to fit Latent Class model (#152)
VincentAuriau Aug 26, 2024
0a67406
Fix logos on doc landing page (#153)
VincentAuriau Aug 26, 2024
74f39bc
FIX: wording (#154)
VincentAuriau Sep 6, 2024
f138673
Merge branch 'main' into joss
VincentAuriau Sep 6, 2024
2706fbf
ENH: some cleaning
VincentAuriau Sep 6, 2024
38af4d4
Merge branch 'joss' of github.com:artefactory/choice-learn-private in…
VincentAuriau Sep 6, 2024
2aeef3a
update poetry
VincentAuriau Sep 6, 2024
acd45e5
Merge pull request #155 from artefactory/joss
VincentAuriau Sep 6, 2024
a6be914
Release v1.0.0 (#156)
VincentAuriau Sep 11, 2024
d1dadcc
ADD: official paper & citation (#158)
VincentAuriau Sep 11, 2024
b08b6f9
ADD: London Passenger Choice Mode (#159)
VincentAuriau Sep 18, 2024
ae059f8
ADD: tests for SimpleMNL and ChoiceModel (#160)
VincentAuriau Sep 23, 2024
2ec81cb
Test eager mode for some model tests (#161)
VincentAuriau Sep 25, 2024
ebeb9d1
microFIX: NestedLogit clone (#163)
VincentAuriau Oct 1, 2024
56d3b46
Add ResLogit implementation and a notebook example (#162)
julesdesir Oct 2, 2024
c011a58
Minor enhancements (#164)
VincentAuriau Oct 2, 2024
b82ee45
TST: fix test_reslogit.py (#165)
julesdesir Oct 3, 2024
c746318
TST: Switch to "optim" mode in model.evaluate() (#166)
julesdesir Oct 3, 2024
10e6ffd
ADD: allow for choice of nb of parallel iterations when using LBFGS (…
VincentAuriau Oct 22, 2024
b880898
ADD: diverse tests for models (#168)
VincentAuriau Oct 22, 2024
fb0a399
ADD: few unit tests for nlogit
VincentAuriau Oct 22, 2024
cd3d187
ADD: basic tests for RUMnet nets
VincentAuriau Oct 22, 2024
131faea
ADD: complementary unit tests for RUMnet
VincentAuriau Oct 23, 2024
55cc305
ADD: complementary tests
VincentAuriau Oct 23, 2024
9d1fc2e
FIX: nlogit test
VincentAuriau Oct 23, 2024
93737da
ENH: small change in test
VincentAuriau Oct 23, 2024
8ff887a
enh: minor change in hyperparamters values in tests
VincentAuriau Oct 23, 2024
e8fda88
Merge pull request #169 from artefactory/add-tests-models
VincentAuriau Oct 23, 2024
c3a6d33
ADD: White logo (#170)
VincentAuriau Oct 23, 2024
8810592
Update README.md
VincentAuriau Oct 23, 2024
85bc388
ADD: Learning-MNL (#171)
VincentAuriau Oct 29, 2024
d1f3482
ENH: README (#173)
VincentAuriau Oct 31, 2024
2b79431
Add colab notebooks links (#175)
VincentAuriau Oct 31, 2024
0b4ba2e
Make hooks faster (#177)
chicham Nov 6, 2024
d4b38a4
update poetry.lock (#180)
VincentAuriau Nov 6, 2024
81236c6
Change version to v1.1.0 (#181)
VincentAuriau Nov 6, 2024
9920e91
[pre-commit.ci] pre-commit autoupdate (#178)
pre-commit-ci[bot] Nov 11, 2024
619b5cd
[pre-commit.ci] pre-commit autoupdate (#185)
pre-commit-ci[bot] Nov 19, 2024
9585839
Update actions to satisfy minimum nodejs version (#187)
chicham Nov 19, 2024
f8222bf
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 25, 2024
a9db338
Fix tolerance argument in LatentClass Model (#190)
VincentAuriau Nov 29, 2024
5213a05
ADD: few simple LC model tests (#191)
VincentAuriau Nov 30, 2024
34d9f3d
Change version to v1.1.1 (#192)
VincentAuriau Nov 30, 2024
6d1f29b
[pre-commit.ci] pre-commit autoupdate (#195)
pre-commit-ci[bot] Dec 10, 2024
c1c59c8
[pre-commit.ci] pre-commit autoupdate (#198)
pre-commit-ci[bot] Dec 17, 2024
d6ebd96
ADD: Latent Class Report (#201)
VincentAuriau Dec 23, 2024
d035e15
Fix test report (#203)
VincentAuriau Dec 23, 2024
f34eee4
[pre-commit.ci] pre-commit autoupdate (#204)
pre-commit-ci[bot] Dec 27, 2024
cda484a
ENH: Expectation-Maximization Algorithm (#205)
VincentAuriau Dec 27, 2024
b2bcc5e
Add lc endpoint: predict_modelwise_probas (#206)
VincentAuriau Dec 27, 2024
9928d46
ADD: Data tests (#207)
VincentAuriau Dec 28, 2024
e85b002
ADD: Tools tests (#208)
VincentAuriau Dec 28, 2024
f023d0e
ADD: Model tests (#209)
VincentAuriau Jan 3, 2025
fe8aa01
FIX: CI doublons (#210)
VincentAuriau Jan 6, 2025
1ccfebc
[pre-commit.ci] pre-commit autoupdate (#211)
pre-commit-ci[bot] Jan 7, 2025
4566130
ADD: basic Halo-MNL and LowRank-Halo-MNL (#213)
VincentAuriau Jan 7, 2025
8f9127d
FIX: full dataset indexation when 1D items features (#214)
VincentAuriau Jan 9, 2025
65517f2
[pre-commit.ci] pre-commit autoupdate (#215)
pre-commit-ci[bot] Jan 14, 2025
311a423
ADD: Trip, TripDataset and Shopper
julesdesir Jan 15, 2025
7b6fc4b
MAINT: fix typos in docstrings
julesdesir Jan 15, 2025
834757b
ADD: data preprocessing for basket models
julesdesir Jan 15, 2025
1560348
MAINT: fix typos in docstrings
julesdesir Jan 15, 2025
bf71ef5
ENH: remove unnecessary enumerate() in for loop
julesdesir Jan 15, 2025
1909362
MAINT: fix typos in docstrings and variable names
julesdesir Jan 15, 2025
2ca140c
FIX: weight of the loss of the last batch in the loss of the whole epoch
julesdesir Jan 15, 2025
235f7d7
TST: tests for basket models
julesdesir Jan 15, 2025
f7e06de
DOC: add SHOPPER in readme and in docs
julesdesir Jan 15, 2025
aa000ab
DOC: fix typos in readme
julesdesir Jan 15, 2025
23c426a
DOC: add SHOPPER references in documentation index
julesdesir Jan 16, 2025
dc6347b
FIX: path to data for basket models
julesdesir Jan 17, 2025
0581efe
ENH: first part of changes following review
julesdesir Jan 17, 2025
7d75651
ENH: use 5 variables for batch instead of only 1
julesdesir Jan 17, 2025
1613925
ENH: second part of changes following review
julesdesir Jan 17, 2025
7171cbe
ENH: lazy instantiation in .fit + some attributes moved to __init__
julesdesir Jan 20, 2025
380333b
TST: update Shopper tests with the new attributes in __init__
julesdesir Jan 20, 2025
e0b266a
ENH: add assortment attribute to Trip and take into account assortmen…
julesdesir Jan 21, 2025
92a07e4
TST: update Shopper tests with assortment handling
julesdesir Jan 21, 2025
0dd49dc
FIX: handling assortments when stage=3
julesdesir Jan 21, 2025
76281d9
MAINT: rename base_basket.py
julesdesir Jan 21, 2025
bd41337
MAINT: clean useless comment lines
julesdesir Jan 21, 2025
8f3ceb6
[pre-commit.ci] pre-commit autoupdate (#218)
pre-commit-ci[bot] Jan 21, 2025
354e925
ENH: first part of changes following 2nd review round
julesdesir Jan 22, 2025
9fc78f0
ENH: second part of changes following 2nd review round
julesdesir Jan 22, 2025
094c133
ADD: __getitem__ method for the TripDataset class
julesdesir Jan 22, 2025
8743f65
DEP: np.in1d deprecated since NumPy 2.0, use np.isin instead
julesdesir Jan 22, 2025
25aee29
MAINT: fix typos
julesdesir Jan 22, 2025
1dd39b1
ENH: move thinking ahead to a dedicated function
julesdesir Jan 23, 2025
22aa356
ENH: remove unnecessary case distinction when computing item_utilities
julesdesir Jan 23, 2025
45982a2
FIX: load_model without losing hyperparameter values
julesdesir Jan 23, 2025
7a5b4fb
ENH: a call to from_csv builds only one TripDataset and not train/val…
julesdesir Jan 24, 2025
6d45812
MAINT: move sys.path.append(../)
julesdesir Feb 7, 2025
4dd3afa
ADD: few basic tests
VincentAuriau Feb 9, 2025
e567f03
ENH: all changes made on separate repo
julesdesir Feb 10, 2025
6125441
ADD: Shopper tutorial notebook
julesdesir Feb 10, 2025
5ed9bef
ENH: epsilon in log computation during .evaluate
julesdesir Feb 10, 2025
9291a85
TST: update tesrs with last changes
julesdesir Feb 10, 2025
8257a90
TST: small fix
julesdesir Feb 10, 2025
8709dff
MAINT: fix url for 'Open In Colab' in Shopper tutorial notebook
julesdesir Feb 10, 2025
cae851d
Simplify example notebook
VincentAuriau Feb 10, 2025
4c9092d
ADD: val_dataset in fit
VincentAuriau Feb 10, 2025
5a3fcb3
ADD: few basic tests
VincentAuriau Feb 10, 2025
ae33742
ADD: default arguments
VincentAuriau Feb 10, 2025
cce836a
FIX: tests
VincentAuriau Feb 11, 2025
ba9052f
ADD: default values for week & customer if not defined
VincentAuriau Feb 11, 2025
6dc73a7
ADD: updated notebook
VincentAuriau Feb 11, 2025
fc48214
ENH: small changes after review
julesdesir Feb 11, 2025
87ea490
DOC: add Shopper tutorial notebook to the readme
julesdesir Feb 11, 2025
ab02786
Merge pull request #220 from artefactory/few-changes
julesdesir Feb 11, 2025
0096d0f
ADD: __init__
VincentAuriau Feb 11, 2025
f515b1c
small modif
VincentAuriau Feb 11, 2025
560834e
FIX: add Trip class to init file
julesdesir Feb 12, 2025
3d7622b
MAINT: rename item_popularity to item_intercept
julesdesir Feb 12, 2025
948dad1
MAINT: rename compute_unordered_basket_likelihood to compute_basket_l…
julesdesir Feb 12, 2025
e9eb95c
MAINT: rename assortments to available_items (attribute of TripDatase…
julesdesir Feb 12, 2025
00337bc
MAINT: change from 'customer' to 'store'
julesdesir Feb 12, 2025
37d4390
ENH: remove 'id' attribute from Trip class
julesdesir Feb 12, 2025
c86b000
TST: small fix
julesdesir Feb 12, 2025
d5fe536
ADD: possibility to call some functions directly with a Trip object
julesdesir Feb 12, 2025
e1e7e50
ADD: __str__ method for the Trip class
julesdesir Feb 13, 2025
2040e8b
ENH: enhancements of illustrative notebooks for basket models
julesdesir Feb 13, 2025
d4895cf
TST: update test_dataset.py with last changes
julesdesir Feb 13, 2025
36de861
DOC: update references
julesdesir Feb 13, 2025
e4ebf3f
small changes in notebook
VincentAuriau Feb 14, 2025
3e58ab0
ADD: dataset_loader.py
VincentAuriau Feb 14, 2025
7fc1e0a
ENH: naming
VincentAuriau Feb 16, 2025
59da8e8
FIX: imports
VincentAuriau Feb 16, 2025
f192ee7
ENH: small changes in notebooks for basket models
julesdesir Feb 17, 2025
8262b78
TST: raised errors and warnings in init of Shopper
julesdesir Feb 17, 2025
f6d9e2f
TST: add new tests for basket models
julesdesir Feb 18, 2025
c02897b
MAINT: remove np.math.factorial (deprecated)
julesdesir Feb 18, 2025
4b9abcc
Merge pull request #216 from artefactory/basket_models
julesdesir Feb 18, 2025
da18dce
Fix documentation (#226)
julesdesir Feb 18, 2025
eee4e35
FIX: diverse elements of documentation (#227)
VincentAuriau Feb 18, 2025
b42be23
[pre-commit.ci] pre-commit autoupdate (#219)
pre-commit-ci[bot] Feb 18, 2025
7ca4764
Fix doc (#228)
VincentAuriau Feb 18, 2025
a18e3e9
Fix doc (#229)
VincentAuriau Feb 18, 2025
55d7a68
FIX: small typo (#230)
julesdesir Feb 18, 2025
00092e2
ENH: batch processing for .evaluate (#231)
julesdesir Feb 20, 2025
fc5c5b1
ENH: no trainable lambda for the checkout item in Shopper (#232)
julesdesir Feb 24, 2025
586e6b0
Increase performance with tf.function decorator (#234)
julesdesir Mar 17, 2025
bffbfae
[pre-commit.ci] pre-commit autoupdate (#233)
pre-commit-ci[bot] Apr 18, 2025
eac880a
FIX: Pathlib use in load_model (#238)
VincentAuriau May 13, 2025
d0a2e1c
[pre-commit.ci] pre-commit autoupdate (#237)
pre-commit-ci[bot] May 20, 2025
70288ac
Update PR comment & compatibility with latest keras version (#242)
VincentAuriau May 27, 2025
81aee61
FIX: doc (#244)
VincentAuriau Jun 5, 2025
0a478ca
ADD: ECML-PKDD model (#245)
VincentAuriau Jul 13, 2025
f2bdf37
ENH: pyproject.toml follows latest format (#247)
VincentAuriau Jul 13, 2025
e257326
Update pyproject (#248)
VincentAuriau Jul 13, 2025
ab2fd47
Change version to v1.2.0 (#249)
VincentAuriau Jul 13, 2025
bbd1411
Small changes (#252)
julesdesir Jul 20, 2025
9e02180
ADD: latest documentation (#251)
VincentAuriau Aug 25, 2025
d531da8
Add base basket class (#256)
VincentAuriau Aug 28, 2025
241cf10
ADD: & FIX different docs (#257)
VincentAuriau Aug 28, 2025
6527ea9
ADD: Embedding model w/ basic attention (#253)
VincentAuriau Sep 1, 2025
9550eeb
ADD: method & test for cLogit save (#260)
VincentAuriau Sep 5, 2025
6196136
Fix AleaCarta variable names (#261)
VincentAuriau Sep 8, 2025
366a3de
FIX: wrong test (#264)
VincentAuriau Sep 9, 2025
ca4b0eb
FIX data loading depending on Python version (#262)
michaelteboul Sep 9, 2025
f275ddd
Update README.md (#263)
EmmanuelMalherbe Sep 14, 2025
e70c41d
[pre-commit.ci] pre-commit autoupdate (#241)
pre-commit-ci[bot] Sep 18, 2025
1e5f5b1
CI permissions modification (#267)
michaelteboul Sep 18, 2025
fafd26a
ADD: few improvements on London dataset (#265)
michaelteboul Sep 18, 2025
0192d0d
Update ci.yaml
VincentAuriau Sep 18, 2025
7ae5961
ADD: better Sample weight handling (#269)
VincentAuriau Sep 22, 2025
349dc48
ADD: Bakery dataset (#266)
michaelteboul Sep 30, 2025
048206b
ENH: Bakery Dataset (#272)
VincentAuriau Sep 30, 2025
6da27aa
ADD: Official Citation version (#273)
VincentAuriau Oct 14, 2025
1ecfaef
ADD: optimizer state can now be saved & reinstantiated (#279)
VincentAuriau Oct 15, 2025
c0f6824
update & fix notebook with recent changes (#276)
VincentAuriau Oct 15, 2025
bbd8ac0
FIX: evaluate was not working with tracing options + few enh (#280)
VincentAuriau Oct 29, 2025
6243acc
ENH: Basket model evaluation with different shapes (#283)
VincentAuriau Nov 24, 2025
692b0c2
Some doc (#285)
VincentAuriau Nov 24, 2025
7c7a68f
ENH: Rm - small edits (#288)
VincentAuriau Nov 25, 2025
e10c08a
Add batch eval (#287)
VincentAuriau Nov 25, 2025
58ee896
ADD: self-attention model (#281)
michaelteboul Nov 27, 2025
d4c7060
Fix evaluate in fit (#290)
michaelteboul Nov 29, 2025
e03c4bb
[pre-commit.ci] pre-commit autoupdate (#270)
pre-commit-ci[bot] Nov 30, 2025
510cc43
Fix: evaluation metrics computation in .fit() (#293)
michaelteboul Dec 5, 2025
0f0ce10
ENH: early stopping in models & example with RUMnet (#294)
VincentAuriau Dec 13, 2025
fdff98d
ADD: samples weight for val_dataset in .fit & validation_freq arg (#295)
VincentAuriau Dec 13, 2025
9ade708
Change version to v1.3.0 (#297)
VincentAuriau Dec 14, 2025
afc8329
ADD: model get-set weights (#301)
VincentAuriau Dec 18, 2025
4871d28
Change version to v1.3.1 (#298)
VincentAuriau Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @VincentAuriau
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Bug report
about: Report a bug you have encountered
title: "[BUG]"
labels: bug
assignees: ''

---
Comment on lines +1 to +8
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This file contains two frontmatter sections (the parts enclosed in ---). This is invalid for GitHub issue templates and will likely cause parsing issues. The second frontmatter block seems more complete. Please remove the first, redundant block. The same issue exists in feature_request.md and question.md.

Suggested change
---
name: Bug report
about: Report a bug you have encountered
title: "[BUG]"
labels: bug
assignees: ''
---
---
name: 🐛 Bug report
about: If something isn't working 🔧
title: ''
labels: bug
assignees:
---


---
name: 🐛 Bug report
about: If something isn't working 🔧
title: ''
labels: bug
assignees:
---

## 🐛 Bug Report

<!-- A clear and concise description of what the bug is. -->

## 🔬 How To Reproduce

Steps to reproduce the behavior:

1. ...

### Code sample

<!-- If applicable, attach a minimal code sample to reproduce the decried issue. -->

### Environment

* OS: [e.g. Linux / Windows / macOS]
* Python version, get it with:

```bash
python --version
```

### Screenshots

<!-- If applicable, add screenshots to help explain your problem. -->

## 📈 Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## 📎 Additional context

<!-- Add any other context about the problem here. -->
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Feature request
about: Suggest an idea to improve Choice-Learn
title: "[ADD]"
labels: new feature
assignees: ''

---
Comment on lines +1 to +8
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This file contains two frontmatter sections (the parts enclosed in ---). This is invalid for GitHub issue templates and will likely cause parsing issues. The second frontmatter block seems more complete. Please remove the first, redundant block.

Suggested change
---
name: Feature request
about: Suggest an idea to improve Choice-Learn
title: "[ADD]"
labels: new feature
assignees: ''
---
---
name: 🚀 Feature request
about: Suggest an idea for this project 🏖
title: ''
labels: enhancement
assignees:
---


---
name: 🚀 Feature request
about: Suggest an idea for this project 🏖
title: ''
labels: enhancement
assignees:
---

## 🚀 Feature Request

<!-- A clear and concise description of the feature proposal. -->

## 🔈 Motivation

<!-- Please describe the motivation for this proposal. -->

## 🛰 Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

## 📎 Additional context

<!-- Add any other context or screenshots about the feature request here. -->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Question
about: Any question about Choice-Learn?
title: ''
labels: question
assignees: ''

---
Comment on lines +1 to +8
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This file contains two frontmatter sections (the parts enclosed in ---). This is invalid for GitHub issue templates and will likely cause parsing issues. The second frontmatter block seems more complete. Please remove the first, redundant block.

Suggested change
---
name: Question
about: Any question about Choice-Learn?
title: ''
labels: question
assignees: ''
---
---
name: Question
about: Any question about Choice-Learn?
title: ''
labels: question
assignees:
---


---
name: ❓ Question
about: Any question about Choice-Learn?
title: ''
labels: question
assignees:
---

## ❓ Problem
<!-- What do you want to do? What is blocking you? -->

## 🔬 Considered solutions
<!-- What have you tried but didn't work? -->

## 💡 How can we help ?
<!-- Be as clear and concise as possible so we can help you in the most efficient way.-->
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Description of the goal of the PR

Description:
Description:

## Changes this PR introduces (fill it before implementation)

Expand All @@ -15,4 +15,4 @@ Description:
- [ ] I have updated the requirements files if a new package is used
- [ ] I have tested my code
- [ ] The CI pipeline passes
- [ ] I have performed a self-review of my code
- [ ] I have performed a self-review of my code
23 changes: 23 additions & 0 deletions .github/actions/build-draft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Open Journals PDF Generator
description: Create a draft PDF for an Open Journals paper
inputs:
journal:
description: Target journal, must be either "joss" or "jose"
required: false
default: joss
paper-path:
description: >-
Path to the main paper Markdown file, relative to the
project's root directory.
required: false
default: 'paper.md'
runs:
using: docker
image: 'docker://openjournals/inara:latest'
env:
GIT_SHA: $GITHUB_SHA
JOURNAL: ${{ inputs.journal }}
args:
- -o pdf
- -p
- ${{ inputs.paper-path }}
Comment on lines +1 to +23
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This file appears to be a duplicate of .github/actions/build-draft/action.yaml. To maintain a clean repository structure and avoid confusion, it's best to have only one action definition file. According to GitHub Actions conventions, the definition file should be located at .github/actions/<action-name>/action.yaml. Therefore, this file should likely be removed in favor of the one in the build-draft subdirectory.

23 changes: 23 additions & 0 deletions .github/actions/build-draft/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Open Journals PDF Generator
description: Create a draft PDF for an Open Journals paper
inputs:
journal:
description: Target journal, must be either "joss" or "jose"
required: false
default: joss
paper-path:
description: >-
Path to the main paper Markdown file, relative to the
project's root directory.
required: false
default: 'paper.md'
runs:
using: docker
image: 'docker://openjournals/inara:latest'
env:
GIT_SHA: $GITHUB_SHA
JOURNAL: ${{ inputs.journal }}
args:
- -o pdf
- -p
- ${{ inputs.paper-path }}
139 changes: 139 additions & 0 deletions .github/actions/publish/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: "PyPI Poetry Publish"
description: "GitHub action to automate publishing packages to PyPI - from code-specialist."


inputs:
ACCESS_TOKEN:
description: "Access Token for GitHub with write access on the repository"
required: true
PYTHON_VERSION:
description: "Python Version"
required: false
default: "3.10"
PACKAGE_DIRECTORY:
description: "Directory of the package"
required: false
default: "./"
PUBLISH_REGISTRY_PASSWORD:
description: "Password for the user to publish to PyPI. May also be a Token - requires the `PUBLISH_REGISTRY_USERNAME` to be `__token__`"
required: true
PUBLISH_REGISTRY_USERNAME:
description: "The username for the registry. Defaults to __token__"
required: false
default: "__token__"
POETRY_VERSION:
description: "The version of Poetry to use"
required: false
default: ""
POETRY_CORE_VERSION:
description: "The version of Poetry Core to use"
required: false
default: ""
BRANCH:
description: "Branch to publish from"
required: false
default: "main"
POETRY_DEPENDENCY_REGISTRY_URL:
description: "Allows to define a custom registry to be used by Poetry for dependency installation"
required: false
POETRY_DEPENDENCY_REGISTRY_NAME:
description: "The name used for the custom registry in the dependencies"
required: false
POETRY_DEPENDENCY_REGISTRY_USERNAME:
description: "The username for the custom registry"
required: false
POETRY_DEPENDENCY_REGISTRY_PASSWORD:
description: "The password for the custom registry"
required: false
POETRY_DEPENDENCY_REGISTRY_AUTH:
description: "The authentication type for the custom registry"
required: false
default: "http-basic"
PUBLISH_REGISTRY:
description: "The registry to publish to"
required: false
default: "https://upload.pypi.org/legacy/"
UPDATE_CODE_VERSION:
description: "Whether or not to apply the version update in the code"
required: false
default: "true"
PUSH_BRANCH:
description: "Which branch to push the changes to"
required: false
default: "main"

runs:
using: composite
steps:
- name: display inputs
run: |
echo ${{ inputs.BRANCH }}
shell: bash

- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.BRANCH }}
token: ${{ inputs.ACCESS_TOKEN }}

- name: check install
run: |
git status
git branch
shell: bash

- name: Install poetry
run: pip install poetry${{ inputs.POETRY_VERSION != '' && format('=={0}', inputs.POETRY_VERSION) || '' }} poetry-core${{ inputs.POETRY_CORE_VERSION != '' && format('=={0}', inputs.POETRY_CORE_VERSION) || '' }}
shell: bash

- name: Set up Python ${{ inputs.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.PYTHON_VERSION }}
cache: poetry
check-latest: true

- name: Set GitHub Tag as Package Version
run: |
if ${{ inputs.UPDATE_CODE_VERSION }}
then
vname="${{ github.event.release.tag_name }}"
vname=${vname:1}
echo $vname
sed -i -r 's/__version__ *= *".*"/__version__ = "'"$vname"'"/g' ${{ inputs.PACKAGE_DIRECTORY }}__init__.py
sed -i '0,/version =.*/s//version = "'"$vname"'"/' ./pyproject.toml
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using sed to update the version in pyproject.toml can be fragile. If the file's formatting changes, this command might fail. A more robust and idiomatic approach is to use Poetry's built-in version command.

          poetry version "$vname"

fi
shell: bash

- name: Add and Commit Version
run: |
if ${{ inputs.UPDATE_CODE_VERSION }}
then
git checkout -b ${{ inputs.PUSH_BRANCH }}
git add ${{ inputs.PACKAGE_DIRECTORY }}__init__.py ./pyproject.toml
git config user.name 'VincentAuriau'
git config user.email '22350719+VincentAuriau@users.noreply.github.com'
Comment on lines +114 to +115
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The git user name and email are hardcoded in this action. This will cause all commits made by this action to be attributed to a specific user, which is not ideal for a reusable action. It's better to use the details of the user who triggered the workflow, which are available in the github.actor context.

          git config user.name "${{ github.actor }}"
          git config user.email "${{ github.actor }}@users.noreply.github.com"

git commit -m "Change version to ${{ github.event.release.tag_name }}" --allow-empty
git push origin HEAD:${{ inputs.PUSH_BRANCH }}
fi
shell: bash

- name: Install dependencies
if: inputs.POETRY_DEPENDENCY_REGISTRY_URL != ''
run: |
poetry config repositories.${{ inputs.POETRY_DEPENDENCY_REGISTRY_NAME }} ${{ inputs.POETRY_DEPENDENCY_REGISTRY_URL }}
poetry config ${{ inputs.POETRY_DEPENDENCY_REGISTRY_AUTH }}.${{ inputs.POETRY_DEPENDENCY_REGISTRY_NAME }} ${{ inputs.POETRY_DEPENDENCY_REGISTRY_USERNAME }} ${{ inputs.POETRY_DEPENDENCY_REGISTRY_PASSWORD }}
poetry install --no-root
shell: bash

- name: Install dependencies
if: inputs.POETRY_DEPENDENCY_REGISTRY_URL == ''
run: |
poetry install --no-root
shell: bash

- name: Build and Publish
run: |
poetry config repositories.publish ${{ inputs.PUBLISH_REGISTRY }}
poetry publish -p ${{ inputs.PUBLISH_REGISTRY_PASSWORD }} -u ${{ inputs.PUBLISH_REGISTRY_USERNAME }} -r publish --build
shell: bash
32 changes: 24 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
name: CI
name: Build

on: [push, pull_request]
on:
push:
branches:
- main # Run on pushes to main
pull_request: # Run on pull requests

jobs:
CI:
name: Launching CI
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements-developer.txt
- name: Run Pre commit hook (formatting, linting & tests)
run: pre-commit run --all-files --hook-stage pre-push --show-diff-on-failure
pip list
- name: Build coverage file
run: |
pytest -n auto --junitxml=pytest.xml --cov-report=term-missing --cov=choice_learn tests/ | tee pytest-coverage.txt
cat pytest-coverage.txt
- name: Pytest coverage comment
uses: VincentAuriau/pytest-coverage-comment@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Build' step
Uses Step
uses 'VincentAuriau/pytest-coverage-comment' with ref 'main', not a pinned commit hash
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
issue-number: ${{ github.event.pull_request.number || '101' }}
unique-id-for-comment: ${{ matrix.python-version }}
title: 'Coverage Report for Python ${{ matrix.python-version }}'
6 changes: 2 additions & 4 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand All @@ -24,5 +24,3 @@ jobs:
run: |
mkdocs build
mkdocs gh-deploy --force


Loading