うみゅ commited on
Commit
adb4135
·
unverified ·
2 Parent(s): b5d83fa 22a63e6

Merge pull request #18 from umyuu/feature/0.0.13

Browse files
.github/workflows/python-app.yml CHANGED
@@ -37,9 +37,11 @@ jobs:
37
  run: |
38
  python -m pip install --upgrade pip
39
  pip install flake8
40
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
 
41
  - name: Lint with flake8
42
  run: |
 
43
  # stop the build if there are Python syntax errors or undefined names
44
  flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
45
  # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
@@ -47,4 +49,6 @@ jobs:
47
  - name: Run tests
48
  env:
49
  PYTHONPATH: .
50
- run: python -m unittest discover -s test -p '*.py'
 
 
 
37
  run: |
38
  python -m pip install --upgrade pip
39
  pip install flake8
40
+ pip install uv
41
+ uv sync
42
  - name: Lint with flake8
43
  run: |
44
+ source .venv/bin/activate
45
  # stop the build if there are Python syntax errors or undefined names
46
  flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
47
  # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
 
49
  - name: Run tests
50
  env:
51
  PYTHONPATH: .
52
+ run: |
53
+ source .venv/bin/activate
54
+ uv run python -m unittest discover -s test -p '*.py'
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.10
.vscode/launch.json CHANGED
@@ -1,16 +1,18 @@
1
  {
2
- // IntelliSense を使用して利用可能な属性を学べます。
3
- // 既存の属性の説明をホバーして表示します。
4
- // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "name": "Python デバッガー: 引数を含む現在のファイル",
9
- "type": "debugpy",
10
- "request": "launch",
11
- "program": "app.py",
12
- "console": "integratedTerminal",
13
- "args": "${command:pickArgs}"
14
- }
15
- ]
 
 
16
  }
 
1
  {
2
+ // IntelliSense を使用して利用可能な属性を学べます。
3
+ // 既存の属性の説明をホバーして表示します。
4
+ // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "app.py",
9
+ "type": "debugpy",
10
+ "request": "launch",
11
+ "program": "${workspaceFolder}/app.py",
12
+ "console": "integratedTerminal",
13
+ "python": "${workspaceFolder}/.venv/Scripts/python.exe",
14
+ "args": "${command:pickArgs}",
15
+ "justMyCode": true
16
+ }
17
+ ]
18
  }
01-installation.bat CHANGED
@@ -1,10 +1,14 @@
1
- @echo on
 
 
 
2
 
3
- cd %~dp0
 
4
 
5
- python -m venv venv
6
- call venv\Scripts\activate
 
 
7
 
8
- pip install -r requirements.txt
9
-
10
- TIMEOUT /T 10
 
1
+ REM uv�̃L���b�V���p�X�̕ύX�iSSD�œK���j
2
+ REM �ʏ�̃L���b�V���ꏊ��SSD��̎w�肵���p�X�iK:\uv_cache�j�Ƀ����N���邱�ƂŁA
3
+ REM �L���b�V���̓ǂݏ������x���œK�����܂��B�����N���K�v�ȏꍇ�̂ݗL���ł��B
4
+ REM mklink /d %LOCALAPPDATA%\uv\cache K:\uv_cache
5
 
6
+ REM pip�o�R��uv���C���X�g�[��
7
+ pip install uv
8
 
9
+ REM uv�̈ˑ��֌W�𓯊�
10
+ REM `uv sync`���g���āA�v���W�F�N�g�̈ˑ��֌W��`pyproject.toml`�����`uv lock`�t�@�C���Ɋ�Â��ăC���X�g�[���܂��͍X�V���܂��B
11
+ REM ����ɂ��A�‹�����������A�K�v�ȃ��C�u�������C���X�g�[������܂��B
12
+ uv sync
13
 
14
+ TIMEOUT /T 10
 
 
pyproject.toml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "saliencymapdemo"
3
+ version = "0.0.13"
4
+ description = "SaliencyMapDemo"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "gradio>=5.13.1",
9
+ "gradio-client>=1.6.0",
10
+ "opencv-contrib-python>=4.11.0.86",
11
+ "opencv-python>=4.11.0.86",
12
+ ]
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- gradio==5.5.0
2
- gradio_client==1.4.2
3
- opencv-python==4.10.0.84
4
- opencv-contrib-python==4.10.0.84
 
1
+ gradio==5.13.1
2
+ gradio_client==1.6.0
3
+ opencv-python==4.11.0.86
4
+ opencv-contrib-python==4.11.0.86
run.bat CHANGED
@@ -1,7 +1,7 @@
1
  @echo on
2
 
3
  cd %~dp0
4
- call venv\Scripts\activate
5
- python app.py --server_port 9999
6
 
7
  TIMEOUT /T 10
 
1
  @echo on
2
 
3
  cd %~dp0
4
+ call .venv\Scripts\activate
5
+ uv run --verbose Python app.py --server_port 9999
6
 
7
  TIMEOUT /T 10
scripts/run_hot_reload.bat CHANGED
@@ -3,7 +3,7 @@ REM Gradioのオートリロード用のスクリプトです。
3
 
4
  cd %~dp0
5
  cd ..
6
- call venv\Scripts\activate
7
- gradio app.py
8
 
9
  TIMEOUT /T 10
 
3
 
4
  cd %~dp0
5
  cd ..
6
+ call .venv\Scripts\activate
7
+ uv run gradio app.py
8
 
9
  TIMEOUT /T 10
src/utils.py CHANGED
@@ -8,7 +8,7 @@ def get_package_version() -> str:
8
  """
9
  バージョン情報を取得します。
10
  """
11
- return '0.0.12'
12
 
13
 
14
  @dataclass
 
8
  """
9
  バージョン情報を取得します。
10
  """
11
+ return '0.0.13'
12
 
13
 
14
  @dataclass
uv.lock ADDED
The diff for this file is too large to render. See raw diff