Skip to content

Commit

Permalink
Improve requirements files
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Mar 21, 2024
1 parent ac7ab6f commit a712bb5
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:

- name: Build SDist and wheel
run: pipx run build

- name: Test SDist
run: pip install dist/*.tar.gz

- uses: actions/upload-artifact@v4
with:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/check_and_fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependency
run: pip install ruff mypy isort pytest
- name: Update emoji.json
run: curl -o src/sticker_convert/resources/emoji.json -L https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json
- name: Ruff check
run: ruff check
- name: Install test
run: |
pip install .
pip install -r requirements-dev.txt
pip install -r requirements-type.txt
pip install .
- name: Update emoji.json
run: curl -o src/sticker_convert/resources/emoji.json -L https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json
- name: mypy
run: mypy
- name: pyright
run: pyright
- name: Ruff check
run: ruff check
- name: Ruff format
run: ruff format
- name: isort
Expand Down
20 changes: 17 additions & 3 deletions docs/COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,22 @@ sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
1. To build wheel `pip -m build .`
2. To install wheel `pip install dist/sticker_convert-xxx.whl`

# Run tests
# Development
Install development requirements first:
```bash
pip install -r requirements-dev.txt
```
pip install -r requirements-build.txt
pytest ./tests

To run tests:
```bash
pytest
```

To run linter:
```bash
mypy
pyright
ruff check
ruff format
isort .
```
4 changes: 1 addition & 3 deletions requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
nuitka==2.1.2
wheel
pytest
nuitka==2.1.2
5 changes: 5 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest
pyright
mypy
isort
ruff

0 comments on commit a712bb5

Please sign in to comment.