Skip to content

Commit

Permalink
Merge pull request #2 from umyuu/feaure/0.0.2
Browse files Browse the repository at this point in the history
Feaure/0.0.2
  • Loading branch information
umyuu authored Jun 10, 2024
2 parents f2868a5 + 2151bd5 commit 20ac756
Show file tree
Hide file tree
Showing 42 changed files with 1,870 additions and 329 deletions.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/10-problem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "何か問題がありましたか?"
description: "何か問題が見つかった場合は、こちらで報告してください。"
labels: "bug"
body:
- type: markdown
attributes:
value: |
# 問題を見つけていただき、ありがとうございます!
## 上記の「Title」と質問内容を記入したら、「Submit new Issue」ボタンを押して送信してください。よろしくお願いします!
- type: textarea
id: problem
attributes:
label: "問1, お困りの問題の内容は何ですか?"
description: "例: モザイクツールが実行されない。分かる範囲で大丈夫です。"
value: "### どのような問題が発生しましたか?\n\n<!-- 例: モザイクツールが実行されない。。 -->\n\n### どのような操作をしましたか?\n\n1. xxx\n1. xxx\n1. xxx"
validations:
required: true
- type: dropdown
id: device
attributes:
label: "問2, どの端末で確認しましたか?"
options:
- Windows
- Mac
- Linux
- その他
validations:
required: true
- type: input
id: version
attributes:
label: "【任意】バージョン情報を教えていただけますか?"
description: "タイトル部のバージョン欄をコピーし貼り付けてください。"
validations:
required: false
- type: textarea
id: addition
attributes:
label: "問3, 補足情報"
description: "補足で伝えたい事があれば記入して下さい"
value: "なし"
validations:
required: false
105 changes: 105 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
# Actionsタブからワークフローの手動実行を許可します。
workflow_dispatch:
schedule:
- cron: '33 9 * * 6'

# 'concurrency'を使用して、同時に実行できるジョブの数を制限します。
# この設定により、同じワークフローの複数のジョブが同時に実行されるのを防ぎます。
# https://docs.github.com/ja/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
39 changes: 39 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable
# packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency review'
on:
pull_request:
branches: [ "main" ]

# If using a dependency submission action in this workflow this permission will need to be set to:
#
# permissions:
# contents: write
#
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
permissions:
contents: read
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option
pull-requests: write

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
with:
comment-summary-in-pr: always
# fail-on-severity: moderate
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later
# retry-on-snapshot-warnings: true
49 changes: 49 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:
# Actionsタブからワークフローの手動実行を許可します。
workflow_dispatch:

permissions:
contents: read

# 'concurrency'を使用して、同時に実行できるジョブの数を制限します。
# この設定により、同じワークフローの複数のジョブが同時に実行されるのを防ぎます。
# https://docs.github.com/ja/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --ignore=E265,W291,E402 --max-complexity=10 --max-line-length=127 --statistics
- name: Test with unittest
run: |
python -m unittest -v test/test_image_file_service.py
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ignore shortcut link
build.lnk
run.lnk

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -10,7 +14,6 @@ __pycache__/
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
Expand Down
30 changes: 22 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,27 @@
// 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python デバッガー: 引数を含む現在のファイル",
"type": "debugpy",
"request": "launch",
"program": "app.py",
"console": "integratedTerminal",
"args": "${command:pickArgs}"
}
{
"name": "現在のファイル",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "run app.py",
"type": "debugpy",
"request": "launch",
"program": "app.py",
"console": "integratedTerminal",
"args": "${command:pickArgs}"
},
{
"name": "Release",
"type": "debugpy",
"request": "launch",
"program": "scripts\\release.py",
"console": "integratedTerminal",
}
]
}
28 changes: 24 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
{
"cSpell.words": [
"borderwidth",
"confirmoverwrite",
"exif",
"ipadx",
"pnginfo",
"scrollregion",
"tkinterdnd",
"xscrollcommand",
"yscrollcommand"
],
"python.analysis.typeCheckingMode": "basic",
"flake8.args": [
"--ignore=E265,W291",
"--ignore=E265,W291,E402",
"--max-complexity=10",
"--max-line-length=127"
],
"cSpell.words": [
"tkinterdnd"
"python.testing.unittestArgs": [
"-v",
"-s",
"./test",
"-p",
"*test*.py"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true,
"python.testing.pytestArgs": [
"test"
]
}
}
3 changes: 3 additions & 0 deletions MosaicTool.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

}
8 changes: 1 addition & 7 deletions app.spec → MosaicTool.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_data_files

datas = []
datas =[
('third_party/icons/LICENSE.txt', 'third_party/icons'),
('third_party/icons/arrow_back_24dp_FILL0_wght400_GRAD0_opsz24.png', 'third_party/icons'),
('third_party/icons/arrow_forward_24dp_FILL0_wght400_GRAD0_opsz24.png', 'third_party/icons'),
('third_party/icons/file_open_24dp_FILL0_wght400_GRAD0_opsz24.png', 'third_party/icons'),
]
datas = [('third_party\\icons', 'third_party\\icons')]
datas += collect_data_files('tkinterdnd2')


Expand Down
Loading

0 comments on commit 20ac756

Please sign in to comment.