How to Add scikit-plots
to conda-forge Guidelines#
This guide provides a comprehensive, beginner-friendly walkthrough for adding scikit-plots
to conda-forge, including best practices, important notes, and maintenance instructions.
Prerequisites#
Ensure you have:
A GitHub account.
scikit-plots
published one of:github
like GitHubgithub release
like GitHub Releasesource distribution
like PyPIsource distribution
like Anaconda.org
Installed tools:
git
,conda
, andgrayskull
.
Important
Your package must be available via a valid source distribution like GitHub, PyPI, or Anaconda.org before it can be added to conda-forge.
But can be use direct github repo
, read below more info.
Hint
Install grayskull
easily:
conda install -c conda-forge grayskull
or:
pip install grayskull
Choosing a Source Distribution#
When updating the recipe (meta.yaml
), you must choose one of the valid source distribution types. Conda-forge supports four typical options:
GitHub archive (tagged release)
source: url: https://github.com/scikit-plots/scikit-plots/archive/v{{ version }}.tar.gz sha256: <fill-this-sha>
Important
Ensure the tag exists on GitHub.
Use a specific release version to avoid build inconsistencies.
PyPI source distribution
source: url: https://pypi.org/packages/source/s/scikit-plots/scikit_plots-{{ version }}.tar.gz sha256: <fill-this-sha>
Note
This is the most common and preferred method when available on PyPI.
Anaconda.org source (e.g., staging wheels)
source: url: https://pypi.anaconda.org/<channel>/simple/scikit-plots/{{ version }}/scikit_plots-{{ version }}.tar.gz sha256: <fill-this-sha>
Hint
Replace
<channel>
with your actual Anaconda channel, such asscikit-plots-wheels-staging-nightly
.Direct Git repository source
source: git_url: https://github.com/scikit-plots/scikit-plots.git git_rev: {{ tag }} # 🔒 Use a tag or commit hash for reproducibility
Important
Always use a tag or commit hash, not
main
ormaster
.This method is less common and should only be used when source tarballs are not available.
Publishing to PyPI#
If you use PyPI:
Before proceeding, confirm that scikit-plots
is correctly published on PyPI.
Important
Conda-forge builds the package from PyPI releases, not from GitHub directly (unless you configure otherwise in your recipe).
Hint
If you need help publishing, check out the official PyPI packaging tutorial.
Creating the Recipe with Grayskull#
Use grayskull
to generate the initial conda recipe:
grayskull pypi --strict-conda-forge scikit-plots
This generates a recipes/scikit-plots/
folder containing a meta.yaml
.
Note
grayskull
will automatically pull metadata from your PyPI release — but you must review it.
{% set name = "scikit-plots" %}
{% set version = "0.4.0rc4" %}
{% set tag = "v" ~ version %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
# Choose one valid source:
# GitHub
git_url: https://github.com/scikit-plots/scikit-plots.git
git_rev: {{ tag }} # 🔒 use a tag or commit hash for reproducibility
# GitHub archive
# url: https://github.com/{{ name }}/{{ name }}/archive/{{ tag }}.tar.gz
# PyPI source
# url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name | replace("-", "_") }}-{{ version }}.tar.gz
# Anaconda source (less common)
# url: https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple/{{ name }}/{{ version }}/{{ name | replace("-", "_") }}-{{ version }}.tar.gz
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/scikit_plots-{{ version }}.tar.gz
sha256: cd6c8a3d11cfe0b9cc3e4ecc95399efe16ea242ddb4c02505031c6271f8876f8
Note
You must include the correct sha256
checksum for the chosen source archive.
To compute it:
## wget https://github.com/scikit-plots/scikit-plots/archive/refs/tags/{{ tag }}.tar.gz
wget https://github.com/scikit-plots/scikit-plots/archive/refs/tags/v0.4.0rc4.tar.gz
## openssl sha256 {{ tag }}.tar.gz
openssl sha256 v0.4.0rc4.tar.gz
Submitting to Staged-Recipes#
Fork the conda-forge/staged-recipes repository.
Clone your fork locally:
git clone https://github.com/<your-github-username>/staged-recipes.git cd staged-recipes/recipes/
Create a new branch:
git checkout -b add-scikit-plots
Add your recipe directory and license file.
Commit and push your changes:
git add scikit-plots/ git commit -m "Add scikit-plots recipe" git push origin add-scikit-plots
Open a Pull Request (PR) to
conda-forge/staged-recipes
.
Important
Carefully fill out the PR checklist in the pull request description!
Confirm the recipe builds locally with
conda build
(optional but strongly recommended).Confirm your metadata is accurate.
Ping reviewers if needed (
@conda-forge/help-python
).
Hint
Your PR title should follow the format: Add package: scikit-plots
.
Post-Merge: Feedstock Creation#
After your PR is merged:
A new feedstock repository will be created, for example: scikit-plots-feedstock.
You will be added as a maintainer.
CI (Continuous Integration) will build and upload the package across all platforms.
Important
Carefully watch the CI builds! Build errors may still appear even after the staged-recipes PR is merged.
Hint
Add the feedstock repo to your GitHub notifications (watch → participating) to stay informed!
Maintaining the Package#
Future updates for scikit-plots
:
Publish a new release to PyPI.
The conda-forge bot will open a PR automatically to update the feedstock recipe.
Manual Updates#
If the bot fails to update your package or if you need to make manual changes:
Fork and clone your feedstock repository:
git clone https://github.com/<your-github-username>/scikit-plots-feedstock.git cd scikit-plots-feedstock/recipe/
Update
meta.yaml
manually (or usegrayskull
again).Commit and push your changes:
git add recipe/meta.yaml git commit -m "Update scikit-plots to version X.Y.Z" git push origin update-scikit-plots
Open a pull request back to the feedstock repository.
Wait for CI builds to pass, then merge.
Important
Always let CI finish before merging. Merging broken recipes can cause major issues across conda-forge!
Congratulations 🎉#
After the update PR is merged:
The new version of
scikit-plots
will be built and uploaded automatically.Users will be able to install the latest version with:
conda install -c conda-forge scikit-plots
You are now officially maintaining a package on conda-forge!
Quick Reference Summary#
Follow these steps to successfully add and maintain scikit-plots
on conda-forge.
Steps Overview#
Hint
You can click on any action to jump directly to the detailed explanation!