Skip to content

Add Initial Documentation and Contributor Guide for Youtool Project #12

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

Open
wants to merge 115 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
2ecbda4
Add console_scripts to setup.cfg
turicas May 20, 2024
252ff46
Implement draft CLI module
turicas May 20, 2024
dcc9e2f
Add old/draft CLI search code
turicas May 20, 2024
f2540a8
Add useful scripts (to be added to utils and CLI)
turicas Jun 8, 2024
079e5ee
- Add argparse integration and command handling for Youtube CLI Tool
aninhasalesp Jun 25, 2024
4c5d151
- Implemented method to extract URLs from a CSV file;
aninhasalesp Jun 25, 2024
943f6b0
- Implemented command to extract YouTube channel IDs from a list of U…
aninhasalesp Jun 25, 2024
b4f82e5
- Added to the list;
aninhasalesp Jun 25, 2024
525015e
Update cli.py
aninhasalesp Jun 26, 2024
4fba6d4
- Removed the type annotation from the method;
aninhasalesp Jun 27, 2024
2ba79df
- Add changed the method signature in the class to accept (**kwargs…
aninhasalesp Jun 27, 2024
8ab5185
- Fixed typing error in all in the file.
aninhasalesp Jun 28, 2024
6b28320
Add updates docstrings
aninhasalesp Jun 28, 2024
dfc2011
Update import
aninhasalesp Jul 2, 2024
b1b3367
Add update command into the file
aninhasalesp Jul 2, 2024
28b2574
Add update
aninhasalesp Jul 2, 2024
fe180fb
Add improvements to the file
aninhasalesp Jul 2, 2024
d4e66b4
Add test for cli file
aninhasalesp Jul 2, 2024
4bf29ff
Add test for base file
aninhasalesp Jul 2, 2024
216e5f2
Add test for channel_id command
aninhasalesp Jul 2, 2024
1b335b7
add docstrings
aninhasalesp Jul 5, 2024
c5ad8fd
- Implement ChannelInfo class to fetch YouTube channel information fr…
aninhasalesp Jun 25, 2024
e718d4a
- Included ChannelInfo in the list of commands in COMMANDS.
aninhasalesp Jun 25, 2024
7dc7b8d
Add updates docstrings
aninhasalesp Jun 28, 2024
ed012e5
Add updates docstrings
aninhasalesp Jun 28, 2024
9a5fe66
- Add updates
aninhasalesp Jun 28, 2024
8ba47cf
- Add updates
aninhasalesp Jun 28, 2024
c08e4ec
- Add test for channel_info command;
aninhasalesp Jul 4, 2024
a5bb13d
add docstrings
aninhasalesp Jul 5, 2024
923170e
fix
aninhasalesp Jul 6, 2024
d77a36b
Add new command in list
aninhasalesp Jun 30, 2024
734e981
- Implement CSV input processing for video IDs and URLs in VideoInfo …
aninhasalesp Jun 30, 2024
e9000ca
Add updates docstrings
aninhasalesp Jun 28, 2024
d4327d1
Add updates docstrings
aninhasalesp Jun 28, 2024
c4134e0
- Add updates
aninhasalesp Jun 28, 2024
0683403
- Add updates
aninhasalesp Jun 28, 2024
60bd144
Add update
aninhasalesp Jul 2, 2024
916d633
add config optional argmuments
aninhasalesp Jul 2, 2024
65f44fb
add not implemented error
aninhasalesp Jul 2, 2024
eddfb96
add video_id_from_url static method
aninhasalesp Jul 3, 2024
b344a72
add video-info from url case
aninhasalesp Jul 3, 2024
64252d7
- Add test for channel_info command;
aninhasalesp Jul 4, 2024
801e5f3
Add test for video_info command;
aninhasalesp Jul 4, 2024
9572aed
fix
aninhasalesp Jul 4, 2024
5de983d
add docstrings
aninhasalesp Jul 5, 2024
e8ab076
Add updates docstrings
aninhasalesp Jun 28, 2024
cac8aae
- Add updates
aninhasalesp Jun 28, 2024
797b4cb
Add test for base file
aninhasalesp Jul 2, 2024
3061ca8
Add update
aninhasalesp Jul 2, 2024
ca3edc1
Add video_search command
aninhasalesp Jul 3, 2024
fb6391e
Fix
aninhasalesp Jul 3, 2024
301a2e0
Add update
aninhasalesp Jul 3, 2024
68d5ea5
add video-search from url case
aninhasalesp Jul 3, 2024
6ab1762
- Add test for channel_info command;
aninhasalesp Jul 4, 2024
937ad3d
- Add test for video_search command;
aninhasalesp Jul 5, 2024
00a3097
add docstrings
aninhasalesp Jul 5, 2024
0552a62
add updates channel_info test
aninhasalesp Jul 6, 2024
4dc8f34
Remove unnecessary comment
aninhasalesp Jul 3, 2024
cfa0532
Add video_comments command
aninhasalesp Jul 3, 2024
221770c
Add update
aninhasalesp Jul 3, 2024
cfcccbc
- Add test for video_search command;
aninhasalesp Jul 5, 2024
4112d02
- Add test for video_comments command
aninhasalesp Jul 5, 2024
59d1ad5
add docstrings
aninhasalesp Jul 5, 2024
bd78a70
Add video_livechat command
aninhasalesp Jul 3, 2024
bc96643
- Add test for video_search command;
aninhasalesp Jul 5, 2024
6db0448
- Add test for video_livechat command
aninhasalesp Jul 5, 2024
be977aa
add docstrings
aninhasalesp Jul 5, 2024
93a94da
Add video_transcription command
aninhasalesp Jul 4, 2024
c9433ff
- Add test for video_transcription command;
aninhasalesp Jul 5, 2024
b1d2fdf
remove comments
aninhasalesp Jul 5, 2024
160cecd
add docstrings
aninhasalesp Jul 5, 2024
cfd3bf1
Implement draft CLI module
turicas May 20, 2024
7ced399
Add updates docstrings
aninhasalesp Jun 28, 2024
83ecd8b
Add updates docstrings
aninhasalesp Jun 28, 2024
bdd8048
- Add updates
aninhasalesp Jun 28, 2024
ebfadcf
Add updates
aninhasalesp Jul 4, 2024
6a7542a
- Add test for channel_info command;
aninhasalesp Jul 4, 2024
7f7e633
- Add test for video_search command;
aninhasalesp Jul 5, 2024
6ed06e7
- Add test for video_transcription command;
aninhasalesp Jul 5, 2024
4b5cdbe
Add cli config
aninhasalesp Jul 5, 2024
9a80daf
remove unnecessary files
aninhasalesp Jul 5, 2024
065acf3
Add fix in file
aninhasalesp Jun 30, 2024
a645923
Add updates docstrings
aninhasalesp Jun 28, 2024
96a9f05
Add updates docstrings
aninhasalesp Jun 28, 2024
533ec6a
- Add updates
aninhasalesp Jun 28, 2024
d4b8986
- Add updates
aninhasalesp Jun 28, 2024
8c77ab2
Add update
aninhasalesp Jul 2, 2024
264b311
Fix
aninhasalesp Jul 3, 2024
7ed6840
- Add test for channel_info command;
aninhasalesp Jul 4, 2024
1f30a9b
- Add test for video_search command;
aninhasalesp Jul 5, 2024
088b3f0
- Add test for video_transcription command;
aninhasalesp Jul 5, 2024
d00b97b
add poetry
aninhasalesp Jul 5, 2024
0644cb3
add updates poetry config
aninhasalesp Jul 6, 2024
e5e232f
add dependencie
aninhasalesp Jul 6, 2024
6e46679
Implement draft CLI module
turicas May 20, 2024
2dd9e25
Add test for base file
aninhasalesp Jul 2, 2024
8281c7d
Add update
aninhasalesp Jul 2, 2024
3249990
- Add test for channel_info command;
aninhasalesp Jul 4, 2024
8e33465
- Add test for video_search command;
aninhasalesp Jul 5, 2024
50ac1b4
add github actions
aninhasalesp Jul 5, 2024
9817382
add updates github actions
aninhasalesp Jul 6, 2024
b252ef8
fix
aninhasalesp Jul 6, 2024
1c8a087
fix
aninhasalesp Jul 6, 2024
32487ad
fix
aninhasalesp Jul 6, 2024
6c6575c
fix
aninhasalesp Jul 6, 2024
6af4f31
fix
aninhasalesp Jul 6, 2024
8223267
Implement draft CLI module
turicas May 20, 2024
98ea4d0
- Add test for channel_info command;
aninhasalesp Jul 4, 2024
03dbcd4
- Add test for video_search command;
aninhasalesp Jul 5, 2024
ffbccff
add github actions
aninhasalesp Jul 5, 2024
37d2a75
add file readthedocs config
aninhasalesp Jul 6, 2024
ca1d94b
implementing read the docs config
aninhasalesp Jul 9, 2024
8e22018
fix
aninhasalesp Oct 17, 2024
32c73c0
fix
aninhasalesp Oct 18, 2024
31b90d0
fix
aninhasalesp Oct 18, 2024
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
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
.gitignore
.pytest_cache
Dockerfile
README.md
build
data
dist
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on: [ push, pull_request ]

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pip install poetry==1.7.1
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'poetry'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
poetry install -vv
- name: Test
run: pytest
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
120 changes: 120 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
How to contribute to Youtool
============================

Thank you for considering to Youtool!

First time setup in your local environment:
-------------------------------------------

- Make sure you have a `GitHub account <https://github.com/>`_

- Fork Youtool to your GitHub account by clicking the `Fork <https://github.com/PythonicCafe/youtool/fork>`_ button

- `Clone <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#step-2-create-a-local-clone-of-your-fork>`_ your fork locally, replacing your-username in the command below with your actual username

.. code-block::

git clone https://github.com/your-username/youtool
cd youtool

Installation Poetry
-------------------
To manage dependencies and packaging for the project, we use Poetry.
- Please follow the installation instructions provided in the `poetry <https://python-poetry.org/docs/#installation>`_


Setting Up the Virtual Environment
----------------------------------
- After installing Poetry, you need to set up the virtual environment for the project. Navigate to the project directory and run the following command:

.. code-block::

poetry shell

This command will create and activate a virtual environment for the project.


Installing Dependencies
-----------------------
- Once the virtual environment is activated, you can install the project dependencies by running:

.. code-block::

poetry install

This command will install all the dependencies listed in the pyproject.toml file.


Creating a Local Branch from a Remote Branch
--------------------------------------------
To start contributing, you need to create a local branch based on a remote branch.
Use the following commands to achieve this:
1. Fetch the latest changes from the remote repository:

.. code-block::

git fetch origin

2. Create and switch to a new branch based on the remote branch:

.. code-block::

git checkout -b <new-branch-name> origin/<remote-branch-name>

Push your commits to your fork on GitHub and `create a pull request <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request>`_. Link to the issue being addressed with fixes #123 in the pull request description.

.. code-block::

git push --set-upstream origin nome-do-seu-branch

Replace <new-branch-name> with your desired branch name and <remote-branch-name> with the name of the remote branch you want to base your work on.

By following these steps, you'll have a local branch set up and ready for your contributions.


Running Tests
-------------
Before submitting your changes, it's important to run the tests to ensure everything is working correctly.
Depending on whether you are inside or outside the virtual environment, use one of the following commands:

1. Inside the virtual environment:
If you have already activated the virtual environment with poetry shell, run:

.. code-block::

pytest

2. Outside the virtual environment:
If you are not inside the virtual environment, you can still run the tests using Poetry:

.. code-block::

poetry run pytest

By following these steps, you'll ensure that all tests are run correctly before submitting your contributions.

Updating Documentation
----------------------
Our documentation is hosted on Read the Docs, and the configuration files are located in the docs directory. To update the documentation, follow these steps:

1. Navigate to the docs directory:

.. code-block::

cd docs

2. Make your changes:
Edit the necessary files to update the documentation.
The main configuration file is typically conf.py, but you may also need to update other ``.rst`` files as required.

3. Build the documentation locally:
After making your changes, you can build the HTML version of the documentation to preview your updates.
Run the following command:

.. code-block::

make html

Open ``_build/html/index.html`` in your browser to view the docs.

Read more about `Sphinx <https://www.sphinx-doc.org/en/master/>`_.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ RUN apt update \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

COPY requirements/ /app/requirements
RUN pip install --no-cache-dir -U pip \
&& pip install --no-cache-dir -r /app/requirements/base.txt \
&& pip install --no-cache-dir -r /app/requirements/cli.txt \
&& pip install --no-cache-dir -r /app/requirements/livechat.txt \
&& pip install --no-cache-dir -r /app/requirements/transcription.txt \
&& if [ "$DEV_BUILD" = "true" ]; then pip install --no-cache-dir -r /app/requirements/dev.txt; fi

COPY . /app/

RUN pip install --no-cache-dir -U --upgrade pip \
&& if [ "$DEV_BUILD" = "true" ]; \
then \
pip install poetry==1.4.2; \
poetry export -f requirements.txt --output requirements.txt --without-hashes --with dev; \
pip install --no-cache-dir -r requirements.txt; \
else pip install /app; fi
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
27 changes: 27 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Youtool'
copyright = '2024, Álvaro Justen'
author = 'Álvaro Justen'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["myst_parser"]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
1 change: 1 addition & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../CONTRIBUTING.rst
Loading