-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Merge pull request #25 from VirtualPatientEngine/feat/reorganize
feat: reorganize
- Loading branch information
Showing
4,583 changed files
with
619,893 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: BUG | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** (optional) | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** (optional) | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: FEATURE | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** (optional) | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# For authors | ||
|
||
## Description | ||
Please: | ||
1. Provide a summary of the modifications made and any associated issue (if applicable). | ||
2. Include relevant context and motivation for the changes. | ||
3. If this relates to a change in any website's frontend, kindly attach a screenshot of the adjustment from your localhost. | ||
4. List any dependencies necessary for implementing this change. | ||
|
||
## Fixes # (issue) Mention the issue number. | ||
|
||
## Type of change | ||
Please delete options that are not relevant. | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
- [ ] This change requires a documentation update | ||
|
||
## How Has This Been Tested? | ||
Please describe the tests you conducted to verify your changes. These may involve creating new test scripts or updating existing ones. | ||
- [ ] Added new test(s) in the ```tests``` folder | ||
- [ ] Added new function(s) to an existing test(s) (e.g.: ```tests/testX.py```) | ||
- [ ] No new tests added (Please explain the rationale in this case) | ||
|
||
## Checklist | ||
- [ ] My code follows the style guidelines mentioned in the Code/DevOps guides | ||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] I have made corresponding changes to the documentation (e.g. MkDocs) | ||
- [ ] My changes generate no new warnings | ||
- [ ] I have added or updated tests (in the ```tests``` folder) that prove my fix is effective or that my feature works | ||
- [ ] New and existing tests pass locally with my changes | ||
- [ ] Any dependent changes have been merged and published in downstream modules | ||
|
||
# For reviewers | ||
|
||
## Checklist pre-approval | ||
- [ ] Is there enough documentation? | ||
- [ ] If a new feature has been added, or a bug fixed, has a test been added to confirm good behavior? | ||
- [ ] Does the test(s) successfully test edge/corner cases? | ||
- [ ] Does the PR pass the tests? (if the repository has continuous integration) | ||
|
||
## Checklist post-approval | ||
- [ ] Does this PR merge ```develop``` into ```main```? If so, please make sure to add a prefix (feat/fix/chore) and/or a suffix BREAKING CHANGE (if it's a major release) to your commit message. | ||
- [ ] Does this PR close an issue? If so, please make sure to descriptively close this issue when the PR is merged. | ||
|
||
## Checklist post-merge | ||
- [ ] When you approve of the PR, merge and close it (Read this [article](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github) to know about different merge methods on GitHub) | ||
- [ ] Did this PR merge ```develop``` into ```main``` and is it suppose to run an automated release workflow (if applicable)? If so, please make sure to check under the "Actions" tab to see if the workflow has been initiated, and return later to verify that it has completed successfully. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: RELEASE | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
on-success: | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.8.1' | ||
- run: npm ci | ||
|
||
- name: Run semantic-release | ||
run: npx semantic-release | ||
|
||
- name: Get release version | ||
run: | | ||
RELEASE_VERSION=$(git describe --tags --abbrev=0) | ||
echo $RELEASE_VERSION > release_version.txt | ||
- name: Build the package | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
# - name: commit files | ||
# run: | | ||
# git config --local user.email "[email protected]" | ||
# git config --local user.name "GitHub Action" | ||
# git add -f dist/* | ||
# git commit -m "new release" | ||
|
||
# # push | ||
# - name: push changes | ||
# uses: ad-m/[email protected] | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# This is a basic workflow to help you get started with GitHub Actions | ||
name: TESTS | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
# This workflow contains 3 jobs called: | ||
# 1. pylint-windows-ubuntu-macos | ||
# 2. code-cov-ubuntu-macos | ||
# 3. code-cov-windows | ||
jobs: | ||
pylint-windows-ubuntu-macos: | ||
# The type of runner that the job will run on | ||
name: pylint-windows-ubuntu-macos | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
|
||
# install requirements | ||
- name: Install the requirements | ||
shell: bash -l {0} | ||
run: | | ||
pip3 install --break-system-packages -r requirements.txt | ||
# pylint | ||
- name: Run pylint | ||
shell: bash -l {0} | ||
run: | | ||
pylint --disable=R0801,W0221,W0122 aiagents4pharma | ||
# code coverage job for ubuntu and macos | ||
code-cov-ubuntu-macos: | ||
name: code-coverage-ubuntu-macos | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Install dependencies | ||
run: pip3 install -r requirements.txt # Adjust this according to your project | ||
|
||
- name: Run tests with coverage | ||
run: coverage run -m pytest --cache-clear aiagents4pharma | ||
|
||
- name: Check coverage | ||
run: | | ||
coverage report -m | ||
TOTAL_COVERAGE=$(coverage report -m | awk 'END {print int($NF)}') | ||
if [[ $TOTAL_COVERAGE -ne 100 ]]; then | ||
echo "Code coverage is not 100%. Please check the coverage report." | ||
exit 1 | ||
fi | ||
env: | ||
COVERAGE_FILE: './.coverage' | ||
|
||
# code coverage job for windows | ||
code-cov-windows: | ||
name: code-coverage-windows | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install dependencies | ||
run: pip3 install -r requirements.txt # Adjust this according to your project | ||
|
||
- name: Run tests with coverage | ||
run: coverage run -m pytest --cache-clear | ||
|
||
- name: Check coverage | ||
run: | | ||
coverage report -m | ||
# $TOTAL_COVERAGE=(& coverage report -m | Select-Object -Last 1) -replace "[^\d]" # Extract the last line and remove non-numeric characters | ||
$TOTAL_COVERAGE=(& coverage report -m | Select-Object -Last 1) | ||
# split and extract the last element | ||
$TOTAL_COVERAGE=($TOTAL_COVERAGE -split " ")[-1] | ||
# remove non-numeric characters | ||
$TOTAL_COVERAGE=($TOTAL_COVERAGE -replace "[^\d]") | ||
# convert to int | ||
$TOTAL_COVERAGE=[int]$TOTAL_COVERAGE | ||
echo "Total coverage: $TOTAL_COVERAGE" | ||
if ($TOTAL_COVERAGE -ne 100) { | ||
Write-Host "Code coverage is not 100%. Please check the coverage report." | ||
exit 1 | ||
} | ||
env: | ||
COVERAGE_FILE: './.coverage' | ||
|
Oops, something went wrong.