From 53779bb19d91e834ee6e43d0ee690deed75d23c0 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sat, 25 Feb 2023 01:17:42 +0100 Subject: [PATCH 1/2] Fix(Makefile) - Changes the lock and adds _linux to the zip --- Cargo.lock | 2 +- Makefile.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eb7c741..159871a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -553,7 +553,7 @@ checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "xiv_craft_solver" -version = "0.1.4" +version = "0.1.5" dependencies = [ "clap", "lazy_static", diff --git a/Makefile.toml b/Makefile.toml index 958ac93..351aa74 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -46,8 +46,8 @@ script_runner = "@shell" script = ''' mkdir -p releases # Add version as an arg and things cp target/wheels/*.whl releases/ - zip releases/ffcraft_solver_cli.zip -j target/release/ffcraft_solver_cli craft.toml -j target/release/libxiv_craft_solver.so - cd python/dist/ && zip ../../releases/ffcraft_solver_gui.zip -r ffcraft_solver_gui_linux/ + zip releases/ffcraft_solver_cli_linux.zip -j target/release/ffcraft_solver_cli craft.toml -j target/release/libxiv_craft_solver.so + cd python/dist/ && zip ../../releases/ffcraft_solver_gui_linux.zip -r ffcraft_solver_gui_linux/ ''' [tasks.zip_win] -- 2.45.1 From d8819feb418b4de6608a5a47fcc150f3622b955e Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sat, 25 Feb 2023 21:33:11 +0100 Subject: [PATCH 2/2] Fix(Project name) - [Breaking] Changes all naming convention for the project --- Cargo.lock | 2 +- Cargo.toml | 14 ++++----- Makefile.toml | 19 +++++++----- README.md | 15 ++++++--- Todo.md | 3 +- pyproject.toml | 2 +- python/__ignore_setup.cfg | 6 ++-- python/pyproject.toml | 4 +-- .../__init__.py | 2 +- .../__main__.py | 2 +- .../configs/consumables.yaml | 0 .../configs/recipes.yaml | 0 .../configs/users.yaml | 0 .../example.py | 12 ++++---- .../example_dearpygui.py | 0 .../modules/__init__.py | 0 .../modules/loader.py | 2 +- .../modules/log.py | 0 .../modules/solver.py | 6 ++-- .../modules/translator.py | 2 +- .../resources/ffcraft_solver.ico | Bin .../resources/ffcraft_solver.png | Bin .../ressources/ffcraft_solver.ico | Bin .../ressources/ffcraft_solver.png | Bin python/tox.ini | 29 ------------------ src/bin/{ffcraft.rs => xiv_csolver.rs} | 24 +++++++-------- src/io.rs | 4 +-- 27 files changed, 63 insertions(+), 85 deletions(-) rename python/src/{ffcraft_solver => xiv_csolver}/__init__.py (75%) rename python/src/{ffcraft_solver => xiv_csolver}/__main__.py (99%) rename python/src/{ffcraft_solver => xiv_csolver}/configs/consumables.yaml (100%) rename python/src/{ffcraft_solver => xiv_csolver}/configs/recipes.yaml (100%) rename python/src/{ffcraft_solver => xiv_csolver}/configs/users.yaml (100%) rename python/src/{ffcraft_solver => xiv_csolver}/example.py (58%) rename python/src/{ffcraft_solver => xiv_csolver}/example_dearpygui.py (100%) rename python/src/{ffcraft_solver => xiv_csolver}/modules/__init__.py (100%) rename python/src/{ffcraft_solver => xiv_csolver}/modules/loader.py (98%) rename python/src/{ffcraft_solver => xiv_csolver}/modules/log.py (100%) rename python/src/{ffcraft_solver => xiv_csolver}/modules/solver.py (97%) rename python/src/{ffcraft_solver => xiv_csolver}/modules/translator.py (98%) rename python/src/{ffcraft_solver => xiv_csolver}/resources/ffcraft_solver.ico (100%) rename python/src/{ffcraft_solver => xiv_csolver}/resources/ffcraft_solver.png (100%) rename python/src/{ffcraft_solver => xiv_csolver}/ressources/ffcraft_solver.ico (100%) rename python/src/{ffcraft_solver => xiv_csolver}/ressources/ffcraft_solver.png (100%) delete mode 100644 python/tox.ini rename src/bin/{ffcraft.rs => xiv_csolver.rs} (73%) diff --git a/Cargo.lock b/Cargo.lock index 159871a..7de9c2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -552,7 +552,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] -name = "xiv_craft_solver" +name = "xiv_csolver" version = "0.1.5" dependencies = [ "clap", diff --git a/Cargo.toml b/Cargo.toml index b0bbad0..1eaf085 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "xiv_craft_solver" +name = "xiv_csolver" version = "0.1.5" edition = "2021" authors = ["谭俊健","Dandaedre","Vkyfox"] description = "Small XIV solver library in rust, with python and rust bindings" -homepage = "https://proxy.dandaedre.com/gitea/Dandaedre/rcraft_solver" -documentation = "https://proxy.dandaedre.com/gitea/Dandaedre/rcraft_solver" -repository = "https://proxy.dandaedre.com/gitea/Dandaedre/rcraft_solver.git" +homepage = "https://proxy.dandaedre.com/gitea/Dandaedre/xiv_csolver" +documentation = "https://proxy.dandaedre.com/gitea/Dandaedre/xiv_csolver" +repository = "https://proxy.dandaedre.com/gitea/Dandaedre/xiv_csolver.git" license = "MIT OR Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -39,13 +39,13 @@ no_python = [] # Removes the python bindings fast = [] # Remove some under optimisations that try to find other routes [lib] -name = "xiv_craft_solver" # Pending rename ffcraft_solver_lib +name = "xiv_csolver_lib" # Pending rename xiv_csolver_lib path = "src/lib.rs" crate-type = ["cdylib","rlib"] [[bin]] -name = "ffcraft_solver_cli" -path = "src/bin/ffcraft.rs" +name = "xiv_csolver_cli" +path = "src/bin/xiv_csolver.rs" [tool.maturin] python-source = "python" \ No newline at end of file diff --git a/Makefile.toml b/Makefile.toml index 351aa74..c53db5e 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -14,8 +14,8 @@ dependencies = [ script_runner="@shell" ignore_errors = true script = [ -"twine upload releases/ffcraft_solver*.whl --repository gitea", -"twine upload releases/xiv_craft_solver*.whl --repository gitea", +"twine upload releases/xiv_csolver*.whl --repository gitea", +"twine upload releases/xiv_csolver_lib*.whl --repository gitea", ] [tasks.format] @@ -46,8 +46,8 @@ script_runner = "@shell" script = ''' mkdir -p releases # Add version as an arg and things cp target/wheels/*.whl releases/ - zip releases/ffcraft_solver_cli_linux.zip -j target/release/ffcraft_solver_cli craft.toml -j target/release/libxiv_craft_solver.so - cd python/dist/ && zip ../../releases/ffcraft_solver_gui_linux.zip -r ffcraft_solver_gui_linux/ + zip releases/xiv_csolver_cli_linux.zip -j target/release/xiv_csolver_cli craft.toml -j target/release/libxiv_craft_solver.so + cd python/dist/ && zip ../../releases/xiv_csolver_gui_linux.zip -r xiv_csolver_gui_linux/ ''' [tasks.zip_win] @@ -55,8 +55,8 @@ script_runner = "@shell" script = ''' mkdir -p releases # Add version as an arg and things cp target/wheels/*.whl releases/ - tar acvf releases/ff_craft_solver_cli_win.zip .\craft.toml -C .\target\release\ ffcraft_solver_cli.exe libxiv_craft_solver.d - tar acvf releases/ff_craft_solver_gui_win.zip -C .\python\dist\ .\ffcraft_solver_gui_win\* + tar acvf releases/xiv_csolver_cli_win.zip .\craft.toml -C .\target\release\ xiv_csolver_cli.exe libxiv_craft_solver.d + tar acvf releases/xiv_csolver_gui_win.zip -C .\python\dist\ .\xiv_csolver_gui_win\* ''' [tasks.pip] @@ -78,13 +78,14 @@ linux_alias = "linux_pyinstaller" script_runner = "@shell" script = ''' cd python - pyinstaller src/ffcraft_solver/__main__.py -i "src/ffcraft_solver/ressources/ffcraft_solver.ico" --add-data "src/ffcraft_solver/configs/:ffcraft_solver/configs" --add-data "src/ffcraft_solver/ressources/:ffcraft_solver/ressources" --name ffcraft_solver_gui_linux -y + pyinstaller src/xiv_csolver/__main__.py -i "src/xiv_csolver/ressources/xiv_csolver.ico" --add-data "src/xiv_csolver/configs/:xiv_csolver/configs" --add-data "src/xiv_csolver/ressources/:xiv_csolver/ressources" --name xiv_csolver_gui_linux -y ''' [tasks.windows_pyinstaller] script_runner = "@shell" script = ''' - cd python && pyinstaller src\ffcraft_solver\__main__.py --add-data "src\ffcraft_solver\configs\;ffcraft_solver\configs" --add-data "src\ffcraft_solver\ressources\;ffcraft_solver\ressources" --name ffcraft_solver_gui_win -y + cd python + pyinstaller src\xiv_csolver\__main__.py -i "src/xiv_csolver/ressources/xiv_csolver.ico" --add-data "src\xiv_csolver\configs\;xiv_csolver\configs" --add-data "src\xiv_csolver\ressources\;xiv_csolver\ressources" --name xiv_csolver_gui_win -y ''' [tasks.build] @@ -100,6 +101,8 @@ args = ["develop", "--release"] command = "maturin" args = ["build", "--release"] +[tasks.rebuild] +dependencies = ["clean","build","maturin","pip"] [tasks.rust] dependencies = ["build","maturin"] \ No newline at end of file diff --git a/README.md b/README.md index 7737c21..48fafde 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# xiv_craft_solver +# xiv_csolver A rust program for solving FFXIV craft recipe. Originaly written by [RikaKagurasaka](https://github.com/RikaKagurasaka/xiv_craft_solver), @@ -19,7 +19,7 @@ When building the CLI invocation is done with the following parameters ``` Small XIV solver library in rust, with python and rust bindings -Usage: ffcraft [OPTIONS] +Usage: xiv_csolver_cli [OPTIONS] Options: -r, --recipe-name @@ -44,6 +44,11 @@ Options: Print version ``` ## Developpement +Please remember to set and use a venv before building +While not mandatory, using ``cargo-make`` will provide you with the commands: +- cargo make rebuild (rebuilding both the rust and pip bindings) +- cargo make release (rebuilding and bundling the executables (for your os)) in a releases folder + ### Rust Everything is located in the root & src. You can build the program (CLI) with cargo build the following features are available @@ -51,8 +56,9 @@ You can build the program (CLI) with cargo build the following features are avai - The ``no_python`` will not build the lib (WIP, not fully implemented) - The ``fast`` feature will not allow some under-optimisation to run (saving global run-time) - The ``verbose`` feature will allow even more debug messages (They might not be shown depending on the verbosity level hoever) + #### Maturin -To build the python module, run ``maturin develop`` or ``maturin build`` then ``maturin install`` +To build the python module, run either ``maturin develop`` or ``maturin build`` then ``maturin install`` ### Python #### Developping the GUI @@ -60,10 +66,9 @@ To build the python module, run ``maturin develop`` or ``maturin build`` then `` 1. Go to the ``python`` directory 2. Install the dev dependencies ``pip install -r requirements_dev.txt`` 3. Install the project (in editable mode) ``pip install -e .`` -4. Invoke the project (from anywhere) ``python -m ffcraft_solver`` +4. Invoke the project (from anywhere) ``python -m xiv_csolver`` 5. Edit the project and re-invoke it (no need to install / compile again) - #### Rust CLI Example Note: The recipe data can be retrieved from a [FFXIV Crafting Optimizer](https://yyyy.games/crafter/#/simulator) with checking of **Custom Recipe** after selecting the recipe. diff --git a/Todo.md b/Todo.md index 566f1d0..567f72f 100644 --- a/Todo.md +++ b/Todo.md @@ -7,10 +7,11 @@ 🟩 (GUI) Update on the Quality % 🟩 (GUI) Ability to save ✅ (GUI) Make the logging work - 🟩 (PKG) Rename libs, bin, python, exe + ✅ (PKG) Rename libs, bin, python, exe ### Important ✅ (PKG) Have cargo-make setup for release/cleanup/build ✅ (PKG) Merge latest pre-release for the GUI + ✅ (PKG) Have a rebuild function ### Features 🟩 (GUI) Refactor code diff --git a/pyproject.toml b/pyproject.toml index dc436d4..b998759 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["maturin>=0.14,<0.15"] build-backend = "maturin" [project] # The rust bindings -name = "xiv_craft_solver" +name = "xiv_csolver_lib" requires-python = ">=3.7" version = "0.1.5" classifiers = [ diff --git a/python/__ignore_setup.cfg b/python/__ignore_setup.cfg index 5681c80..565a2cf 100644 --- a/python/__ignore_setup.cfg +++ b/python/__ignore_setup.cfg @@ -8,8 +8,8 @@ classifiers = [options] packages = - ffcraft_solver - ffcraft_solver.modules + xiv_csolver + xiv_csolver.modules install_requires = pyyaml>=6.0 python_requires = >=3.9 @@ -21,7 +21,7 @@ zip_safe = no [options.packages.find] where = = src - = src/ffcraft_solver + = src/xiv_csolver [options.extras_require] testing = diff --git a/python/pyproject.toml b/python/pyproject.toml index a2e4dae..7f9030e 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=42.0", "wheel"] build-backend = "setuptools.build_meta" [project] # The Python GUI -name = "ffcraft_solver" +name = "xiv_csolver" authors = [ {name="Vkyfox"}, {name="Dandaedre"}, @@ -18,7 +18,7 @@ classifiers = [ ] [tool.pytest.ini_options] -addopts = "--cov=ffcraft_solver" +addopts = "--cov=xiv_csolver" testpaths = [ "tests", ] diff --git a/python/src/ffcraft_solver/__init__.py b/python/src/xiv_csolver/__init__.py similarity index 75% rename from python/src/ffcraft_solver/__init__.py rename to python/src/xiv_csolver/__init__.py index 8925872..99dbc25 100644 --- a/python/src/ffcraft_solver/__init__.py +++ b/python/src/xiv_csolver/__init__.py @@ -1,4 +1,4 @@ """ A rust program for solving FFXIV craft recipe. - - ffcraft_solver + - xiv_csolver """ diff --git a/python/src/ffcraft_solver/__main__.py b/python/src/xiv_csolver/__main__.py similarity index 99% rename from python/src/ffcraft_solver/__main__.py rename to python/src/xiv_csolver/__main__.py index e9a2aa9..caf91ad 100644 --- a/python/src/ffcraft_solver/__main__.py +++ b/python/src/xiv_csolver/__main__.py @@ -1,7 +1,7 @@ import time import dearpygui.dearpygui as dpg -from ffcraft_solver.modules import loader, log, solver +from xiv_csolver.modules import loader, log, solver import rich diff --git a/python/src/ffcraft_solver/configs/consumables.yaml b/python/src/xiv_csolver/configs/consumables.yaml similarity index 100% rename from python/src/ffcraft_solver/configs/consumables.yaml rename to python/src/xiv_csolver/configs/consumables.yaml diff --git a/python/src/ffcraft_solver/configs/recipes.yaml b/python/src/xiv_csolver/configs/recipes.yaml similarity index 100% rename from python/src/ffcraft_solver/configs/recipes.yaml rename to python/src/xiv_csolver/configs/recipes.yaml diff --git a/python/src/ffcraft_solver/configs/users.yaml b/python/src/xiv_csolver/configs/users.yaml similarity index 100% rename from python/src/ffcraft_solver/configs/users.yaml rename to python/src/xiv_csolver/configs/users.yaml diff --git a/python/src/ffcraft_solver/example.py b/python/src/xiv_csolver/example.py similarity index 58% rename from python/src/ffcraft_solver/example.py rename to python/src/xiv_csolver/example.py index 9b55efe..cda7867 100644 --- a/python/src/ffcraft_solver/example.py +++ b/python/src/xiv_csolver/example.py @@ -1,10 +1,10 @@ -import xiv_craft_solver +import xiv_csolver_lib import rich -rich.inspect(xiv_craft_solver) -rich.inspect(xiv_craft_solver.test_result) -rich.inspect(xiv_craft_solver.test_result()) -rich.inspect(xiv_craft_solver.test_result()) +rich.inspect(xiv_csolver_lib) +rich.inspect(xiv_csolver_lib.test_result) +rich.inspect(xiv_csolver_lib.test_result()) +rich.inspect(xiv_csolver_lib.test_result()) class FeedMeDaddy: @@ -28,5 +28,5 @@ class FeedMeDaddy: el_daddy = FeedMeDaddy() -rich.inspect(xiv_craft_solver.solve_from_python(el_daddy)) +rich.inspect(xiv_csolver_lib.solve_from_python(el_daddy)) diff --git a/python/src/ffcraft_solver/example_dearpygui.py b/python/src/xiv_csolver/example_dearpygui.py similarity index 100% rename from python/src/ffcraft_solver/example_dearpygui.py rename to python/src/xiv_csolver/example_dearpygui.py diff --git a/python/src/ffcraft_solver/modules/__init__.py b/python/src/xiv_csolver/modules/__init__.py similarity index 100% rename from python/src/ffcraft_solver/modules/__init__.py rename to python/src/xiv_csolver/modules/__init__.py diff --git a/python/src/ffcraft_solver/modules/loader.py b/python/src/xiv_csolver/modules/loader.py similarity index 98% rename from python/src/ffcraft_solver/modules/loader.py rename to python/src/xiv_csolver/modules/loader.py index 061a98b..3568906 100644 --- a/python/src/ffcraft_solver/modules/loader.py +++ b/python/src/xiv_csolver/modules/loader.py @@ -1,6 +1,6 @@ import yaml import os -from ffcraft_solver.modules import log +from xiv_csolver.modules import log class DefaultConfig: diff --git a/python/src/ffcraft_solver/modules/log.py b/python/src/xiv_csolver/modules/log.py similarity index 100% rename from python/src/ffcraft_solver/modules/log.py rename to python/src/xiv_csolver/modules/log.py diff --git a/python/src/ffcraft_solver/modules/solver.py b/python/src/xiv_csolver/modules/solver.py similarity index 97% rename from python/src/ffcraft_solver/modules/solver.py rename to python/src/xiv_csolver/modules/solver.py index 9974422..96234e4 100644 --- a/python/src/ffcraft_solver/modules/solver.py +++ b/python/src/xiv_csolver/modules/solver.py @@ -1,7 +1,7 @@ import rich -import xiv_craft_solver as xcs -from ffcraft_solver.__main__ import User, Recipe -from ffcraft_solver.modules import log, translator +import xiv_csolver_lib as xcs +from xiv_csolver.__main__ import User, Recipe +from xiv_csolver.modules import log, translator class Result: diff --git a/python/src/ffcraft_solver/modules/translator.py b/python/src/xiv_csolver/modules/translator.py similarity index 98% rename from python/src/ffcraft_solver/modules/translator.py rename to python/src/xiv_csolver/modules/translator.py index 33b3125..4897cf9 100644 --- a/python/src/ffcraft_solver/modules/translator.py +++ b/python/src/xiv_csolver/modules/translator.py @@ -1,4 +1,4 @@ -from ffcraft_solver.modules import log +from xiv_csolver.modules import log loggers = log.Loggers diff --git a/python/src/ffcraft_solver/resources/ffcraft_solver.ico b/python/src/xiv_csolver/resources/ffcraft_solver.ico similarity index 100% rename from python/src/ffcraft_solver/resources/ffcraft_solver.ico rename to python/src/xiv_csolver/resources/ffcraft_solver.ico diff --git a/python/src/ffcraft_solver/resources/ffcraft_solver.png b/python/src/xiv_csolver/resources/ffcraft_solver.png similarity index 100% rename from python/src/ffcraft_solver/resources/ffcraft_solver.png rename to python/src/xiv_csolver/resources/ffcraft_solver.png diff --git a/python/src/ffcraft_solver/ressources/ffcraft_solver.ico b/python/src/xiv_csolver/ressources/ffcraft_solver.ico similarity index 100% rename from python/src/ffcraft_solver/ressources/ffcraft_solver.ico rename to python/src/xiv_csolver/ressources/ffcraft_solver.ico diff --git a/python/src/ffcraft_solver/ressources/ffcraft_solver.png b/python/src/xiv_csolver/ressources/ffcraft_solver.png similarity index 100% rename from python/src/ffcraft_solver/ressources/ffcraft_solver.png rename to python/src/xiv_csolver/ressources/ffcraft_solver.png diff --git a/python/tox.ini b/python/tox.ini deleted file mode 100644 index 7fb9316..0000000 --- a/python/tox.ini +++ /dev/null @@ -1,29 +0,0 @@ -[tox] -minversion = 3.8.0 -envlist = py37, py38, py39, flake8, mypy -isolated_build = true - -[gh-actions] -python = - 3.7: py36, mypy, flake8 - 3.8: py38 - 3.9: py39 - -[testenv] -setenv = - PYTHONPATH = {toxinidir} -deps = - -r{toxinidir}/requirements_dev.txt -commands = - pytest --basetemp={envtmpdir} - -[testenv:flake8] -basepython = python3.10 -deps = flake8 -commands = flake8 src tests - -[testenv:mypy] -basepython = python3.10 -deps = - -r{toxinidir}/requirements_dev.txt -commands = mypy src diff --git a/src/bin/ffcraft.rs b/src/bin/xiv_csolver.rs similarity index 73% rename from src/bin/ffcraft.rs rename to src/bin/xiv_csolver.rs index 5e19355..de9c789 100644 --- a/src/bin/ffcraft.rs +++ b/src/bin/xiv_csolver.rs @@ -1,26 +1,24 @@ // #![warn(missing_docs,unsafe_code,unstable_features,)] + use clap::Parser; use std::time::Instant; -use xiv_craft_solver; +use xiv_csolver_lib; #[derive(Debug)] struct CustomError(String); fn main() { - let args = xiv_craft_solver::io::Args::parse(); - let params = xiv_craft_solver::io::Parameters::from_args(&args); + let args = xiv_csolver_lib::io::Args::parse(); + let params = xiv_csolver_lib::io::Parameters::from_args(&args); // Start timer let now = Instant::now(); println!("Solving..."); // Solve from config - let (recipe, stats) = xiv_craft_solver::load_from_config( - &args.recipe_name, - &args.file_name, - &args.character_name, - ); - let results = xiv_craft_solver::solve_craft(recipe, stats, params); + let (recipe, stats) = + xiv_csolver_lib::load_from_config(&args.recipe_name, &args.file_name, &args.character_name); + let results = xiv_csolver_lib::solve_craft(recipe, stats, params); // Stop timer let t_final = now.elapsed().as_millis(); @@ -40,21 +38,21 @@ fn main() { println!("[Final] {} results were found:", res.len()); #[cfg(feature = "verbose")] if args.verbose > 1 { - xiv_craft_solver::print_routes(&results); + xiv_csolver_lib::print_routes(&results); } } } } println!("\n > SOLUTION [Least steps] <"); - xiv_craft_solver::find_fast_route(&results) + xiv_csolver_lib::find_fast_route(&results) .unwrap() .pretty_print(); println!("\n > SOLUTION [Most durability] <"); - xiv_craft_solver::find_safe_route(&results) + xiv_csolver_lib::find_safe_route(&results) .unwrap() .pretty_print(); println!("\n > SOLUTION [Most quality] < "); - xiv_craft_solver::find_quality_route(&results) + xiv_csolver_lib::find_quality_route(&results) .unwrap() .pretty_print(); diff --git a/src/io.rs b/src/io.rs index 9dfe7b4..83457d4 100644 --- a/src/io.rs +++ b/src/io.rs @@ -2,7 +2,7 @@ use crate::Craft; use clap::Parser; use core::fmt::Display; -#[cfg(not(feature = "no_python"))] +// #[cfg(not(feature = "no_python"))] use pyo3::prelude::*; #[derive(Debug, Clone, Copy)] @@ -187,7 +187,7 @@ impl Parameters { /// A Python module implemented in Rust. #[cfg(not(feature = "no_python"))] #[pymodule] -fn xiv_craft_solver(_py: Python, m: &PyModule) -> PyResult<()> { +fn xiv_csolver_lib(_py: Python, m: &PyModule) -> PyResult<()> { m.add_function(wrap_pyfunction!(test_result, m)?)?; m.add_function(wrap_pyfunction!(solve_from_python, m)?)?; Ok(()) -- 2.45.1