Skip to content

Commit

Permalink
publish
Browse files Browse the repository at this point in the history
  • Loading branch information
tanzhijian committed Jan 17, 2024
1 parent e37077b commit d88f398
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Python package
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.17
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test Suite

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install poetry and dependencies
run: |
pip install poetry
poetry add setuptools@latest
poetry install
- name: Lint with Ruff
run: |
poetry run ruff .
- name: Type Check with Mypy
run: |
poetry run mypy .
- name: Test with pytest
run: |
poetry run pytest
2 changes: 2 additions & 0 deletions fifacodes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

from rapidfuzz import process

__version__ = "0.1.0"

_DATA_PATH = Path(__file__).parent
_DEFAULT_DATA_PATH = _DATA_PATH / "default.csv"
_CUSTOM_DATA_PATH = _DATA_PATH / "custom.csv"
Expand Down
Empty file added fifacodes/py.typed
Empty file.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fifacodes"
version = "0.0.1"
version = "0.1.0"
description = "FIFA country codes query and search."
authors = ["tanzhijian <tanzhijianorg@outlook.com>"]
license = "MIT"
Expand All @@ -10,7 +10,7 @@ homepage = "https://github.com/tanzhijian/fifacodes"
repository = "https://github.com/tanzhijian/fifacodes"

[tool.poetry.dependencies]
python = "^3.12"
python = ">=3.10"
rapidfuzz = "^3.6.1"


Expand Down

0 comments on commit d88f398

Please sign in to comment.