Skip to content

Commit

Permalink
Use rye instead of poetry (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanNano authored Jun 4, 2024
1 parent 1c93ca5 commit 0ed4bbd
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 38 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,10 @@ jobs:
with:
ref: ${{ inputs.tag }}
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Setup Poetry
uses: Gr1N/setup-poetry@v7
- name: Setup Cache
uses: allanchain/[email protected]
with:
cache-key-prefix: build
ensure-module: pylint
- name: Setup Rye
uses: eifinger/setup-rye@v3
- name: Install Dependencies
run: rye sync
- name: Build
run: ./build.sh --deploy
- name: Artifacts
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,16 @@ jobs:
build:
uses: ./.github/workflows/build.yaml

pylint:
ruff:
runs-on: 'ubuntu-20.04'

steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Setup Poetry
uses: Gr1N/setup-poetry@v7
- name: Setup Cache
uses: allanchain/[email protected]
with:
cache-key-prefix: pylint
ensure-module: pylint
- name: check
run: poetry run pylint $(find src/ -name '*.py')
- name: Setup Rye
uses: eifinger/setup-rye@v3
- name: Install Dependencies
run: rye sync
- name: lint
run: rye run ruff check src/

1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.7.9
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rm -rf dist/
current_version=$(git describe --tag)
echo "__version__ = \"${current_version:1}\"" > src/control_any_sim/__init__.py

poetry run python3 -m compileall $src/
rye run python3 -m compileall $src/

for file in $(find $src -name '*.pyc')
do
Expand Down
2 changes: 1 addition & 1 deletion decompile_ts4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ for file in $files
do
out_dir="$script_dir/ts4/$(dirname ${file#$source_dir})/"
mkdir -p $out_dir
poetry run decompyle3 -o $out_dir $file &
rye run decompyle3 -o $out_dir $file &

progress $(($files_done*100/$files_total))

Expand Down
24 changes: 12 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[tool.poetry]
[project]
name = "control-any-sim"
version = "1.2.4"
description = "This is a mod for The Sims 4 by Maxis which allows the player to control any NPC character while playing."
authors = ["Jovan Gerodetti <[email protected]>"]
license = "Apache-2.0"
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">= 3.7"

[tool.poetry.dependencies]
python = "~3.7.2"
[[authors]]
name = "Jovan Gerodetti"
email = "[email protected]>"

[tool.poetry.group.dev.dependencies]
decompyle3 = "^3.9.0"
pylint = "~2.6.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.rye]
dev-dependencies = [
"ruff~=0.4.7",
"decompyle3~=3.9.1",
"pylint~=2.6.0",
]

[tool.pylint.MESSAGES]
disable="missing-docstring,broad-except,protected-access,R0903"
49 changes: 49 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: ["dev"]
# all-features: false
# with-sources: false
# generate-hashes: false

-e file:.
astroid==2.4.2
# via pylint
click==8.1.7
# via decompyle3
# via spark-parser
# via xdis
decompyle3==3.9.1
importlib-metadata==6.7.0
# via click
isort==5.11.5
# via pylint
lazy-object-proxy==1.4.3
# via astroid
mccabe==0.6.1
# via pylint
pygments==2.17.2
# via xdis
pylint==2.6.2
ruff==0.4.7
six==1.16.0
# via astroid
# via xdis
spark-parser==1.8.9
# via decompyle3
term-background==1.0.1
# via xdis
toml==0.10.2
# via pylint
typed-ast==1.4.3
# via astroid
typing-extensions==4.7.1
# via importlib-metadata
wrapt==1.16.0
# via astroid
xdis==6.1.0
# via decompyle3
zipp==3.15.0
# via importlib-metadata
11 changes: 11 additions & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: ["dev"]
# all-features: false
# with-sources: false
# generate-hashes: false

-e file:.

0 comments on commit 0ed4bbd

Please sign in to comment.