Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: CI

on:
push:
pull_request:

jobs:
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@ name: reviewdog
run-name: run Linter and comment to PR
on: [pull_request]
jobs:
linter_name:
black-format:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
# Install specific version black (this step is not required. default is "black[jupyter]")
- run: pip install black==23.1.0
uses: actions/checkout@v4
- uses: reviewdog/action-black@v3
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
# Change reporter level if you need.
# GitHub Status Check won't become failure with a warning.
github_token: ${{ secrets.GITHUB_TOKEN }}
workdir: main
reporter: github-pr-review
level: warning
fail_level: none
black_flags: "."
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# AGETNT.md
# AGETNT.md

##
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# 開発環境起動
dev:
docker compose build --no-cache
docker compose build
docker compose up -d

# 本番用
compose/build:
docker compose build --no-cache
docker compose build

compose/up:
docker compose up

re-run:
docker compose down
docker compose build --no-cache
docker compose build
docker compose up -d

exec:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ align = "middle">

## Requirement
~~~
see `main/requirements.txt` (installed by uv in Docker)
see `main/pyproject.toml` and `main/uv.lock` (installed by uv in Docker)
~~~

## How to USE(使い方)
Expand Down
1 change: 1 addition & 0 deletions main/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
5 changes: 3 additions & 2 deletions main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:${PATH}"
ENV UV_SYSTEM_PYTHON=1

COPY ./requirements.txt /tmp/requirements.txt
RUN uv pip install --no-cache -r /tmp/requirements.txt
COPY ./pyproject.toml ./uv.lock ./
RUN uv sync --frozen
ENV PATH="/app/.venv/bin:${PATH}"

COPY ./src ./src
COPY ./tests ./tests
Expand Down
Empty file added main/README.md
Empty file.
18 changes: 18 additions & 0 deletions main/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[project]
name = "main"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"pykakasi==1.2",
"pytest==8.3.4",
"pytest-mock==3.14.0",
"python-dotenv==1.0.0",
"tqdm==4.36.1",
"tweepy==3.8.0",
"black>=26.1.0",
]

[tool.uv]
package = false
6 changes: 0 additions & 6 deletions main/requirements.txt

This file was deleted.

12 changes: 7 additions & 5 deletions main/src/delete_friendship_byhand.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import random
import hometamon


def delete_by_hand():
h = hometamon.Hometamon()
friends = h.api.friends_ids(h.my_twitter_user_id)
Expand All @@ -14,8 +15,10 @@ def delete_by_hand():
print(f"ユーザー名:{friend_status.name}")
print(f"説明欄:{friend_status.description}")
print(f"認証: {friend_status.verified}")
user_input = input('上記ユーザーを忘れさせたいのであれば1入力してください。')
if user_input == "1":
user_input = input(
"上記ユーザーを忘れさせたいのであれば1入力してください。"
)
if user_input == "1":
h.api.destroy_friendship(id=friend_status.id)
print("忘れました")
cnt += 1
Expand All @@ -24,7 +27,6 @@ def delete_by_hand():
pass
print(f"{cnt}人の記憶を忘れました")



if __name__ == '__main__':
delete_by_hand()
if __name__ == "__main__":
delete_by_hand()
1 change: 0 additions & 1 deletion main/src/join_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import cv2
from matplotlib import pyplot as plt


img = cv2.imread("../images/yosi_w_newtext.png")
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
icon = cv2.imread("../images/icon.jpg")
Expand Down
4 changes: 3 additions & 1 deletion main/tests/test_hometamon.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ def test_check_reply(self, app, tweet, mocker):

def test_check_reply_with_false(self, app, tweet, mocker):
assert (
app.check_reply(mocker.patch.object(tweet, "method", text="元気いっぱい"))
app.check_reply(
mocker.patch.object(tweet, "method", text="元気いっぱい")
)
== False
)

Expand Down
432 changes: 432 additions & 0 deletions main/uv.lock

Large diffs are not rendered by default.

Loading