Skip to content

DOC: Add conda environment instructions to developers guide #21611

Closed
@greglucas

Description

@greglucas

Just so we don't lose track of adding this to the docs at some point.

I'll add a description how to use this later to the dev docs. But basically following the instuctions in the file is sufficient.

Originally posted by @timhoffm in #17096 (comment)

I found reading through the installation instructions quite verbose. I think it is good information to keep in the documentation, but intimidating for someone just coming onto the project. My suggestion would be to add a top-level "Quickly get set up" section using the conda environment from the repo and explaining how to install and use pre-commit from #21583. An opinionated set of instructions up front and then additional details for other architectures and configurations following that.

# fork the matplotlib repository to your username
git clone git@github.com/your-user-name/matplotlib.git
cd matplotlib
git remote add upstream https://github.com/matplotlib/matplotlib.git

# Install dependencies
conda env create -f environment.yml
conda activate mpl-dev
pre-commit install
pip install -e .

# checkout a new feature branch
git checkout -b my-new-feature

# Make changes to files (including new tests!) and test your addition
pytest lib/matplotlib/tests/test_file_you_changed.py

# Commit with a message explaining what you have changed
git add any-files-you-changed
git commit
# Committing will run automatic code-style checks and may fail and explain what you need to change

# Push to remote repository
git push --set-upstream origin my-new-feature
# Go to GitHub and open a Pull Request for your new feature!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions