Skip to content

Commit

Permalink
update sansorchi for version 5 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdbalkhi authored Jun 2, 2022
1 parent 642b08b commit 4c7fd51
Show file tree
Hide file tree
Showing 29 changed files with 322 additions and 702 deletions.
77 changes: 0 additions & 77 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/greetings.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/label-issues.yml

This file was deleted.

37 changes: 18 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,29 @@
name: Publish

on:
release:
release:
push:
tags:
- "V*"
- "V*"

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel --verbose
twine upload dist/* --verbose
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel --verbose
twine upload dist/* --verbose
28 changes: 0 additions & 28 deletions .github/workflows/pylint.yml

This file was deleted.

17 changes: 8 additions & 9 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"
- cron: "30 1 * * *"

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "Stale issue message"
stale-pr-message: "Stale pull request message"
stale-issue-label: "no-issue-activity"
stale-pr-label: "no-pr-activity"
66 changes: 34 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
name: Tests
on:
push:
branches:
- main
- "*.x"
branches: [main]
paths-ignore:
- "docs/**"
- "*.md"
- "*.rst"
- "*.yml"
- "*.yaml"


pull_request:
branches:
- main
- "*.x"
branches: [main]
paths-ignore:
- "docs/**"
- "*.md"
- "*.rst"
- "*.yml"
- "*.yaml"
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }} 🤖
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { name: "3.9", python: "3.9", os: ubuntu-latest, tox: py39 }
- { name: "3.8", python: "3.8", os: ubuntu-latest, tox: py38 }
- { name: "3.7", python: "3.7", os: ubuntu-latest, tox: py37 }
- { name: "Python 3.10", python: "3.10" }
- { name: "Python 3.9", python: "3.9" }
- { name: "Python 3.8", python: "3.8" }
- { name: "Python 3.7", python: "3.7" }
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Set up Python 3 🐍
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: update pip

- name: Update PIP
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: cache pip
uses: actions/cache@v2

- name: Install requirements ⚙️
run: |
pip install pytest flake8 coverage hazm
pip install -e .

- name: Run Flake8 💫
run: flake8 sansorchi tests setup.py

- name: Run Tests and collect coverage 🧪
run: |
coverage run -m pytest
coverage xml
- name: Upload coverage to Codecov 📈
uses: codecov/codecov-action@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
- run: pip install tox
- run: pip install -e .
- run: tox -e ${{ matrix.tox }}
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@OWNER:registry=https://npm.pkg.github.com
10 changes: 7 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ repos:
rev: 22.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: "5.10.1"
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.1.0
hooks:
- id: isort
- id: reorder-python-imports
name: Reorder Python imports (src, tests)
files: "^(?!examples/)"
args: ["--application-directories", "src"]
additional_dependencies: ["setuptools>60.9"]
3 changes: 0 additions & 3 deletions TODO.md

This file was deleted.

28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "sansorchi",
"version": "5.0.0",
"description": " Remove Persian (Farsi) Swear Words ",
"main": "sansorchi/__init__.py",
"directories": {
"test": "test"
},
"scripts": {
"test": "pytest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mmdbalkhi/Sansorchi.git"
},
"keywords": [
"python",
"swear",
"persian",
"farsi"
],
"author": "Komeil Parseh <ahmdparsh129@gmail.com>",
"license": "GPL-3.0-or-later",
"bugs": {
"url": "https://github.com/mmdbalkhi/Sansorchi/issues"
},
"homepage": "https://github.com/mmdbalkhi/Sansorchi#readme"
}
5 changes: 0 additions & 5 deletions requirements/dev.in

This file was deleted.

Loading

0 comments on commit 4c7fd51

Please sign in to comment.