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

refactor!: convert plcc.py to python package plcc #122

Merged
merged 1 commit into from
Apr 28, 2024
Merged

Conversation

StoneyJackson
Copy link
Member

@StoneyJackson StoneyJackson commented Apr 22, 2024

refactor!: convert plcc.py to python package plcc

BREAKING CHANGE:

plcc is now a Python package, and plcc.py has been removed.
So plcc.py can no longer be called directly like this

    python3 path/to/plcc.py grammar

Instead, use plcc like this

    plcc grammar

---

This commit restructures the PLCC codebase into that of a
conventional Python project. This should make it easier to
redesign the internal structure of PLCC, making it easier to
maintain and add new functionality. It should also help us
prepare to distribute PLCC through PyPI, making it easier
to install. Here is a summary of changes.

- Convert plcc.py into python package plcc
- Remove environment variable LIBPLCC
- Move src/Std/ under src/plcc (the PLCC Python package)
- Move lib/jackson under src/plcc (the PLCC Python package)
- Pull common functionality of scripts into common.bash

---

Related Issues

- Related to #119
- Closes #121 
- Closes #120 

To review the changes

Use the "Files Changed" tab above.

To review the full file tree

Do one of the following...

  • View it on GitHub.
  • View it locally by cloning this project and switch to the reorg feature branch:
    git clone https://github.com/ourPLCC/plcc
    cd plcc
    git switch reorg

Test it locally

  1. Clone it locally and switch to the reorg branch (as shown above).
  2. Add the full path to plcc/bin to your PATH and undefine LIBPLCC. Assuming you are in the root of the project:
    PATH="$(pwd)/src/plcc/bin:$PATH"
    LIBPLCC=
  3. Try it out.
  4. When you are done, exit the current terminal and things should go back to normal.

Test it in GitPod

  1. Open any project in GitPod.
  2. Install PLCC from this PR's branch:
    PLCC_GIT_BRANCH=reorg /bin/bash -c "$(\curl -fsSL https://github.com/ourPLCC/plcc/raw/reorg/installers/plcc/install.bash)" >> ~/.bashrc
  3. Open a new terminal.
  4. Try it out.
  5. When you are done, stop the GitPod workspace and throw it away.

@StoneyJackson StoneyJackson force-pushed the reorg branch 2 times, most recently from d9149a5 to 98ee327 Compare April 22, 2024 15:11
BREAKING CHANGE:

plcc is now a Python package, and plcc.py has been removed.
So plcc.py can no longer be called directly like this

    python3 path/to/plcc.py grammar

Instead, use plcc like this

    plcc grammar

---

This commit restructures the PLCC codebase into that of a
conventional Python project. This should make it easier to
redesign the internal structure of PLCC, making it easier to
maintain and add new functionality. It should also help us
prepare to distribute PLCC through PyPI, making it easier
to install. Here is a summary of changes.

- Convert plcc.py into python package plcc
- Remove environment variable LIBPLCC
- Move src/Std/ under src/plcc (the PLCC Python package)
- Move lib/jackson under src/plcc (the PLCC Python package)
- Pull common functionality of scripts into common.bash

---

Related Issues

- Related to #119
- Closes #121
- Closes #120
@StoneyJackson StoneyJackson merged commit c68bb6b into main Apr 28, 2024
4 checks passed
@StoneyJackson StoneyJackson deleted the reorg branch April 28, 2024 18:04
Copy link

🎉 This PR is included in version 8.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert plcc.py into a Python package Remove dependency on LIBPLCC
1 participant