We appreciate your interest in contributing to the ZenML VSCode extension! This guide will help you get started with setting up your development environment, making changes, and proposing those changes back to the project. By following these guidelines, you'll ensure a smooth and efficient contribution process.
- Fork and Clone: Fork the zenml-io/vscode-zenml repository and clone it to your local machine.
git clone https://github.com/YOUR_USERNAME/vscode-zenml.git
git checkout develop
- Install Dependencies: Navigate to the cloned repository directory and install the required dependencies.
cd vscode-zenml
npm install
- Compile the Project: Build the TypeScript source code into JavaScript.
npm run compile
The extension's Python functionality requires setting up a corresponding Python environment.
- Create and activate a Python virtual environment using Python 3.8 or greater. (e.g.,
python -m venv .venv
on Windows, orpython3 -m venv .venv
on Unix-based systems). - Install
nox
for environment management.
python -m pip install nox
- Use
nox
to set up the environment.
nox --session setup
- Install any Python dependencies specified in
requirements.txt
.
pip install -r requirements.txt
- Running the Extension: Press
F5
to open a new VSCode window with the extension running, or click theStart Debugging
button in the VSCode menubar under theRun
menu. - Making Changes: Edit the source code. The TypeScript code is in the
src
directory, and Python logic for the LSP server is inbundled/tool
.
- Writing Tests: Add tests in the
src/test
directory. Follow the naming convention*.test.ts
for test files. - Running Tests: Use the provided npm scripts to compile and run tests.
npm run test
- VSCode Debug Console: Utilize the debug console in the VSCode development window for troubleshooting and inspecting values.
- Extension Host Logs: Review the extension host logs for runtime errors or unexpected behavior.
- Create a Branch: Make your changes in a new git branch based on the
develop
branch.
git checkout -b feature/your-feature-name
- Commit Your Changes: Write clear, concise commit messages following the conventional commit guidelines.
- Push to Your Fork: Push your branch to your fork on GitHub.
git push origin feature/your-feature-name
- Open a Pull Request: Go to the original
zenml-io/vscode-zenml
repository and create a pull request from your feature branch. Please follow our contribution guidelines for more details on proposing pull requests.
- Ensure all dependencies are up to date and compatible.
- Rebuild the project (
npm run compile
) after making changes. - Reset your development environment if encountering persistent issues by re-running
nox
setup commands and reinstalling dependencies. - You can also run the
scripts/clear_and_compile.sh
script, which will delete the cache,dist
folder, and recompile automatically. - Check the ZenML documentation and GitHub issues for common problems and solutions.