Skip to content

Conversation

Paillat-dev
Copy link
Member

@Paillat-dev Paillat-dev commented May 13, 2025

uv -> package manager
ruff -> linter + formatter
hatch -> build system (instead of setuptools)

@Paillat-dev Paillat-dev requested a review from Lulalaby as a code owner May 13, 2025 19:26
@Paillat-dev Paillat-dev marked this pull request as draft May 13, 2025 19:26
@Paillat-dev Paillat-dev changed the title Start migration to uv Start migration to uv& ruff & hatch May 13, 2025
@Paillat-dev Paillat-dev changed the title Start migration to uv& ruff & hatch Start migration to uv & ruff & hatch May 13, 2025
@Paillat-dev Paillat-dev marked this pull request as ready for review May 13, 2025 21:16
codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \
uv run codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \
--exclude-file=".github/workflows/codespell.yml"
bandit:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: removed because included in the ruff linter

@Paillat-dev Paillat-dev changed the title Start migration to uv & ruff & hatch chore: Start migration to uv & ruff & hatch May 26, 2025
@Paillat-dev
Copy link
Member Author

@plun1331 would you mind taking a look at this when you have time ?

run: mkdir -p -v .mypy_cache
- name: "Run mypy"
run: mypy --non-interactive discord/
pytest:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: despite being called pytest this didn't run any tests but rather just ran the linting checks which is now done by ruff

@Paillat-dev
Copy link
Member Author

@VincentRPS too

Copy link

@VincentRPS VincentRPS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will wait for @plun1331

@plun1331 plun1331 merged commit 43ee782 into master May 29, 2025
9 checks passed
Paillat-dev added a commit that referenced this pull request Jun 24, 2025
* Start migration to uv

* Setup ruff and hatch

* Change pre-commit to use ruff

* Format with ruff

* Fix mistake

* Add dev deps

* Change workflows to use uv and ruff

* ➕ Add colorlog and remove requirements folder and fix build

* 💚 Fix sphinx build ?

* 🐛 Add __version.py for version management and update import in __init__.py

* ✏️ Update lib-checks.yml to run ruff on ubuntu-latest

* 🐛 Update lib-checks.yml to run mypy with uv

* 🔥 Delete MANIFEST.in

* ✨ Enhance lib-checks.yml to include ruff formatter check

* ♻️ Refactor pyproject.toml and uv.lock to use optional-dependencies for voice and speed
@Paillat-dev Paillat-dev deleted the feat/setup-uv branch August 18, 2025 20:26
VincentRPS pushed a commit that referenced this pull request Sep 4, 2025
* Move utils.py to utils/

* 🔥 Remove `filter_params`

* ♻️ Merge `time_snowflake` and `generate_snowflake`, move `basic_autocomplete` to `utils/public.py`

* ♻️ Merge `time_snowflake` and `generate_snowflake`, move `basic_autocomplete` to `utils/public.py`

* 🔥 Remove `utils.sleep_until`

