プロジェクトの環境設定ファイルを追加し、README.mdに開発セットアップ手順を追記。作業ログ用のdiary.mdを新規作成し、.gitignoreを更新して不要なファイルを除外。サンプルデータCSVファイルを追加。
This commit is contained in:
@@ -3,3 +3,5 @@
|
||||
- コーディング: 既存のコードスタイル・命名規則に従う
|
||||
- プロジェクト概要:クレジットカードCSVデータを分類、レポートを作るWebアプリケーション
|
||||
- 注意点(任意):仕様書の確認する
|
||||
- /Doc/diary.md に、作業ログ記録 何をやったかを箇条書きでOK
|
||||
- この端末にはpostgreのCLIがインストールされています 本体は https:labo.sunamura-llc.com に設置
|
||||
|
||||
3
.env.example
Normal file
3
.env.example
Normal file
@@ -0,0 +1,3 @@
|
||||
DJANGO_SECRET_KEY=change-me
|
||||
DJANGO_DEBUG=true
|
||||
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/card_data_sorting
|
||||
187
.gitignore
vendored
187
.gitignore
vendored
@@ -1,178 +1,13 @@
|
||||
Sample-data/
|
||||
|
||||
# ---> Python
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# UV
|
||||
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
#uv.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
||||
.pdm.toml
|
||||
.pdm-python
|
||||
.pdm-build/
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
*.swp
|
||||
.DS_Store
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
# Ruff stuff:
|
||||
.ruff_cache/
|
||||
|
||||
# PyPI configuration file
|
||||
.pypirc
|
||||
|
||||
.venv/
|
||||
__pycache__/
|
||||
*.sqlite3
|
||||
*.log
|
||||
/.pytest_cache/
|
||||
/.mypy_cache/
|
||||
/.ruff_cache/
|
||||
/staticfiles/
|
||||
/media/
|
||||
|
||||
1
Doc/diary.md
Normal file
1
Doc/diary.md
Normal file
@@ -0,0 +1 @@
|
||||
# 作業日誌 (作業ログです)
|
||||
30
README.md
30
README.md
@@ -1,3 +1,29 @@
|
||||
# ------
|
||||
# Card-data-sorting
|
||||
|
||||
何某の元ネタとなる
|
||||
Business-focused Django app for importing credit card CSV statements and splitting business vs household expenses.
|
||||
|
||||
## Development setup
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Python 3.9+ (local)
|
||||
- PostgreSQL 14+
|
||||
- libffi/libpango/libcairo (for WeasyPrint)
|
||||
|
||||
### Setup steps
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements-dev.txt
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
### Environment variables
|
||||
|
||||
Edit `.env` to match your local DB.
|
||||
|
||||
### Next actions
|
||||
|
||||
- Initialize the Django project and app structure.
|
||||
- Configure PostgreSQL settings and migrations.
|
||||
|
||||
9
Sample-data/IDEMITSU_2512-2.csv
Normal file
9
Sample-data/IDEMITSU_2512-2.csv
Normal file
@@ -0,0 +1,9 @@
|
||||
カード名称,apollostation card
|
||||
お支払日,2025/12/08
|
||||
今回ご請求額,0000004690
|
||||
|
||||
利用日,ご利用店名及び商品名,本人・家族区分,支払区分名称,締前入金区分,利用金額,備考
|
||||
2025/09/26,ETC東日本 (三笠→奈井江砂川),,1回,,970,
|
||||
2025/09/26,ETC東日本 (奈井江砂川→三笠),,1回,,970,
|
||||
2025/10/08,ETC東日本 (旭川鷹栖→砂川SAス),,1回,,1780,
|
||||
2025/10/30,ETC東日本 (三笠→奈井江砂川),,1回,,970,
|
||||
|
25
Sample-data/IDEMITSU_2601.csv
Normal file
25
Sample-data/IDEMITSU_2601.csv
Normal file
@@ -0,0 +1,25 @@
|
||||
カード名称,出光ゴールドカード
|
||||
お支払日,2026/01/07
|
||||
今回ご請求額,0000132408
|
||||
|
||||
利用日,ご利用店名及び商品名,本人・家族区分,支払区分名称,締前入金区分,利用金額,備考
|
||||
2025/11/26,豊沼 灯油,,1回,,23926,数量:193
|
||||
2025/11/10,APPLE COM BILL,,1回,,150,
|
||||
2025/11/12,APPLE COM BILL,,1回,,480,
|
||||
2025/11/13,プロノ タキカワテン,,1回,,18128,
|
||||
2025/11/15,メガネ大陸リンケイ堂砂川駅前店,,1回,,57000,
|
||||
2025/11/24,ABEMAプレミアム,,1回,,1080,
|
||||
2025/11/26,OPENAI *CHATGPT SUBSCR,,1回,,3568,現地通貨額:22.00 USD
|
||||
,(SAN FRANCISCO),,,,,円換算レート:11/27 162.1819
|
||||
2025/11/26,ツルハ,,1回,,2774,
|
||||
2025/11/28,Amazonプライム会費,,1回,,2950,
|
||||
2025/11/28,APPLE COM BILL,,1回,,1350,
|
||||
2025/11/28,ホクレンショップFoodFarm新すながわ店,,1回,,3065,
|
||||
2025/11/30,AMAZON.CO.JP,,1回,,1577,
|
||||
2025/11/30,AMAZON.CO.JP,,1回,,4971,
|
||||
2025/12/01,エックスサ-バ-/M,,1回,,2200,
|
||||
2025/12/01,お名前.com ドメインサービス,,1回,,272,
|
||||
2025/12/01,APPLE COM BILL,,1回,,1200,
|
||||
2025/12/03,APPLE COM BILL,,1回,,480,
|
||||
2025/12/08,お名前.comレンタルサ-バ-,,1回,,2612,
|
||||
2025/12/10,アット・ニフティ,,1回,,4625,
|
||||
|
4
requirements-dev.txt
Normal file
4
requirements-dev.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
-r requirements.txt
|
||||
pytest>=7.4,<8.0
|
||||
pytest-django>=4.5,<5.0
|
||||
ruff>=0.3,<0.4
|
||||
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Django>=4.2,<5.0
|
||||
psycopg[binary]>=3.1,<4.0
|
||||
chardet>=5.2,<6.0
|
||||
WeasyPrint>=60.0,<61.0
|
||||
Reference in New Issue
Block a user