diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 73d6dc5d..13a5bc73 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: name: Run pytest and check if tests pass entry: | bash -c ' - pytest --cov --cov-report term-missing --show-capture=no | tee pytest_output.txt + uv run pytest --cov --cov-report term-missing --show-capture=no | tee pytest_output.txt pytest_exit_code=${PIPESTATUS[0]} if [ $pytest_exit_code -ne 0 ]; then echo "Tests failed." >&2 @@ -31,7 +31,7 @@ repos: name: Run pylint entry: | bash -c ' - pylint $(git ls-files "*.py") | tee pylint_output.txt + uv run pylint $(git ls-files "*.py") | tee pylint_output.txt if ! grep -q "Your code has been rated at 10.00/10" pylint_output.txt; then echo "Lint score is below 10/10." >&2 exit 1 @@ -42,6 +42,6 @@ repos: - id: black name: Check black formatting - entry: bash -c "black --check ." + entry: bash -c "uv run black --check ." language: system pass_filenames: false diff --git a/docs/tutorials/getting_started/setup.md b/docs/tutorials/getting_started/setup.md index 17ca0445..62c5d16f 100644 --- a/docs/tutorials/getting_started/setup.md +++ b/docs/tutorials/getting_started/setup.md @@ -8,11 +8,11 @@ The DJ Tools library requires a minimum version of Python 3.9. As always, when w - Windows installation: [Windows releases](https://www.python.org/downloads/windows/) ## DJ Tools -1. Run `uv pip install "djtools[accelerated]"` to install the DJ Tools library - - To install DJ Tools without the accelerated computation for Levenshtein distance (might be difficult to install the binaries for non-technical users), run `uv pip install djtools` - - You can install the pre-release version with `uv pip install djtools --pre` - - If you want to restrict the version being installed to not include, say, the next minor version's beta release then you can do so like `uv pip install "djtools<2.5.0" --pre` - - Note that installing with the `--pre` flag will also install pre-release versions for all dependencies which may cause breakage, in that case you can target specific pre-release versions like this `uv pip install djtools==2.4.1-rc9` +1. Run `pip install "djtools[accelerated]"` to install the DJ Tools library + - To install DJ Tools without the accelerated computation for Levenshtein distance (might be difficult to install the binaries for non-technical users), run `pip install djtools` + - You can install the pre-release version with `pip install djtools --pre` + - If you want to restrict the version being installed to not include, say, the next minor version's beta release then you can do so like `pip install djtools<2.5.0 --pre` + - Note that installing with the `--pre` flag will also install pre-release versions for all dependencies which may cause breakage, in that case you can target specific pre-release versions like this `pip install djtools==2.4.1-rc9` 1. Confirm your installation works by running `djtools` 1. [Optional] link the `configs` directory of the installation to a user-friendly location for easy editing of your config files: `djtools --link-configs path/to/new/location/` 1. Edit your configuration files to support your usage needs ([see here for more details](configuration.md)) diff --git a/docs/tutorials/getting_started/usage.md b/docs/tutorials/getting_started/usage.md index f6e92dd4..413e28db 100644 --- a/docs/tutorials/getting_started/usage.md +++ b/docs/tutorials/getting_started/usage.md @@ -54,7 +54,7 @@ For example, whenever I install the newest version of DJ Tools, I remove my link install djtools: -`uv pip install djtools` +`pip install djtools` run the following command to link the installed configs directory: diff --git a/scripts/collection/get_hot_cue_timings.py b/scripts/collection/get_hot_cue_timings.py index 2a5a3924..83af2236 100644 --- a/scripts/collection/get_hot_cue_timings.py +++ b/scripts/collection/get_hot_cue_timings.py @@ -19,7 +19,7 @@ except ModuleNotFoundError as exc: msg = ( 'The "BeautifulSoup" library is required; install with ' - "'uv pip install bs4'" + "'pip install bs4'" ) logger.critical(msg) raise RuntimeError(msg) from exc @@ -165,7 +165,7 @@ def get_tracks_from_collection(xml_path: str) -> List[Track]: except FeatureNotFound as exc: msg = ( 'Could not open %s; please install "lxml" by running ' - "'uv pip install lxml'" % str(path) + "'pip install lxml'" % str(path) ) logger.critical(msg) raise RuntimeError(msg) from exc diff --git a/scripts/repair/swap_title_artist.py b/scripts/repair/swap_title_artist.py index 273d5d42..a04c7f42 100644 --- a/scripts/repair/swap_title_artist.py +++ b/scripts/repair/swap_title_artist.py @@ -72,7 +72,7 @@ except ImportError: logger.warning( "NOTE: Track similarity can be made faster by running " - '`uv pip install "djtools[levenshtein]"`' + '`pip install "djtools[levenshtein]"`' ) diff --git a/src/djtools/__main__.py b/src/djtools/__main__.py index 28aa7ffc..a2a2c484 100644 --- a/src/djtools/__main__.py +++ b/src/djtools/__main__.py @@ -42,7 +42,7 @@ logger = logging.getLogger(__name__) logger.warning( "NOTE: Track similarity can be made faster by running " - "`uv pip install python-Levenshtein`" + "`pip install python-Levenshtein" ) diff --git a/uv.lock b/uv.lock index 884f560c..ff88ecc9 100644 --- a/uv.lock +++ b/uv.lock @@ -737,7 +737,7 @@ wheels = [ [[package]] name = "djtools" -version = "2.9.1rc3" +version = "2.9.1rc4" source = { editable = "." } dependencies = [ { name = "asyncpraw" },