* chore: Start migration to uv & ruff & hatch (#4)

* Start migration to uv

* Setup ruff and hatch

* Change pre-commit to use ruff

* Format with ruff

* Fix mistake

* Add dev deps

* Change workflows to use uv and ruff

* ➕ Add colorlog and remove requirements folder and fix build

* 💚 Fix sphinx build ?

* 🐛 Add __version.py for version management and update import in __init__.py

* ✏️ Update lib-checks.yml to run ruff on ubuntu-latest

* 🐛 Update lib-checks.yml to run mypy with uv

* 🔥 Delete MANIFEST.in

* ✨ Enhance lib-checks.yml to include ruff formatter check

* ♻️ Refactor pyproject.toml and uv.lock to use optional-dependencies for voice and speed

* Setup CHANGELOG.md (#6)

* chore: update docs workflows to use 'uv' for dependency management (#33)

* chore: Update localization workflows to use 'uv' for dependency management

* chore: refactor Read the Docs configuration to use uv

* 🔥 Move stuff to private

* :refactor: move parse_time function to private utils and update references

* 📝 update CHANGELOG to reflect utility function changes

* 🎨 Format

* ♻️ move deprecation utilities to private utils and update references

* ♻️ move snowflake_time function to public.py

* ♻️ move oauth_url and Undefined class to public.py; update imports

* 📝 remove deprecated utility functions from documentation

* 📝 remove (re)moved utility functions from documentation

* 📝 add utils.resolve_template to changelog and remove from documentation

* 🐛 fix import path for warn_deprecated utility function

* :refactor: reorganize utility function imports and move evaluate_annotation to private module

* ♻️ update import paths for utility functions to use relative imports

* ♻️ move delay_task function to private

* ♻️ removed `utils.get` in favor of `utils.find`

* ♻️ removed `utils._unique`

It was used twice, and once it wasn't even necessary

* ♻️ move `async_all` to private

* ♻️ move `maybe_coroutine` to private

* ♻️ rename `maybe_coroutine` to `maybe_awaitable`

* ♻️ move `sane_wait_for` to private

* ♻️ move `format_dt` to public

* ♻️ remove `as_chunks` function

* 📝 update `utils.sleep_until` and `utils.parse_time` changelog to suggest alternatives

* ♻️ move `compute_timedelta` function

* ♻️ move `valid_icon_size` to `asset.py`

* ♻️ refactor `utils.get` to `utils.find` across multiple files

* ♻️ refactor markdown and mention handling functions in `__init__.py` and `public.py`

* ♻️ move SnowflakeList to `private.py`

* ♻️ move `find` function from `__init__.py` to `public.py`

* ♻️ move `copy_doc` to private

* ♻️ refactor `get` to `find` in onboarding and sticker modules

* 🐛 fix `copy_doc` decorator usage in context.py

* ♻️ move SequenceProxy to private module

* ♻️ move cached_slot_property to private

* 🚨 add noqa comments to prevent linting errors

* ♻️ move get_slots function to private module

* ♻️ refactor JSON serialization functions to private module

* ♻️ replace custom cached_property implementation with functools.cached_property

* ✏️ fix typo in CHANGELOG-V3.md

* ➖ remove unused dependencies from pyproject.toml and uv.lock

* ⚰️ remove test.py

* ♻️ remove duplicate import of raw_mentions in __init__.py

* 🐛 fix raw_role_mentions import in utils/__init__.py

* 🔥 Duplicate `Iterable` import

* Apply suggestion from @Lumabots

Co-authored-by: Lumouille <[email protected]>
Signed-off-by: Paillat <[email protected]>

* 🔥 Simplify imports

* 🔥 Simplify imports number 2

* 🔥 Simplify imports number 3 omg this is amazing

* 🔥 Simplify imports number 4 omg this is amazing yee

* 🔥 Simplify imports number 5

* Update discord/ext/commands/converter.py

Co-authored-by: Ice Wolfy <[email protected]>
Signed-off-by: Paillat <[email protected]>

* Apply suggestions from code review

Co-authored-by: Ice Wolfy <[email protected]>
Co-authored-by: Lumouille <[email protected]>
Signed-off-by: Paillat <[email protected]>

* Update discord/state.py

Co-authored-by: Lumouille <[email protected]>
Signed-off-by: Paillat <[email protected]>

* Update discord/state.py

Co-authored-by: Lumouille <[email protected]>
Signed-off-by: Paillat <[email protected]>

* ♻️ Remove _ prefix in from and to json

* ♻️ Make import less weird

* Update utils.po

Signed-off-by: Paillat <[email protected]>

* empty commit

* Update discord/poll.py

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paillat <[email protected]>

* Update discord/utils/private.py

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Paillat <[email protected]>

* 🐛 Fix broken import after merge

* 🐛 Fix emojis.json path

* 🐛 Fix broken imports

* 🎨 Format stuff

* 🐛 Fix import

---------

Signed-off-by: Paillat <[email protected]>
Signed-off-by: Paillat <[email protected]>
Co-authored-by: Lumouille <[email protected]>
Co-authored-by: Ice Wolfy <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants