Skip to content

codeplain packaging#41

Merged
zanjonke merged 6 commits intomainfrom
feat/packaging
Jan 26, 2026
Merged

codeplain packaging#41
zanjonke merged 6 commits intomainfrom
feat/packaging

Conversation

@zanjonke
Copy link
Copy Markdown
Contributor

This PR introduces the necessary changes for enabling the packaging of the plain2code_client into a python package and publishing it on PyPi.

  • I updated the pyproject.toml
  • Updated how the DEFAULT_TEMPLATE_DIRS is computed.
  • Moved LOGGING_CONFIG_PATH to a cli arg
  • Moved system_config to a separate folder
  • Removed support for codeplain_local_api
  • Moved main into main()
  • Added a github action to publish the package to PyPi automatically on every release.

The workflow is:

  • Run python -m build
  • Run twine upload dist/* (PyPi API key is needed here)

Once we separate the server from the client, this PR can serve as a starting point.

@zanjonke zanjonke force-pushed the feat/packaging branch 5 times, most recently from 36b5fc4 to e71125a Compare January 23, 2026 15:38
@zanjonke zanjonke changed the title Feat/packaging codeplain packaging Jan 23, 2026
Comment thread plain2code.py Outdated
logging.getLogger("transitions").setLevel(logging.WARNING)
logging.getLogger("repositories").setLevel(logging.WARNING)
logging.getLogger("google_genai").setLevel(logging.WARNING)
logging.getLogger("openai").setLevel(logging.WARNING)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
logging.getLogger("openai").setLevel(logging.WARNING)
logging.getLogger("openai").setLevel(logging.WARNING)
logging.getLogger("transitions").setLevel(logging.ERROR)
logging.getLogger("transitions.extensions.diagrams").setLevel(logging.ERROR)

Comment thread plain2code.py Outdated
Comment on lines +109 to +110
logging.getLogger("google_genai").setLevel(logging.WARNING)
logging.getLogger("openai").setLevel(logging.WARNING)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also, do we need to set google_genai and openapi logging levels - since this is now only client code?

Comment thread plain2code.py
console.error(f"Error rendering plain code: {str(e)}\n")
console.debug(f"Render ID: {run_state.render_id}")
traceback.print_exc()
dump_crash_logs(args)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Revert

@zanjonke zanjonke force-pushed the feat/packaging branch 2 times, most recently from 5e1b99c to 91bbb59 Compare January 26, 2026 08:03
@zanjonke zanjonke merged commit 8b178fa into main Jan 26, 2026
10 checks passed
@zanjonke zanjonke deleted the feat/packaging branch January 26, 2026 13:53
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