Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
walid committed Dec 3, 2024
1 parent 67d1944 commit ca57a2b
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 31 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,4 @@ jobs:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
poetry build
poetry publish
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
poetry publish
15 changes: 4 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,18 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: poetry install

- name: Run tests
run: poetry run pytest

- name: Check formatting
run: |
poetry run black . --check
poetry run isort . --check
poetry run flake8 .
poetry run mypy .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -384,3 +384,4 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.venv
.venv
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# WikiDict
# Wikiluv

Wikipedia at your fingertips.

## Installation
```bash
pip install wikidict
pip install wikiluv
```
## Usage
```bash
wikidict rose
wikiluv rose
```

# Demo
![demo](https://github.com/walidsa3d/wikidict/blob/master/wikidict.gif)
![demo](https://github.com/walidsa3d/wikiluv/blob/master/wikiluv.gif)
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "wikidict"
name = "wikiluv"
version = "0.2.0"
description = "Wikipedia at your fingertips"
authors = ["walid <[email protected]>"]
Expand All @@ -20,4 +20,4 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
wikidict = "wikidict.main:main"
wikiluv = "wikiluv.main:main"
6 changes: 3 additions & 3 deletions tests/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import sys
sys.path.append('../wikidict')
sys.path.append('../wikiluv')

from wikidict import *
from wikiluv import *
import unittest2
import requests
import sys

class WikiddictTestCase(unittest2.TestCase):

"""Tests for `wikidict/wikidict.py`."""
"""Tests for `wikiluv/wikiluv.py`."""

def setUp(self):
self.query = "google"
Expand Down
Binary file removed wikidict.gif
Binary file not shown.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions wikidict/main.py → wikiluv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from rich.console import Console
from rich.spinner import Spinner
from rich.text import Text
from wikidict.lancodes import codes
from wikidict.utils import justify
from wikiluv.lancodes import codes
from wikiluv.utils import justify

console = Console()
BASE_URL = "https://{lang}.wikipedia.org/w/api.php?continue=&action=query&titles={query}&prop=extracts&exintro=&explaintext=&format=json&redirects&formatversion=2"
Expand Down
File renamed without changes.

0 comments on commit ca57a2b

Please sign in to comment.