Skip to content

Commit

Permalink
Update instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Sep 16, 2023
1 parent 269898d commit 8212f72
Showing 1 changed file with 14 additions and 33 deletions.
47 changes: 14 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Initially developed by [DataRobot](https://www.datarobot.com/).

## Installing

> **Note:** This package requires MkDocs version 1.0.4 or higher.
Install with pip:

```bash
Expand All @@ -20,14 +18,15 @@ To use this plugin, specify your desired redirects in the plugin's `redirect_map

```yaml
plugins:
- redirects:
redirect_maps:
'old.md': 'new.md'
'old/file.md': 'new/file.md'
'some_file.md': 'http://external.url.com/foobar'
- redirects:
redirect_maps:
'old.md': 'new.md'
'old/file.md': 'new/file.md'
'some_file.md': 'http://external.url.com/foobar'
```

_Note: don't forget that specifying the `plugins` setting will override the defaults if you didn't already have it set! See [this page](https://www.mkdocs.org/user-guide/configuration/#plugins) for more information._
> **Note**
> Don't forget that specifying the `plugins` setting will override the defaults if you didn't already have it set! See [this page](https://www.mkdocs.org/user-guide/configuration/#plugins) for more information.
The redirects map should take the form of a key/value pair:

Expand Down Expand Up @@ -56,38 +55,20 @@ This mimics the behavior of how MkDocs builds the site dir without this plugin.

## Developing

### Setup a virtualenv

Create a virtualenv using a method of your choice.

```bash
brew install pyenv pyenv-virtualenv
pyenv install 2.7.18
pyenv virtualenv 2.7.18 mkdocs-redirects
pyenv activate mkdocs-redirects
```
Dev dependencies and tasks are managed with [Hatch](https://hatch.pypa.io/). Tasks run in their own environment, created on the fly if missing, in a separate directory tree.

### Build
To run all checks and fixes:

```bash
make build
hatch run all
```

### Test

```bash
make test
```
You can learn about individual commands from the output, or by inspecting `scripts` in [pyproject.toml](pyproject.toml).

## Releasing

```bash
make release
```

It will prompt you for your PyPI user and password.
A release is published to PyPI through GitHub Actions whenever a new tag is pushed.

See:
So, to create a release, run `.tools/release.sh x.y.z` (which bumps the version in `__init__.py`, checks the build, creates a commit and a tag `vx.y.z`, and pushes it to GitHub).

- <https://packaging.python.org/tutorials/packaging-projects/>
- <https://packaging.python.org/guides/migrating-to-pypi-org/>
Then fill out a GitHub release with release notes.

0 comments on commit 8212f72

Please sign in to comment.