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

feat: ast-based helpers #111

Merged
merged 35 commits into from
Jan 23, 2024

Conversation

ojeytonwilliams
Copy link
Contributor

@ojeytonwilliams ojeytonwilliams commented Jan 11, 2024

  • feat: add ast helpers + build script
  • build: add python tests

Checklist:

This is mostly a proof of concept. The idea being that the python test runner can import the astHelper string, evaluate it and then import the new helper functions.

freeCodeCamp/freeCodeCamp#53125 contains a simple example of how they can be used.

Copy link

socket-security bot commented Jan 11, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

View full report↗︎

@ojeytonwilliams ojeytonwilliams marked this pull request as ready for review January 11, 2024 14:37
@ojeytonwilliams ojeytonwilliams requested a review from a team as a code owner January 11, 2024 14:37
lib/index.ts Outdated Show resolved Hide resolved
Copy link

socket-security bot commented Jan 22, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

ShaunSHamilton
ShaunSHamilton previously approved these changes Jan 23, 2024
Copy link
Member

@ShaunSHamilton ShaunSHamilton left a comment

Choose a reason for hiding this comment

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

We just won't talk about:
image

Also, I assume in another PR we would want to add python/*.py to .gitignore?

What is the point of adding the mock-script for Jest? Why not just ignore everything in python/ when running the tests?

@ojeytonwilliams
Copy link
Contributor Author

Also, I assume in another PR we would want to add python/*.py to .gitignore?

Why? It's source code.

What is the point of adding the mock-script for Jest? Why not just ignore everything in python/ when running the tests?

How, though? Jest tries to import python/py_helpers.py and throws an error because it doesn't know how to deal with python code. Is there a way to make Jest not do that?

@ShaunSHamilton
Copy link
Member

Why? It's source code.

Is it not just used in the build, and then imported as a JS string?

@ojeytonwilliams ojeytonwilliams enabled auto-merge (squash) January 23, 2024 10:19
Copy link
Member

@ShaunSHamilton ShaunSHamilton left a comment

Choose a reason for hiding this comment

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

LGTM 👍

At some point, it would be nice to npmignore1 the Python stuffs.


Footnotes

  1. not gitignore 🤦‍♂️

@ojeytonwilliams ojeytonwilliams merged commit 5ed512a into freeCodeCamp:main Jan 23, 2024
4 checks passed
@ojeytonwilliams ojeytonwilliams deleted the feat/ast-helpers branch January 23, 2024 10:26
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.

2 participants