-
Notifications
You must be signed in to change notification settings - Fork 12
Test PR on all commits #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: empty
Are you sure you want to change the base?
Changes from all commits
433a70f
19c2a24
3a469ec
90d9d2a
fc4f2ae
e21e251
567ffeb
3618b37
b62f9eb
428e7f7
0d39d0a
e92ad77
bce01ac
1af1e64
24102aa
610165a
b43e6be
9d9288a
421abc1
fc9df7e
be1a5b5
a1ec487
ed59165
9894ea1
b131fdc
068239f
7a05f9e
dc103bc
132a8e3
bb87e2b
ae3f6b8
d49de22
4870c05
f4e9cda
82152d3
f824df9
883cb65
e0acb2d
118b461
a78ccb1
eb8a66c
efff23c
ffa3bda
be89983
2b0034c
97a5721
764b708
8f5a45f
81e9af2
b7b3ef7
ca43710
598e54c
7ecf53f
ff0b7ed
6379aa1
f788329
257d4f4
f43405d
edb7247
cd1184b
9b7d704
acf7a18
d5029f6
93626d8
f2ae4b4
779177d
7cdb6bf
082deee
0a67406
74f39bc
f138673
2706fbf
38af4d4
2aeef3a
acd45e5
a6be914
d1dadcc
b08b6f9
ae059f8
2ec81cb
ebeb9d1
56d3b46
c011a58
b82ee45
c746318
10e6ffd
b880898
fb0a399
cd3d187
131faea
55cc305
9d1fc2e
93737da
8ff887a
e8fda88
c3a6d33
8810592
85bc388
d1f3482
2b79431
0b4ba2e
d4b38a4
81236c6
9920e91
619b5cd
9585839
f8222bf
a9db338
5213a05
34d9f3d
6d1f29b
c1c59c8
d6ebd96
d035e15
f34eee4
cda484a
b2bcc5e
9928d46
e85b002
f023d0e
fe8aa01
1ccfebc
4566130
8f9127d
65517f2
311a423
7b6fc4b
834757b
1560348
bf71ef5
1909362
2ca140c
235f7d7
f7e06de
aa000ab
23c426a
dc6347b
0581efe
7d75651
1613925
7171cbe
380333b
e0b266a
92a07e4
0dd49dc
76281d9
bd41337
8f3ceb6
354e925
9fc78f0
094c133
8743f65
25aee29
1dd39b1
22aa356
45982a2
7a5b4fb
6d45812
4dd3afa
e567f03
6125441
5ed9bef
9291a85
8257a90
8709dff
cae851d
4c9092d
5a3fcb3
ae33742
cce836a
ba9052f
6dc73a7
fc48214
87ea490
ab02786
0096d0f
f515b1c
560834e
3d7622b
948dad1
e9eb95c
00337bc
37d4390
c86b000
d5fe536
e1e7e50
2040e8b
d4895cf
36de861
e4ebf3f
3e58ab0
7fc1e0a
59da8e8
f192ee7
8262b78
f6d9e2f
c02897b
4b9abcc
da18dce
eee4e35
b42be23
7ca4764
a18e3e9
55d7a68
00092e2
fc5c5b1
586e6b0
bffbfae
eac880a
d0a2e1c
70288ac
81aee61
0a478ca
f2bdf37
e257326
ab2fd47
bbd1411
9e02180
d531da8
241cf10
6527ea9
9550eeb
6196136
366a3de
ca4b0eb
f275ddd
e70c41d
1e5f5b1
fafd26a
0192d0d
7ae5961
349dc48
048206b
6da27aa
1ecfaef
c0f6824
bbd8ac0
6243acc
692b0c2
7c7a68f
e10c08a
58ee896
d4c7060
e03c4bb
510cc43
0f0ce10
fdff98d
9ade708
afc8329
4871d28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * @VincentAuriau |
| 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: '' | ||
|
|
||
| --- | ||
|
|
||
| --- | ||
| 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. --> | ||
| 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains two frontmatter sections (the parts enclosed in
Suggested change
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||
| 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. --> | ||||||||||||||||||||||||||||||||||
| 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains two frontmatter sections (the parts enclosed in
Suggested change
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||
| 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.--> | ||||||||||||||||||||||||||||||||||
| 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file appears to be a duplicate of |
||
| 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 }} |
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 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 | ||
| 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 warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Build' step
Uses Step Error loading related location Loading |
||
| 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 }}' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 infeature_request.mdandquestion.md.