Skip to content
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

Improve and refactor noxfile to prepare for translation commands #379

Merged
merged 6 commits into from
Sep 7, 2024

Conversation

CAM-Gerlach
Copy link
Member

Pull Request

Pull Request Checklist

  • Read and followed this repo's Contributing Guidelines
  • Based your PR on the latest version of the correct branch (master or 4.x)
  • Checked your writing carefully for correct English spelling, grammar, etc
  • Described your changes and the motivation for them below

Description of Changes

Followup to #377

As I started to work through adding the relevant translation commands, I ended up finding a number of additional limitations, corner-case bugs and structural or needing to make a number of significant improvements, fixes and refactorings to the noxfile along the way. To keep things atomic and moving along and avoid jamming large and non-directly-related changes (e.g. adding the whole po-file structure and building that I have locally) into one big PR, I've split out these into a separate one that can (hopefully) get merged quickly prior to me dropping the translations PR that I'm working on in parallel.

Additionally, these improvements also further improve the noxfile's suitability to be easily re-used for many other Spyder projects, with only relatively small and self-contained modifications.

In particular, the main changes here:

  • Make Nox commands up to ≈2.5x faster by skipping installation entirely if the dependencies are already present, error on bad invocations, refactor and present friendlier output
  • Improve Sphinx invocation generator to better handle arbitrary builders (e.g. gettext), be more robust and refactor for cleaner code
  • Update the Contributing Guide to incorporate these two improvements, clarify how users can pass extra args to nox -s build and split the Build section into separate, easier to follow parts just for Nox and manual installations respectively, as well as other smaller fixes
  • Fix nox -s clean so it actually works and add --ignore option to it
  • Add argument passthrough to nox -s install so users can pass extra args to pip, e.g. --upgrade to upgrade the Nox environment to the latest versions of the dependencies
  • Upgrade the uppercaps to allow Sphinx 8 and Sphinx-Design 0.6

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @CAM-Gerlach!

@ccordoba12 ccordoba12 merged commit 9ce860a into spyder-ide:master Sep 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants