Skip to content

Latest commit

 

History

History
97 lines (70 loc) · 3.38 KB

CONTRIBUTING.md

File metadata and controls

97 lines (70 loc) · 3.38 KB

Contributing

Pixi Kernel is free and open source software developed under an MIT license. Development occurs at the GitHub project. Contributions are welcome.

Bug reports and feature requests may be made directly on the issues tab.

To make a pull request, you will need to fork the repo, clone the repo, make the changes, run the tests, push the changes, and open a PR.

Cloning the repo

To make a local copy of Pixi Kernel, clone the repository with git:

git clone https://github.com/renan-r-santos/pixi-kernel.git

Installing from source

Pixi Kernel uses Pixi as its packaging and dependency manager. Install Pixi and then use it to install Pixi Kernel and its dependencies:

pixi install

Testing and code quality

Pixi Kernel uses pytest to run the tests in the tests/ directory. To run them, use:

pixi run test

You can also run the tests using a particular Python version:

pixi run -e py38 test-py38

Code quality

Pixi Kernel uses Ruff and MyPy to ensure a minimum standard of code quality. The code quality commands are encapsulated with Pixi:

pixi run format
pixi run lint
pixi run type-check

Making a release

  1. Bump
    1. Increment version in pyproject.toml and in pixi.toml
    2. Update all Pixi lock files by running pixi run update-lock
    3. Commit with message "Bump version number to X.Y.Z"
    4. Push commit to GitHub
    5. Check CI to ensure all tests pass
  2. Tag
    1. Tag commit with "vX.Y.Z"
    2. Push tag to GitHub
    3. Wait for build to finish
    4. Check PyPI for good upload
  3. Document
    1. Create GitHub release with name "Pixi Kernel X.Y.Z" and major changes in body

Adding support for new kernels

Follow the steps below to add support for a new kernel:

  1. In a fresh Pixi environment install your kernel with pixi install <kernel>.
  2. Copy the new folders created at .pixi/envs/default/share/jupyter/kernels/ to the kernels folder and commit the changes.
  3. Update the display name and command arguments in the kernel spec file kernel.json. The command arguments should start with ["python", "-m", "pixi_kernel", <package_name>, <kernel_display_name>] and all absolute paths should be removed.
  4. Update the Kernel Support table in the README.
  5. Add integration tests for the new kernel in the tests/integration folder and commit the changes.

You can find below two examples of adding support for new kernels:

Steps 1 and 2:

Steps 3 to 5