Skip to content

mise port and python setup#253

Open
jasonmorais wants to merge 2 commits into
mainfrom
jason/mise-port
Open

mise port and python setup#253
jasonmorais wants to merge 2 commits into
mainfrom
jason/mise-port

Conversation

@jasonmorais
Copy link
Copy Markdown
Contributor

@jasonmorais jasonmorais commented May 14, 2026

Summary by Sourcery

Set up unified Node.js and Python tooling via mise, add Python dependency management, and document the new installation and build workflow.

New Features:

  • Introduce mise-based toolchain configuration for Node.js and Python via a new mise.toml.
  • Add a Python requirements file to manage tooling dependencies such as Sourcery.

Enhancements:

  • Add composite install scripts to install both Node.js and Python dependencies from the repository root.
  • Tweak OAuth2 mock login handler code style for the nonce selection logic.

Documentation:

  • Extend the README with prerequisites and step-by-step instructions for installing tools, dependencies, and building the project using mise and pnpm.

Chores:

  • Ignore Python virtual environment artifacts via version control configuration if applicable.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 14, 2026

Reviewer's Guide

Introduces mise-based Node.js and Python environment setup, documents prerequisite tooling and install commands, adds Python tooling requirements, and wires new install scripts into the monorepo while making a minor refactor to an OAuth2 login handler.

Flow diagram for new install:all tooling setup

flowchart TD
    Dev[Developer in project root] --> A[Run pnpm run install:all]
    A --> B[pnpm i
Install Node.js workspace dependencies]
    A --> C[pnpm run install:python]
    C --> D[python -m pip install -r requirements.txt
Install Sourcery and Python tools]

    subgraph MiseEnvironment[Managed by mise.toml]
        E[node 22.22.2]
        F[python 3.13]
        G[.venv Python virtualenv]
    end

    Dev --> MiseEnvironment
    E -.provides runtime for.-> B
    F -.creates.-> G
    G -.used by.-> D
Loading

File-Level Changes

Change Details Files
Document mise-based local dev prerequisites and workflows in the README.
  • Add Prerequisites section describing mise installation and shell activation
  • Document mise install to provision Node.js and Python plus a project .venv
  • Describe combined and Python-only dependency installation via pnpm scripts
  • Add basic build command documentation using pnpm run build
readme.md
Configure mise to manage Node.js and Python versions and virtual environment for the project.
  • Create mise.toml specifying Node.js 22.22.2 and Python 3.13 versions
  • Enable auto-install of tools when entering the project directory
  • Configure PATH to include local node_modules/.bin and define a .venv Python virtualenv with auto-create
mise.toml
Add Python tooling dependencies and pnpm helper scripts to install them.
  • Introduce requirements.txt pinning Sourcery as a Python dependency
  • Add install:all script to install Node workspace deps and Python requirements
  • Add install:python script to install Python requirements via pip
package.json
requirements.txt
Minor refactor of OAuth2 login handler nonce selection logic without behavior change.
  • Rewrite safeNonce ternary to a single-line expression while preserving the existing precedence of existing session nonce vs. query nonce
packages/cellix/server-oauth2-mock-seedwork/src/login-handlers.ts

Possibly linked issues

  • #Replace nvm with mise as Node version manager: PR adds mise.toml and README instructions for mise-based Node/Python setup, matching the requested version manager migration.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@jasonmorais jasonmorais changed the title commut for verify mise port and python setup May 14, 2026
@jasonmorais jasonmorais marked this pull request as ready for review May 14, 2026 18:07
@jasonmorais jasonmorais requested a review from a team May 14, 2026 18:07
@jasonmorais jasonmorais requested a review from a team as a code owner May 14, 2026 18:07
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The compressed ternary assignment for safeNonce reduces readability compared to the previous multi-line version; consider reverting to a multi-line format or breaking it up for clarity.
  • The install:python script assumes python is the correct interpreter name; consider using python3 or python -m pip via an environment variable (e.g., PYTHON) or mise exec to avoid issues on systems where python is not bound to the intended version.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The compressed ternary assignment for `safeNonce` reduces readability compared to the previous multi-line version; consider reverting to a multi-line format or breaking it up for clarity.
- The `install:python` script assumes `python` is the correct interpreter name; consider using `python3` or `python -m pip` via an environment variable (e.g., `PYTHON`) or `mise exec` to avoid issues on systems where `python` is not bound to the intended version.

## Individual Comments

### Comment 1
<location path="readme.md" line_range="55" />
<code_context>
+This automatically:
+- Installs **Node.js v22.22.2** (from `mise.toml`)
+- Installs **Python 3.13** (from `mise.toml`)
+- Creates `.venv/` Python virtual environment when mise activates the project
+
+### Install dependencies
</code_context>
<issue_to_address>
**nitpick (typo):** Consider adding an article before ".venv/ Python virtual environment" for smoother grammar.

For example: "Creates a `.venv/` Python virtual environment when mise activates the project" or "Creates the `.venv/` Python virtual environment when mise activates the project."

```suggestion
- Creates a `.venv/` Python virtual environment when mise activates the project
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread readme.md
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.

1 participant