-
Notifications
You must be signed in to change notification settings - Fork 1
chore: Start migration to uv & ruff & hatch #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0896fab
to
7459a61
Compare
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: |
There was a problem hiding this comment.
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
7459a61
to
a2e36b4
Compare
@plun1331 would you mind taking a look at this when you have time ? |
…or voice and speed
run: mkdir -p -v .mypy_cache | ||
- name: "Run mypy" | ||
run: mypy --non-interactive discord/ | ||
pytest: |
There was a problem hiding this comment.
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
@VincentRPS too |
There was a problem hiding this 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
* 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
* 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]>
uv -> package manager
ruff -> linter + formatter
hatch -> build system (instead of setuptools)