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

Init.movie.trakt property #209

Closed
wants to merge 96 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
c308ce1
TVShow: Add collection_progress() method
glensc Jan 11, 2022
649a866
TVShow: Add watched_progress() method
glensc Jan 11, 2022
f234cd8
TVShow: Add collection_progress() testing
glensc Jan 11, 2022
1958dcb
TVShow: Extract progress property body to _progress() method
glensc Jan 11, 2022
b74a0b6
TVShow: Add specials parameter to _progress() method
glensc Jan 11, 2022
02d29f0
Add deprecated~=1.2.13 dependency
glensc Jan 11, 2022
3c3e297
Add User.get_liked_lists method
glensc Jan 11, 2022
f60922b
Add test_liked_lists test
glensc Jan 11, 2022
ee435c5
TVShow: Add count_specials, hidden parameters to _progress
glensc Jan 12, 2022
af1b70d
TVShow: Add count_specials, hidden to watched_progress() and collecti…
glensc Jan 12, 2022
921bfd3
tests: Print urls for what mock data is missing
glensc Jan 12, 2022
f59e560
Fix progress typo
glensc Jan 12, 2022
cc0be4a
Tests: Add mock data for progress/collection
glensc Jan 12, 2022
908ee2d
Add GitHub Actions workflow to publish to pypi
glensc Jan 13, 2022
a133af1
Drop api_key (deprecated in 2.x)
glensc Jan 14, 2022
2fa05dd
Add BadResponseException exception with code -1
glensc Jan 15, 2022
5a3fdf1
Add deprecated~=1.2.13 dependency
glensc Jan 11, 2022
ae7d500
Update documentation for get_watchlist
glensc Jan 15, 2022
69936fb
Deprecate get_watched to indicate wrong api call being used
glensc Jan 15, 2022
6d36b68
Catch json decode errors for unhandled status codes
glensc Jan 15, 2022
9d46799
Test details of TVSeason containing TVEpisode
glensc Jan 15, 2022
bb77719
TVShow: Use /seasons endpoint to fill seasons and episodes
glensc Jan 12, 2022
123d7c3
Avoid poisoning "number" into TVSeason
glensc Jan 15, 2022
d11e29b
Add shows/the-flash-2014/seasons?extended=episodes mock data
glensc Jan 15, 2022
fc7a72b
Drop classes extending from object
glensc Jan 15, 2022
bc77e26
Cleanup: __iter__ doesn't take any args
glensc Jan 15, 2022
6d26869
Remove old (python<3.0) super constructor syntax
glensc Jan 16, 2022
19b599d
Refactor slugify to handle special cases
glensc Jan 17, 2022
9a391e3
Add two slugify special cases to test
glensc Jan 17, 2022
1890686
Add Bad Gateway exception
glensc Jan 23, 2022
80de702
Don't log headers to protect privacy
glensc Jan 30, 2022
350a530
Return responses of Scrobble methods
glensc Jan 30, 2022
629b425
Return season slug from seasons function
BapRx Feb 19, 2022
31d6737
Add details parameter to BadResponseException constructor
glensc Jan 15, 2022
27d90b1
Add details to BadResponseException of json error
glensc Jan 15, 2022
d6fe4dd
fix wrong uri in sync.py
simonc56 Jun 13, 2022
80fae41
fix season number in show_collection
simonc56 Jun 13, 2022
2613efb
type added to Userlist
simonc56 Jun 18, 2022
27f9375
add type value to lists
simonc56 Jun 18, 2022
827550a
Merge branch 'BadResponseException'
glensc Oct 16, 2022
fb98340
add show_id attribute to TVEpisode found from search
simonc56 Oct 22, 2022
da02d95
uses show_id instead of slug when available
simonc56 Oct 23, 2022
72a80d5
Add name to authors
glensc Oct 23, 2022
5440af3
Set version to 3.4.1
glensc Oct 23, 2022
b8f30da
Merge branch 'list-type'
glensc Oct 23, 2022
becb165
Set version to 3.4.2
glensc Oct 23, 2022
dee22cb
Merge branch 'user/get_liked_lists'
glensc Oct 23, 2022
b3a46e9
Set version to 3.4.3
glensc Oct 23, 2022
5a7377f
Merge branch 'show/episodes'
glensc Oct 23, 2022
4a2d6f4
Set version to 3.4.4
glensc Oct 23, 2022
4d09a72
Merge branch 'pypi-publish'
glensc Oct 23, 2022
62f73db
Update project homepage, name package as "pytrakt"
glensc Oct 23, 2022
4bd4bb7
Update some project urls
glensc Oct 23, 2022
19123ac
Fix DEFAULT_PYTHON parsing in yaml
glensc Oct 23, 2022
48a0579
Set version to 3.4.5
glensc Oct 23, 2022
b8ebac6
Update actions to avoid node 12 deprecation warnings
glensc Oct 23, 2022
380d5a7
Add version file
glensc Oct 23, 2022
56fcd88
Use __version__ from __version__.py
glensc Oct 23, 2022
e8937ee
Automate version setup for PyPI publishing in CI
glensc Oct 23, 2022
ef4b4ef
Automate version setup for PyPI publishing in CI (#1)
glensc Oct 23, 2022
237ed8a
pip install pytrakt
simonc56 Oct 23, 2022
dece4d0
Merge branch 'get-show_id-from-episode-search'
glensc Oct 23, 2022
e1c4be0
Merge branch 'shows/progress'
glensc Oct 23, 2022
c772ca9
Merge branch 'deprecated-dep'
glensc Oct 23, 2022
125c9ae
Add workflow to run tests in CI
glensc Oct 24, 2022
0cd061b
Run tests in matrix
glensc Oct 24, 2022
afd45fc
Update badges for project name
glensc Oct 24, 2022
7c7e4d4
Update CI badge url
glensc Oct 24, 2022
4bc933d
Remove circleci setup
glensc Oct 24, 2022
28322e2
Few more master -> main changes
glensc Oct 24, 2022
0fe6287
Add workflow to run tests in CI (#2)
glensc Oct 24, 2022
7fe463d
Use @classmethod propertly
glensc Oct 24, 2022
4618309
Use @staticmethod instead of @classmethod
glensc Oct 24, 2022
69b4138
Fix: Use @classmethod propertly (#3)
glensc Oct 24, 2022
75abb0e
Merge branch 'remove-deprecated-super'
glensc Oct 24, 2022
edb257e
Merge branch 'Bad-Gateway'
glensc Oct 24, 2022
a24cc57
Merge branch 'scrobble-response'
glensc Oct 24, 2022
9abe916
Merge branch 'patch-2'
glensc Oct 24, 2022
f6875ea
Merge branch 'cleanup-args'
glensc Oct 24, 2022
db50999
Add progress parameter to Scrobbler methods
glensc Oct 24, 2022
ff50421
add show_id to TVEpisode
simonc56 Oct 25, 2022
7118e50
Merge branch 'fix-wrong-uri'
glensc Oct 25, 2022
9660b93
Run CI tests on default branch
glensc Oct 25, 2022
76760b5
add show_id to TVEpisode (#6)
glensc Oct 25, 2022
f27ea2f
Feature: Add progress parameter to Scrobbler methods (#5)
glensc Oct 30, 2022
45ec546
Update methods to return api responses
glensc Nov 2, 2022
f230a8f
Update tests to match signature
glensc Nov 2, 2022
8cbc856
Merge branch '165-slugpattern'
glensc Nov 2, 2022
51fe122
Merge branch 'drop-api_key'
glensc Nov 2, 2022
0a4902f
Merge branch '160-deprecate_get_watched'
glensc Nov 2, 2022
e74486f
Merge branch 'py3-implicit-object'
glensc Nov 2, 2022
f82cfcc
Merge branch 'tests/mock_data-missing'
glensc Nov 2, 2022
c5f3047
Feature: Update methods to return api responses (#7)
glensc Nov 2, 2022
18f0ac3
Merge branch 'fix-tvseason-number'
glensc Nov 6, 2022
3a6ab70
Merge branch 'fix/156-wrong-tv-season-returned'
glensc Nov 6, 2022
fe8d333
Initialize Movie.trakt property with None
glensc Nov 29, 2022
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
161 changes: 0 additions & 161 deletions .circleci/config.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see:
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: PyPI

on:
workflow_dispatch: ~
release:
types: [published]
push:
tags:
- '*.*.*'

env:
DEFAULT_PYTHON: "3.10"

jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Set version variable
id: version
run: |
if [[ "${GITHUB_REF#refs/heads/}" = "${GITHUB_REF}" ]]; then
APP_VERSION=${GITHUB_REF#refs/tags/}
else
git fetch --tags --unshallow
version=$(git describe --tags --abbrev=0)
subver=${{ github.run_number }}
APP_VERSION=$version.post$subver
fi
echo "version=$APP_VERSION" >> $GITHUB_OUTPUT

- name: Install dependencies and build
env:
APP_VERSION: ${{ steps.version.outputs.version }}
run: |
# Setup version
set -x
echo "__version__ = '$APP_VERSION'" > trakt/__version__.py
cat trakt/__version__.py
python -c "from trakt import __version__; print(__version__)"

# Build the package
python -m pip install --upgrade build
python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

# vim:ts=2:sw=2:et
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test

on:
pull_request:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-20.04
name: Python ${{ matrix.python }}
strategy:
matrix:
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"

steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install dependencies (pip)
run: python -m pip install -r requirements.txt -r testing-requirements.txt
- name: Test
run: make test

# vim:ts=2:sw=2:et
31 changes: 16 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
PyTrakt
=======
.. image:: https://circleci.com/gh/moogar0880/PyTrakt/tree/master.svg?style=svg
:target: https://circleci.com/gh/moogar0880/PyTrakt/tree/master
:alt: CircleCI Status

.. image:: https://img.shields.io/pypi/dm/trakt.svg
:target: https://pypi.python.org/pypi/trakt
.. image:: https://github.com/glensc/python-pytrakt/actions/workflows/test.yml/badge.svg
:target: https://github.com/glensc/python-pytrakt/actions
:alt: CI Status

.. image:: https://img.shields.io/pypi/dm/pytrakt.svg
:target: https://pypi.org/project/pytrakt/
:alt: Downloads

.. image:: https://img.shields.io/pypi/l/trakt.svg
:target: https://pypi.python.org/pypi/trakt/
.. image:: https://img.shields.io/pypi/l/pytrakt.svg
:target: https://pypi.org/project/pytrakt/
:alt: License

This module is designed to be a Pythonic interface to the `Trakt.tv <http://trakt.tv>`_.
Expand All @@ -30,23 +31,23 @@ Install Via Pip
^^^^^^^^^^^^^^^
To install with `pip <http://www.pip-installer.org/>`_, just run this in your terminal::

$ pip install trakt
$ pip install pytrakt

Get the code
^^^^^^^^^^^^
trakt is available on `GitHub <https://github.com/moogar0880/PyTrakt>`_.
trakt is available on `GitHub <https://github.com/glensc/python-pytrakt>`_.

You can either clone the public repository::

$ git clone git://github.com/moogar0880/PyTrakt.git
$ git clone git://github.com/glensc/python-pytrakt.git

Download the `tarball <https://github.com/moogar0880/PyTrakt/tarball/master>`_::
Download the `tarball <https://github.com/glensc/python-pytrakt/tarball/main>`_::

$ curl -OL https://github.com/moogar0880/PyTrakt/tarball/master
$ curl -OL https://github.com/glensc/python-pytrakt/tarball/main

Or, download the `zipball <https://github.com/moogar0880/PyTrakt/zipball/master>`_::
Or, download the `zipball <https://github.com/glensc/python-pytrakt/zipball/main>`_::

$ curl -OL https://github.com/moogar0880/PyTrakt/zipball/master
$ curl -OL https://github.com/glensc/python-pytrakt/zipball/main

Once you have a copy of the source, you can embed it in your Python package,
or install it into your site-packages easily::
Expand All @@ -58,7 +59,7 @@ Contributing
Pull requests are graciously accepted. Any pull request should not break any tests
and should pass `flake8` style checks (unless otherwise warranted). Additionally
the user opening the Pull Request should ensure that their username and a link to
their GitHub page appears in `CONTRIBUTORS.md <https://github.com/moogar0880/PyTrakt/blob/master/CONTRIBUTORS.md>`_.
their GitHub page appears in `CONTRIBUTORS.md <https://github.com/glensc/python-pytrakt/blob/main/CONTRIBUTORS.md>`_.


TODO
Expand Down
2 changes: 0 additions & 2 deletions docs/getstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ Should you choose to store your credentials in another way and not to set the
`store` flag, you will need to ensure that your application applies the
following settings before attempting to interact with Trakt

* `trakt.core.api_key`
* Note: api_key is deprecated in favor of OAUTH_TOKEN and will go away with the next major release
* `trakt.core.OAUTH_TOKEN`
* `trakt.core.CLIENT_ID`
* `trakt.core.CLIENT_SECRET`
Expand Down
12 changes: 6 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ To install with `pip <http://www.pip-installer.org/>`_, just run this in your te

Get the code
^^^^^^^^^^^^
trakt is available on `GitHub <https://github.com/moogar0880/PyTrakt>`_.
trakt is available on `GitHub <https://github.com/glensc/python-pytrakt>`_.

You can either clone the public repository::

$ git clone git://github.com/moogar0880/PyTrakt.git
$ git clone git://github.com/glensc/python-pytrakt.git

Download the `tarball <https://github.com/moogar0880/PyTrakt/tarball/master>`_::
Download the `tarball <https://github.com/glensc/python-pytrakt/tarball/main>`_::

$ curl -OL https://github.com/moogar0880/PyTrakt/tarball/master
$ curl -OL https://github.com/glensc/python-pytrakt/tarball/master

Or, download the `zipball <https://github.com/moogar0880/PyTrakt/zipball/master>`_::
Or, download the `zipball <https://github.com/glensc/python-pytrakt/zipball/main>`_::

$ curl -OL https://github.com/moogar0880/PyTrakt/zipball/master
$ curl -OL https://github.com/glensc/python-pytrakt/zipball/main

Once you have a copy of the source, you can embed it in your Python package,
or install it into your site-packages easily::
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
requests>=2.25
deprecated~=1.2.13
requests-oauthlib>=1.3
requests>=2.25
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import trakt

__author__ = 'Jon Nappi'
__author__ = 'Elan Ruusamäe, Jon Nappi'

with open('README.rst') as f:
readme = f.read()
Expand All @@ -16,13 +16,13 @@
'Trakt.tv REST API.')

setup(
name='trakt',
name='pytrakt',
version=trakt.__version__,
description=description,
long_description='\n'.join([readme, history]),
author='Jonathan Nappi',
author_email='[email protected]',
url='https://github.com/moogar0880/PyTrakt',
author='Elan Ruusamäe',
author_email='[email protected]',
url='https://github.com/glensc/python-pytrakt',
packages=packages,
install_requires=requires,
license='Apache 2.0',
Expand Down
Loading