Skip to content

Commit

Permalink
ci(github): update workflow to remove Python 3.7 and 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
leandcesar committed Jul 23, 2024
1 parent 61eb384 commit 9bb1d12
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release

on:
release:
types:
- published

jobs:
pypi-publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/themoviedb/
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install pypa/setuptools
run: >-
python -m
pip install wheel
- name: Extract tag name
id: tag
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Update version in setup.py
run: >-
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
- name: Build a binary wheel
run: >-
python setup.py sdist bdist_wheel
- uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help install uninstall reinstall test lint format security clear release
.PHONY: help install uninstall reinstall test lint format security clear
.DEFAULT_GOAL := help

VENV = venv
Expand Down Expand Up @@ -72,9 +72,3 @@ clear:
@rm -fr .pytest_cache
@rm -fr .mypy_cache
@rm -fr .ruff_cache

release: clear
@python setup.py sdist
@python setup.py bdist_wheel
@ls -l dist
@twine upload dist/* --verbose
27 changes: 11 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@
themoviedb
==========

.. raw:: html

<h1 align="center">
<a href="https://github.com/leandcesar/themoviedb">
<img src="https://github.com/leandcesar/themoviedb/blob/master/docs/assets/themoviedb.gif?raw=true" alt="themoviedb"/>
</a>
</h1>


A modern and easy to use API wrapper for The Movie Database (TMDb) API v3
written in Python. Supports sync and async requests!

.. image:: https://github.com/leandcesar/themoviedb/blob/master/docs/assets/themoviedb.gif?raw=true
:target: https://github.com/leandcesar/themoviedb
:alt: themoviedb

Overview
========

Expand Down Expand Up @@ -45,19 +40,19 @@ Install

The easiest way to install **themoviedb** is via ``pip``.

::
.. code-block:: shell
pip install themoviedb[full]
Or only the sync version (with ``requests``).

::
.. code-block:: shell
pip install themoviedb[sync]
Or only the async version (with ``aiohttp``).

::
.. code-block:: shell
pip install themoviedb[async]
Expand Down Expand Up @@ -133,7 +128,7 @@ Examples

Get the list of top rated movies (sync mode).

.. code:: py
.. code:: python
from themoviedb import TMDb
Expand All @@ -144,7 +139,7 @@ Get the list of top rated movies (sync mode).
Get the list of popular TV shows (async mode).

.. code:: py
.. code:: python
import asyncio
from themoviedb import aioTMDb
Expand All @@ -159,7 +154,7 @@ Get the list of popular TV shows (async mode).
Discover movies by different types of data.

.. code:: py
.. code:: python
from themoviedb import TMDb
Expand All @@ -175,7 +170,7 @@ Discover movies by different types of data.
Get the details of movie for a search.

.. code:: py
.. code:: python
import asyncio
from themoviedb import aioTMDb
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import nox


@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
def tests(session: nox.Session) -> None:
session.install("-r", "requirements-test.txt")
session.run("pytest")
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author="Leandro César",
author_email="[email protected]",
url="https://github.com/leandcesar/themoviedb",
version="0.4.0",
version="{{VERSION_PLACEHOLDER}}",
license="MIT",
python_requires=">=3.8",
packages=find_packages(include=["themoviedb", "themoviedb.*"]),
Expand All @@ -36,7 +36,6 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
keywords=[
"tmdb",
Expand Down

0 comments on commit 9bb1d12

Please sign in to comment.