Skip to content

Commit 3f8cf09

Browse files
authored
Initial project setup (#2)
2 parents 3c0cff3 + 0cff789 commit 3f8cf09

8 files changed

Lines changed: 55 additions & 23 deletions

File tree

.github/workflows/linting.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ jobs:
120120
run: poetry run pre-commit run check-xml --all-files
121121
- name: 🚀 Check YAML files
122122
run: poetry run pre-commit run check-yaml --all-files
123-
- name: 🚀 Check YAML files
124-
run: poetry run pre-commit run check-yaml --all-files
125123
- name: 🚀 Detect Private Keys
126124
run: poetry run pre-commit run detect-private-key --all-files
127125
- name: 🚀 Check End of Files

.github/workflows/typing.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
- name: 🏗 Install dependencies
3333
run: poetry install --no-interaction
3434
- name: 🚀 Run mypy
35-
run: poetry run mypy examples src tests
35+
run: poetry run mypy src tests

poetry.lock

Lines changed: 11 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sonar-project.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
sonar.projectKey=joostlek_python-opensky
1+
sonar.projectKey=joostlek_python-youtube
22
sonar.organization=joostlek-github
3-
sonar.projectName=Asynchronous Python client for the OpenSky API
3+
sonar.projectName=Asynchronous Python client for the YouTube V3 API
44
sonar.projectVersion=1.0
55

6-
sonar.links.homepage=https://github.com/joostlek/python-opensky
7-
sonar.links.ci=https://github.com/joostlek/python-opensky/actions
8-
sonar.links.issue=https://github.com/joostlek/python-opensky/issues
9-
sonar.links.scm=https://github.com/joostlek/python-opensky/tree/main
6+
sonar.links.homepage=https://github.com/joostlek/python-youtube
7+
sonar.links.ci=https://github.com/joostlek/python-youtube/actions
8+
sonar.links.issue=https://github.com/joostlek/python-youtube/issues
9+
sonar.links.scm=https://github.com/joostlek/python-youtube/tree/main
1010

1111
sonar.language=py
1212
sonar.sourceEncoding=UTF-8

src/python_youtube/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
"""Asynchronous Python client for the YouTube V3 API."""
2-
3-
__all__ = []

src/python_youtube/youtube.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""The YouTube API."""
2+
__all__ = [
3+
"YouTube",
4+
]
5+
6+
7+
class YouTube:
8+
"""YouTube API client."""
9+
10+
def __init__(self) -> None:
11+
"""Initialize the YouTube client."""
12+
self.test = "ack"
13+
14+
def syn(self) -> str:
15+
"""Test method."""
16+
return self.test
17+
18+
def ack(self) -> str:
19+
"""Test method."""
20+
return self.test

tests/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""Tests for the YouTube Library."""
2+
from pathlib import Path
3+
4+
5+
def load_fixture(filename: str) -> str:
6+
"""Load a fixture."""
7+
path = Path(__package__) / "fixtures" / filename
8+
return path.read_text(encoding="utf-8")

tests/test_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""Tests for the YouTube client."""
2+
from python_youtube.youtube import YouTube
3+
4+
5+
async def test_init() -> None:
6+
"""Test if YouTube client can be created."""
7+
youtube = YouTube()
8+
assert youtube.syn() == "ack"
9+
assert youtube.ack() == "ack"

0 commit comments

Comments
 (0)