Skip to content

Commit

Permalink
Merge pull request #272 from Apricot-S/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Apricot-S authored Jul 14, 2024
2 parents 1749347 + ea1e49c commit 02f5885
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 49 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,8 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# rye
requirements.lock
requirements-dev.lock

# End of https://www.toptal.com/developers/gitignore/api/python,venv,windows,macos,linux
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ This is fork of **[Cryolite's majsoul-rpa](https://github.com/Cryolite/majsoul-r
5. Supports browser viewport sizes other than 1920 x 1080
6. Supports 3-player mahjong

## Announcements

- [2024/04/16] `mode` and `length` of `HomePresentation.create_room` can now be specified with non-literal variables. Please check the [source code](./src/majsoulrpa/presentation/home.py) for details.
- [2024/04/16] `user_data_dir` of `RPA.__init__` can now be specified with `pathlib.Path`.
- [2024/04/24] Added an optional argument `user_data_dir` to `launch_remote_browser` and `--user_data_dir` option to `majsoulrpa_remote_browser`.

## About The Program

- This program is intended to enable the participation of bots in friendly matches and tournaments where bot participation is explicitly allowed.
Expand All @@ -29,11 +23,11 @@ This is fork of **[Cryolite's majsoul-rpa](https://github.com/Cryolite/majsoul-r

![remote](./docs/remote.png)

## how to setup
## Install

```text
poetry install
poetry shell
```sh
majsoulrpa$ pip install .
majsoulrpa$ playwright install --with-deps chromium
```

## License
Expand Down
83 changes: 45 additions & 38 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,51 +1,58 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "0.0.1"
[project]
name = "majsoulrpa"
version = "0.0.2"
description = "A Robotic Process Automation (RPA) framework for Mahjong Soul (雀魂)"
license = "MIT"
authors = ["Apricot-S"]
authors = [
{ name = "Apricot S." }
]
license = { text = "MIT License" }
readme = "README.md"
requires-python = ">= 3.11"
keywords = ["mahjong", "Mahjong Soul", "Majsoul", "automation", "RPA"]
classifiers = [
"Private :: Do Not Upload",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.12",
]
readme = "README.md"
keywords = ["mahjong", "Mahjong Soul", "Majsoul", "automation", "RPA"]
packages = [{ include = "majsoulrpa", from = "src" }]
include = [
"src/majsoulrpa",
"src/majsoulrpa/template/**/*",
"src/majsoulrpa/py.typed",
dependencies = [
"imapclient>=3.0.1,<4",
"mitmproxy>=10.3.0,<11",
"opencv-python>=4.9.0.80,<5",
"playwright>=1.40.0,<2",
"protobuf>=5.26.1,<6",
"jsonschema>=4.20.0,<5",
"boto3>=1.34.11,<2",
"pyzmq>=26.0.0,<27",
"referencing>=0.35.0,<0.36",
"numpy>=2.0.0,<3",
"wsproto>=1.2.0,<2",
]

[tool.poetry.dependencies]
python = "^3.11"
imapclient = "^3.0.1"
mitmproxy = "^10.3.0"
opencv-python = "^4.9.0.80"
playwright = "^1.40.0"
protobuf = "^5.26.1"
jsonschema = "^4.20.0"
boto3 = "^1.34.11"
pyzmq = "^26.0.0"
referencing = "^0.35.0"
numpy = "^2.0.0"
wsproto = "^1.2.0"
[project.scripts]
majsoulrpa_remote_browser = "majsoulrpa.remote_browser._remote_browser:main"

[tool.poetry.group.dev.dependencies]
mypy = "^1.8.0"
ruff = "^0.5.0"
types-protobuf = "^5.26.0.20240422"
types-jsonschema = "^4.20.0.0"
boto3-stubs = { extras = ["s3"], version = "^1.34.11" }
pytest = "^8.0.1"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.poetry.scripts]
majsoulrpa_remote_browser = "majsoulrpa.remote_browser._remote_browser:main"
[tool.rye]
managed = true
dev-dependencies = [
"mypy>=1.8.0,<2",
"ruff>=0.5.0,<0.6",
"types-protobuf>=5.26.0.20240422,<6",
"types-jsonschema>=4.20.0.0,<5",
"boto3-stubs[s3]>=1.34.11,<2",
"pytest>=8.0.1,<9",
]

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["src/majsoulrpa"]

[tool.pytest.ini_options]
testpaths = ["tests"]
Expand Down
2 changes: 1 addition & 1 deletion src/majsoulrpa/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.1"
__version__ = "0.0.2"

0 comments on commit 02f5885

Please sign in to comment.