Skip to content

Conversation

@kp992
Copy link
Contributor

@kp992 kp992 commented Jun 6, 2025

Fixes QuantEcon/quantecon-theme#2.

@stevejpurves Please take a look at the fix for removing .myst suffix from the base repo URL.

I have a quick question, if the PR is merged, we need to make any changes to https://github.com/curvenote-themes/quantecon? or how do we sync these changes?

cc @mmcky

@stevejpurves
Copy link
Contributor

stevejpurves commented Jun 6, 2025

@kp992 the change looks sensible. Are you setup ok for local development and testing? i.e. you are able to run locally against your content?

e.g.

# terminal 1

npm install
npm run build:css
npm run dev
# terminal 2

cd quantecon-content
myst start --headless

Changeset

Please add a (patch) changeset to this PR by running:

npx changeset

Post merge workflow

  1. build & test from main
  2. When read to release run npm run version to bump versions and update changelog
  3. commit with a message like vX.Y.Z
  4. deploy using make deploy - which should build a packaged theme and push it to curvenote-themes/quantecon.

I can set you up with push rights to this repo and the "deployed" theme package over at curvenote-themes/quantecon (cc @mmcky). I'm happy to respond on issues and review PRs, but then this gives you autonomy.

@kp992
Copy link
Contributor Author

kp992 commented Jun 6, 2025

This did fix the issue. Verified it by running locally. Thanks @stevejpurves for providing the details to setup that.

@kp992
Copy link
Contributor Author

kp992 commented Jun 9, 2025

@stevejpurves I see a quantecon-theme repo moved under QuantEcon: https://github.com/QuantEcon/quantecon-theme. Do you also plan to shift the current repo under QuantEcon?

@stevejpurves
Copy link
Contributor

let me get back to you @kp992

@rowanc1
Copy link
Contributor

rowanc1 commented Jun 9, 2025

@kp992 @stevejpurves I have moved this over to quantecon now as well. The make file might need to be updated with the new repository locations.

@kp992
Copy link
Contributor Author

kp992 commented Jun 9, 2025

Thank you @rowanc1 and @stevejpurves!

@kp992
Copy link
Contributor Author

kp992 commented Jun 12, 2025

Thanks @stevejpurves for the instructions to push the changes. It throws the following error:

This warning is just to give you a heads-up. There is a small chance of
  breakage even though the patch was applied successfully. Make sure the package
  still behaves like you expect (you wrote tests, right?) and then run

    patch-package jupyterlab-plotly

  to update the version in the patch file name and make this warning go away.

Error: Patch file found for package react-syntax-highlighter which is not present at node_modules/@types/react-syntax-highlighter

I haven't worked a lot with JS and so I am really sorry if it's very newbie question.

@kp992 kp992 merged commit 63662af into QuantEcon:main Jun 12, 2025
@kp992 kp992 deleted the fix-colab-button branch June 12, 2025 03:30
@kp992
Copy link
Contributor Author

kp992 commented Jun 12, 2025

Oh sorry, the above one just got ignored and worked. But when I do make deploy, I get:

Building Remix app in production mode...
The path "@myst-theme/site/src/components/Navigation/Search" is imported in app/components/toolbar/Toolbar.tsx but "@myst-theme/site/src/components/Navigation/Search" was not found in your node_modules. Did you forget to install it?
✘ [ERROR] No matching export in "node_modules/simple-validators/dist/index.js" for import "validateDomain"

    node_modules/myst-frontmatter/dist/socials/validators.js:1:102:
      1 │ ...ateUrl, validationError, validateDomain, } from 'simple-validato...
        ╵                             ~~~~~~~~~~~~~~


make[2]: *** [build-theme] Error 1
make[1]: *** [deploy-theme] Error 2
make: *** [deploy-quantecon] Error 2

@kp992
Copy link
Contributor Author

kp992 commented Jun 12, 2025

Here's the PR that I used for running those commands: #8.

@stevejpurves
Copy link
Contributor

@kp992 on the first warning/error you should do 2 things:

  1. Is looks like the patch for react-syntax-highlighter is no longer needed, you can remove this from the patches folder.
  2. on the jupyterlab-plotly - I think the version in your lockfile has moved and no longer matches the version in your patch package, you can either leave this as-is and hope it works or create a new patch for the correct version.

The patch package is used when we need to make small changes to dependencies that we are not in control of. Bit of a last resort action, but sometimes we have to use it. See the docs for more https://www.npmjs.com/package/patch-package

@stevejpurves
Copy link
Contributor

@kp992

On that second era on deployment, that looks like something shifted in the MyST dependencies. I would suggest that in a separate PR you bump all of the MyST theme dependencies to the latest released version. There might be some some changes there that you need to apply, but I would suggest doing that anyway from a maintenance point of view. This area that you're getting definitely looks like something has shifted in those packages, so potentially something's changed again in your lock file.

Anyway, my first point of call would be upgrading the mis-themed packages in order to deal with that problem you're seeing at deployment.

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.

Error in Colab Launcher

3 participants