Skip to content

Commit

Permalink
v0.12.3 (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakancelikdev committed Dec 4, 2022
1 parent 004b5dd commit 33ead41
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 44 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: build-docs
on:
push:
branches:
- stable
tags:
- "**"
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -23,4 +23,4 @@ jobs:
git config --local user.email "hakancelikdev@gmail.com"
git config --local user.name "Hakan Celik"
git fetch --all
mkdocs gh-deploy -m "Update Docs" --remote-branch gh-pages
mike deploy ${{github.ref_name}} latest --update-aliases --push
28 changes: 26 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
name: test
on: [push, pull_request]
jobs:
run:
test_with_python36:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: ["3.6"]
steps:
- uses: actions/checkout@v2.3.4

- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install Dependencies for Python${{ matrix.python-version }}
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with pytest for Python${{ matrix.python-version }}
run: |
tox -e ${{ matrix.python-version }}
test_other_python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2.3.4

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: isort

- repo: https://github.com/hakancelikdev/unimport
rev: 0.12.2
rev: 0.12.3
hooks:
- id: unimport
args:
Expand Down
71 changes: 71 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
all: lint test clean

.PHONY: dev
dev:
pip install -e .[test]
pip install pre-commit

.PHONY: lint
lint:
git add .
pre-commit run --all-files

.PHONY: test
test:
pytest tests -x -v --disable-warnings

.PHONY: tox
tox:
tox

.PHONY: clean
clean:
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
rm -f `find . -type f -name '*~' `
rm -f `find . -type f -name '.*~' `
rm -rf .cache
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf htmlcov
rm -rf *.egg-info
rm -f .coverage
rm -f .coverage.*
rm -rf .tox
rm -rf build

.PHONY: push
push:
git push origin head

.PHONY: amend
amend:
git add .
git commit --amend --no-edit
git push origin head -f

.PHONY: stable
stable:
git checkout main
git branch -D stable
git checkout -b stable
git push origin head -f
git checkout main

.PHONY: git
git:
git config --local user.email "hakancelikdev@gmail.com"
git config --local user.name "Hakan Celik"

.PHONY: publish
publish:
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m pip install --upgrade twine
python -m build
python -m twine upload dist/*

.PHONY: docs
docs:
pip install -e .[docs]
mkdocs serve
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
runs:
using: "composite"
steps:
- run: pip install --upgrade pip && python -m pip install unimport==0.12.2
- run: pip install --upgrade pip && python -m pip install unimport==0.12.3
shell: bash
- run: unimport --color auto --gitignore --ignore-init ${{ inputs.extra_args }}
shell: bash
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased] - YYYY-MM-DD

## [0.12.3] - 2022-12-04

### Added

- Multiple versions of the docs

## [0.12.2] - 2022-11-09

### 🐛 Fixes
Expand Down
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

File renamed without changes.
6 changes: 5 additions & 1 deletion docs/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
style="border: 0"
></iframe>
</div>
{% endblock %} {%- block scripts %} {{ super() }} {%- endblock %}
{% endblock %} {% block outdated %} You're not viewing the latest version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
{% endblock %}
51 changes: 24 additions & 27 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
site_name: Unimport
site_description: A linter, formatter for finding and removing unused import statements.
site_url: https://unimport.hakancelik.dev
repo_url: https://github.com/hakancelikdev/unimport
repo_name: hakancelikdev/unimport
edit_uri: https://github.com/hakancelikdev/unimport/tree/main/docs
copyright: Copyright &copy; 2020 - 2020 Hakan Çelik

markdown_extensions:
- fenced_code
Expand Down Expand Up @@ -47,32 +51,37 @@ plugins:
- search:
separator: '[\s\-\.]+'
prebuild_index: true

- git-revision-date-localized:
type: date
enable_creation_date: true

- minify:
minify_html: true
- mike:
canonical_version: latest

extra:
version:
provider: mike
default: stable

default: latest
analytics:
provider: google
property: G-2EGM5WWEED
consent:
title: Cookie consent
description: >-
We use cookies to recognize your repeated visits and preferences, as well as to
measure the effectiveness of our documentation and whether users find what they're
searching for. With your consent, you're helping us to make our documentation
better.
social:
- icon: fontawesome/brands/discord
link: https://discord.com/invite/6z8YXy4

- icon: fontawesome/brands/twitter
link: https://twitter.com/hakancelikdev

- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/in/hakancelikdev

- icon: fontawesome/solid/globe
link: https://hakancelik.dev

homepage: https://unimport.hakancelik.dev

theme:
Expand All @@ -83,49 +92,37 @@ theme:
- navigation.instant
- navigation.tracking
- navigation.indexes
- navigation.top
- search.suggest
- search.highlight
- search.share
- header.autohide

- navigation.top
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: red
primary: white
accent: amber
toggle:
icon: material/lightbulb-outline
icon: material/weather-sunny
name: Switch to dark mode

- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: red
primary: black
accent: amber
toggle:
icon: material/lightbulb
icon: material/weather-night
name: Switch to light mode

font:
text: Noto Sans
code: Roboto Mono

icon:
repo: fontawesome/brands/github-alt
edit: material/file-document-edit-outline

copyright: Copyright &copy; 2020 - 2020 Hakan Çelik
repo_url: https://github.com/hakancelikdev/unimport
repo_name: hakancelikdev/unimport
edit_uri: https://github.com/hakancelikdev/unimport/tree/main/docs

nav:
- Unimport: index.md
- Languages:
- en: /
- tr: /tr/
- Overview: index.md
- Installation: installation.md
- User Guide:
- tutorial/installation.md
- tutorial/command-line-options.md
- tutorial/supported-behaviors.md
- tutorial/other-useful-features.md
Expand Down
16 changes: 9 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,17 @@ console_scripts =

[options.extras_require]
docs =
mkdocs==1.3.0
mkdocs-material==8.3.6
mkdocs==1.4.2
mkdocs-material==8.5.11
mkdocs-markdownextradata-plugin==0.2.5
mkdocs-minify-plugin==0.5.0
mkdocs-git-revision-date-localized-plugin==1.0.1
mkdocs-minify-plugin==0.6.2
mkdocs-git-revision-date-localized-plugin==1.1.0
mike==1.1.2
test =
pytest==6.2.4
pytest-cov==2.12.1
semantic-version==2.8.5
pytest==6.2.4; python_version == '3.6'
pytest==7.2.0; python_version != '3.6'
pytest-cov==4.0.0
semantic-version==2.10.0

[options.package_data]
* =
Expand Down
2 changes: 1 addition & 1 deletion src/unimport/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.12.2"
__version__ = "0.12.3"
__description__ = "A linter, formatter for finding and removing unused import statements."

0 comments on commit 33ead41

Please sign in to comment.