-
-
Notifications
You must be signed in to change notification settings - Fork 28
PR: Add initial contributing guide and release steps docs #79
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # Contributing to the Spyder Vim plugin | ||
|
|
||
| :+1::tada: | ||
| First off, thanks for taking the time to contribute to the Spyder Vim | ||
| plugin! | ||
| :tada::+1: | ||
|
|
||
| ## General guidelines for contributing | ||
|
|
||
| The Spyder Vim plugin is developed as part of the wider Spyder project. | ||
| In general, the guidelines for contributing to Spyder also apply here. | ||
| Specifically, all contributors are expected to abide by | ||
| [Spyder's Code of Conduct](https://github.com/spyder-ide/spyder/blob/master/CODE_OF_CONDUCT.md). | ||
|
|
||
| There are many ways to contribute and all are valued and welcome. | ||
| You can help other users, write documentation, spread the word, submit | ||
| helpful issues on the | ||
| [issue tracker](https://github.com/spyder-ide/spyder-vim/issues) | ||
| with problems you encounter or ways to improve the plugin, test the development | ||
| version, or submit a pull request on GitHub. | ||
|
|
||
| The rest of this document explains how to set up a development environment. | ||
|
|
||
| ## Setting up a development environment | ||
|
|
||
| This section explains how to set up a conda environment to run and work on the | ||
| development version of the Spyder vim plugin. | ||
|
|
||
| ### Creating a conda environment | ||
|
|
||
| This creates a new conda environment with the name `spydervim-dev`. | ||
|
|
||
| ```bash | ||
| $ conda create -n spydervim-dev -c conda-forge python=3.9 | ||
| $ conda activate spydervim-dev | ||
| ``` | ||
|
|
||
| ### Cloning the repository | ||
|
|
||
| This creates a new directory `spyder-vim` with the source code of the | ||
| Spyder Vim plugin. | ||
|
|
||
| ```bash | ||
| $ git clone https://github.com/spyder-ide/spyder-vim.git | ||
| $ cd spyder-vim | ||
| ``` | ||
|
|
||
| ### Installing dependencies | ||
|
|
||
| This installs Spyder, QtPy and all other dependencies of the plugin into | ||
| the conda environment. | ||
|
|
||
| ```bash | ||
| $ conda install -c conda-forge --file requirements/conda.txt | ||
| ``` | ||
|
|
||
| ### Installing the plugin | ||
|
|
||
| This installs the Spyder Vim plugin so that Spyder will use it. | ||
|
|
||
| ```bash | ||
| $ pip install --no-deps -e . | ||
| ``` | ||
|
|
||
| ### Running Spyder | ||
|
|
||
| You are done! You can run Spyder as normal and it should load the Vim | ||
| plugin. | ||
|
|
||
| ```bash | ||
| $ spyder | ||
| ``` | ||
|
|
||
| ### Running Tests | ||
|
|
||
| This command installs the test dependencies in the conda environment. | ||
|
|
||
| ```bash | ||
| $ conda install -c conda-forge --file requirements/tests.txt | ||
| ``` | ||
|
|
||
| You can now run the tests with a simple | ||
|
|
||
| ```bash | ||
| $ pytest | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # Release | ||
|
|
||
| Follow these steps to release a new version of spyder-vim. | ||
|
|
||
| In the commands below, replace `X.Y.Z` with the release version when needed. | ||
|
|
||
| **Note**: We use `pip` instead of `conda` here even on Conda installs, to ensure we always get the latest upstream versions of the build dependencies. | ||
|
|
||
| ## PyPI and GitHub | ||
|
|
||
| You will need to have a local clone of the repo. The following steps supose a repo setup from a fork with and `upstream` remote pointing to the main `spyder-vim` repo | ||
|
|
||
| * Close [milestone on Github](https://github.com/spyder-ide/spyder-vim/milestones) | ||
|
|
||
| * Update local repo | ||
|
|
||
| ```bash | ||
| git restore . && git switch master && git pull upstream master | ||
| ``` | ||
|
|
||
| * Clean local repo | ||
|
|
||
| ```bash | ||
| git clean -xfdi | ||
| ``` | ||
|
|
||
| * Install/upgrade Loghub | ||
|
|
||
| ```bash | ||
| pip install --upgrade loghub | ||
| ``` | ||
|
|
||
| * Update `CHANGELOG.md` with Loghub: `loghub spyder-ide/spyder-vim --milestone vX.Y.Z` | ||
|
|
||
| * git add and git commit with "Update Changelog" | ||
|
|
||
| * Update `__version__` in `__init__.py` (set release version, remove `dev0`) | ||
|
|
||
| * Create release commit | ||
|
|
||
| ```bash | ||
| git commit -am "Release X.Y.Z" | ||
| ``` | ||
|
|
||
| * Update the packaging stack | ||
|
|
||
| ```bash | ||
| python -m pip install --upgrade pip | ||
| pip install --upgrade --upgrade-strategy eager build setuptools twine wheel | ||
| ``` | ||
|
|
||
| * Build source distribution and wheel | ||
|
|
||
| ```bash | ||
| python -bb -X dev -W error -m build | ||
| ``` | ||
|
|
||
| * Check distribution archives | ||
|
|
||
| ```bash | ||
| twine check --strict dist/* | ||
| ``` | ||
|
|
||
| * Upload distribution packages to PyPI | ||
|
|
||
| ```bash | ||
| twine upload dist/* | ||
| ``` | ||
|
|
||
| * Create release tag | ||
|
|
||
| ```bash | ||
| git tag -a vX.Y.Z -m "Release X.Y.Z" | ||
| ``` | ||
|
|
||
| * Update `__version__` in `__init__.py` (add `.dev0` and increment minor) | ||
|
|
||
| * Create `Back to work` commit | ||
|
|
||
| ```bash | ||
| git commit -am "Back to work" | ||
| ``` | ||
|
|
||
| * Push new release commits and tags to `master` | ||
|
|
||
| ```bash | ||
| git push upstream master --follow-tags | ||
| ``` | ||
|
|
||
| * Create a [GitHub release](https://github.com/spyder-ide/spyder-vim/releases) from the tag | ||
|
|
||
| ## Conda-Forge | ||
|
|
||
| To release a new version of `spyder-vim` on Conda-Forge: | ||
|
|
||
| * After the release on PyPI, an automatic PR in the [Conda-Forge feedstock repo for spyder-vim](https://github.com/conda-forge/spyder-vim-feedstock/pulls) should open. | ||
| Merging this PR will update the respective Conda-Forge package. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.