Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump min python version #8

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 26 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ jobs:
lint_test_and_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.7"
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
Expand All @@ -20,26 +20,40 @@ jobs:
run: poetry run mypy .
- name: pytest
run: poetry run pytest --cov=./ --cov-report=xml
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage.xml
fail_ci_if_error: true
- name: build
run: poetry build
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
release:
needs: lint_test_and_build
permissions:
contents: write
id-token: write
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
concurrency: release
environment:
name: pypi
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Semantic Release
uses: relekang/[email protected]
id: release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ description = "Convert Abstract Meaning Representation (AMR) into first-order lo
license = "MIT"
readme = "README.md"
authors = ["David Chanin <[email protected]>"]
keywords = ["amr", "logic", "first-order-logic", "nlp", "abstract-meaning-representation"]
keywords = [
"amr",
"logic",
"first-order-logic",
"nlp",
"abstract-meaning-representation",
]
repository = "https://github.com/chanind/amr-logic-converter"
homepage = "https://github.com/chanind/amr-logic-converter"

[tool.poetry.dependencies]
python = ">=3.7, <4.0"
python = ">=3.10, <4.0"
Penman = "^1.2.2"
typing-extensions = ">=3.7.4"

Expand All @@ -29,7 +35,7 @@ build-backend = "poetry.core.masonry.api"
[tool.semantic_release]
version_variable = [
"amr_logic_converter/__init__.py:__version__",
"pyproject.toml:version"
"pyproject.toml:version",
]
branch = "main"
upload_to_pypi = true
Expand Down