Skip to content

Commit

Permalink
Version 0.5.0 Release (#228)
Browse files Browse the repository at this point in the history
Version 0.5.0 release. Besides bumping the version this commit also
includes the following changes:

- Separate the ansible-lint license.
- Update changelog to include all changes for v0.5.0.
- Remove duplicate documentation (code of conduct).
- Add already existing documentation to the Sphinx documentation.
- Add additional badges to the README.md.
- Simplify and update the GitHub Workflow to release to PyPi.
- Updated the `version_added` in all new rules.
- Ignore docs directory for linting tests
- Disable markdownlint as it breaks the GitHub workflow
- Add link to dense-analysis/ale vim plugin in README
- Update supported Python version to include newer Python versions.
- Fix some code style issues found by flake 8.
- Add .j2 as Jinja file extension
- Use tox and pre-commit for testing

Changelog: 
Rule 213 to recommend using cmd.run together with onchanges (#207).
Rule 214 to check SLS file with a period in the name (besides the suffix period) as they can not be referenced by Salt (#209).
Rules 901-915 to check for deprecated states and state options (#214).
This CHANGELOG.md file to be able to list all notable changes for each version of salt-lint (#223).

Signed-off-by: Roald Nefs <info@roaldnefs.com>

Co-authored-by: Benjamin <poulpatine@gmail.com>
  • Loading branch information
roaldnefs and Poulpatine authored Jan 17, 2021
1 parent 304917d commit c1c28a9
Show file tree
Hide file tree
Showing 55 changed files with 506 additions and 689 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
max-line-length = 127
exclude = .git,tests,setupy.py,__pycache__,.tox,.eggs,env
exclude = .git,tests,setupy.py,__pycache__,.tox,.eggs,env,docs
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Execute '....'
3. Scroll down to '....'
Expand All @@ -24,8 +25,9 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Ubuntu]
- Version [e.g. 0.3.0]

- OS: [e.g. Ubuntu]
- Version [e.g. 0.3.0]

**Additional context**
Add any other context about the problem here.
34 changes: 0 additions & 34 deletions .github/workflows/build.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/lint.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/publish-to-pypi.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: release

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish to Test PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
- name: Build and publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
35 changes: 35 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: tests

on:
pull_request:
push:
schedule:
- cron: '0 6 * * *'

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python: [2.7, 3.6, 3.7, 3.8, 3.9]

steps:

- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install Tox and any other packages
run: pip install tox

- name: Run syntax checker using Tox
run: tox -e lint

- name: Run Tox
# Run tox using the version of Python in `PATH`
run: tox -e py
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ venv.bak/

# mypy
.mypy_cache/

# pytest-cov
.test-results/
5 changes: 0 additions & 5 deletions .markdownlint.yaml

This file was deleted.

37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-merge-conflict
# TODO(roaldnefs): re-enable once it's fixed on a GitHub workflow run
# - repo: https://github.com/jumanjihouse/pre-commit-hooks.git
# rev: 2.1.4
# hooks:
# - id: markdownlint
# args: ["-r ~MD013,~MD029,~MD041"]
- repo: https://github.com/IamTheFij/docker-pre-commit.git
rev: v2.0.0
hooks:
- id: hadolint
files: docker/Dockerfile
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.8.4
hooks:
- id: flake8
exclude: '^$|.git|tests|env|docs'
- repo: https://github.com/codespell-project/codespell.git
rev: v2.0.0
hooks:
- id: codespell
args:
- '--skip="./.git*,./saltlint/rules/FileManagedReplaceContentRule.py"'
- '-L alse'
- repo: https://github.com/PyCQA/pylint.git
rev: master
hooks:
- id: pylint
exclude: ^docs/
1 change: 0 additions & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
entry: salt-lint
language: python
files: \.(sls)$

18 changes: 18 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[MESSAGES CONTROL]
ignore=docs
disable=
missing-docstring,
invalid-name,
unused-argument,
no-self-use,
useless-object-inheritance,
too-many-instance-attributes,
too-few-public-methods,
too-many-locals,
no-member,not-callable,
too-many-statements,
too-many-branches,
too-many-arguments,
duplicate-code,
dangerous-default-value,
import-error,
9 changes: 9 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
sphinx:
configuration: docs/conf.py
formats:
- pdf
python:
version: 3.7
install:
- docs/requirements.txt
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog
All notable changes in **salt-lint** are documented below.

## [Unreleased]
## [0.5.0] (2021-01-17)
### Added
- Rule 213 to recommend using cmd.run together with onchanges ([#207](https://github.com/warpnet/salt-lint/pull/207)).
- Rule 214 to check SLS file with a period in the name (besides the suffix period) as they can not be referenced by Salt ([#209](https://github.com/warpnet/salt-lint/pull/209)).
- Rules 901-915 to check for deprecated states and state options ([#214](https://github.com/warpnet/salt-lint/pull/214)).
- This `CHANGELOG.md` file to be able to list all notable changes for each version of **salt-lint** ([#223](https://github.com/warpnet/salt-lint/pull/223)).

[Unreleased]: https://github.com/warpnet/salt-lint/compare/v0.4.2...HEAD
[0.5.0]: https://github.com/warpnet/salt-lint/compare/v0.4.2...v0.5.0
Loading

0 comments on commit c1c28a9

Please sign in to comment.