Skip to content

[INF] update some mkdocs infrastructure #1231

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 9 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ repos:
hooks:
- id: black
args: [--config, pyproject.toml]
# - repo: https://github.com/pycqa/isort
# rev: 5.11.2
# hooks:
# - id: isort
# name: isort (python)
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ release:

format:
@echo "Applying Black Python code formatting..."
black -l 79 .
pre-commit run black --all-files

test:
@echo "Running test suite..."
pytest -v -n auto --color=yes

lint:
@echo "Checking code formatting..."
flake8 . --exclude "./nbconvert_config.py, ./env, ./venv ./build"
pre-commit run flake8 --all-files

docs:
@echo "Building documentation..."
Expand Down
8 changes: 1 addition & 7 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ channels:
dependencies:
- python=3.9
- biopython
- black=22.1.0
- black=22.12.0 # keep this in sync with `.pre-commit-config.yaml`
- bump2version=1.0.1
- cairo
- conda
- darglint
- doc8
- flake8
- hypothesis
- interrogate
- ipykernel
- ipython
- isort
Expand All @@ -38,8 +34,6 @@ dependencies:
- pipreqs
- pip-tools
- pre-commit
- pyflakes
- pylint
- pyspark>=3.2.0
- pytest
- pytest-cov
Expand Down
21 changes: 11 additions & 10 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
site_name: pyjanitor documentation
site_url: https://pyjanitor-devs.github.io/pyjanitor
watch:
- janitor/

docs_dir: mkdocs/

Expand All @@ -11,15 +13,17 @@ theme:
icon:
logo: "fontawesome/solid/book"
features:
- instant
# - tabs
- navigation.instant
# - navigation.tabs
- navigation.top
- toc.follow
- content.code.copy
language: en

# We customize the navigation by hand to control the order
# in which pages show up.
nav:
- Home: index.md
- Development Guide: devguide.md
- API Reference:
- Functions: api/functions.md
- Biology: api/biology.md
Expand All @@ -33,6 +37,7 @@ nav:
- Timeseries: api/timeseries.md
- Utils: api/utils.md
- XArray: api/xarray.md
- Development Guide: devguide.md
- Changelog: CHANGELOG.md
- Authors: AUTHORS.md

Expand All @@ -49,8 +54,6 @@ plugins:
selection:
docstring_style: restructured-text
# custom_templates: templates
watch:
- janitor/
# - mknotebooks:
# execute: true
# write_markdown: true
Expand All @@ -67,11 +70,9 @@ markdown_extensions:
- pymdownx.highlight:
use_pygments: false
- pymdownx.inlinehilite
# - pymdownx.tabbed
# - pymdownx.arithmatex
# - pymdownx.details
# - pymdownx.superfences
# - markdown.extensions.attr_list
# - pymdownx.tabbed:
# alternate_style: true
- pymdownx.superfences

extra_javascript:
- https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML
Expand Down
6 changes: 3 additions & 3 deletions mkdocs/devguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ selecting the correct kernel from the top right corner of JupyterLab!
For PyCharm users,
here are some `instructions <PYCHARM_USERS.html>`__ to get your Conda environment set up.

### Install the pre-commit hooks.
### Install the pre-commit hooks

`pre-commit` hooks are available
to run code formatting checks automagically before git commits happen.
Expand Down Expand Up @@ -172,8 +172,8 @@ formatted and that all tests still pass.

To do so:

* Run `python -m flake8 --exclude nbconvert_config.py janitor` to check code styling problems
* Run `python -m black -c pyproject.toml` to format your code.
* Run `make lint` to check code styling problems.
* Run `make format` to format your code.
* Run `python -m interrogate -c pyproject.toml` to check your code for missing docstring.
* Run `darglint -v 2` to check quality of your docstrings.
* Run `python -m pytest` to run all unit tests.
Expand Down
4 changes: 2 additions & 2 deletions mkdocs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ provides a clean API for cleaning data.

## Quick start

- Installation: `conda install -c conda-forge pyjanitor`
- Check out the collection of [general functions](https://pyjanitor-devs.github.io/pyjanitor/api/functions/)
- Installation: `conda install -c conda-forge pyjanitor`. Read more installation instructions [here](https://pyjanitor-devs.github.io/pyjanitor/#installation).
- Check out the collection of [general functions](https://pyjanitor-devs.github.io/pyjanitor/api/functions/).

## Why janitor?

Expand Down