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

Fixed wrong title error (Sourcery refactored) #97

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
runtime_version = "3.x.x"
2 changes: 1 addition & 1 deletion .idea/dictionaries/haroldmartin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 50 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,54 @@
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: v0.9.5
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v3.1.0
hooks:
- id: autopep8-wrapper
- id: check-ast
- id: check-case-conflict
- id: check-merge-conflict
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: flake8
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: fix-encoding-pragma
- id: debug-statements
- repo: https://github.com/asottile/reorder_python_imports
sha: v0.3.5
- id: pretty-format-json
name: 'Pretty format JSON'
args:
- '--no-sort-keys'
- '--autofix'
- '--indent=2'
- id: trailing-whitespace
name: 'Fix trailing whitespace'
exclude: setup.cfg
- id: end-of-file-fixer
name: 'Fix missing EOF'
exclude: setup.cfg
- id: check-executables-have-shebangs
name: 'Check exeutables for shebangs'
- id: check-merge-conflict
name: 'Check for merge conflict fragments'
- id: check-case-conflict
name: 'Check for filesystem character case conflicts'
- id: detect-private-key
name: 'Check for cleartext private keys stored'
- id: check-json
name: 'Validate JSON'
- id: check-ast
name: 'Check Python abstract syntax tree'
- repo: 'https://github.com/asottile/reorder_python_imports'
rev: v1.8.0
hooks:
- id: reorder-python-imports
language_version: python3.7
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
sha: v1.1.0
- id: reorder-python-imports
name: 'Reorder Python imports'
- repo: 'https://github.com/pre-commit/mirrors-autopep8'
rev: ''
hooks:
- id: python-safety-dependencies-check
- repo: https://github.com/asottile/add-trailing-comma
sha: v0.6.4
- id: autopep8
name: 'Pretty format Python'
args:
- '--in-place'
- '--aggressive'
- '--aggressive'
- '--experimental'
- '--remove-all-unused-imports'
- '--ignore-init-module-imports'
- '--remove-unused-variable'
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: add-trailing-comma
- id: black
name: 'Ruthlessly format Python'
language_version: python3.7
args:
- '--line-length=79'
41 changes: 41 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## How to contribute to Pytube

#### **Did you find a bug?**

* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/nficano/pytube/issues).

* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/nficano/pytube/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **[MRE code sample](https://stackoverflow.com/help/minimal-reproducible-example)** or an **executable test case** demonstrating the expected behavior that is not occurring.

* For more detailed information on submitting a bug report and creating an issue, visit `TODO`

#### **Did you write a patch that fixes a bug?**

* Open a new GitHub pull request with the patch.

* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.

* Before submitting, please read the [Numpy Contribution Guidelines](https://numpy.org/devdocs/dev/index.html) guide to know more about coding conventions and benchmarks.

#### **Did you fix whitespace, format code, or make a purely cosmetic patch?**

Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of Pytube will generally not be accepted as we abide by pep8 formatting.

#### **Do you intend to add a new feature or change an existing one?**

* Suggest your change as an issue in the with the label #enhancement

* Though perhaps not common as GitHub issues are primarily intended for bug reports and fixes, PyTube is currently using issues for open design proposals.

#### **Do you have questions about the source code?**

* Ask any question about how to use PyTube [in StackOverflow](https://stackoverflow.com/questions/tagged/pytube)

#### **Do you want to contribute to the PyTube documentation?**

* Consider submitting a patch to the [docs](https://github.com/nficano/pytube/tree/master/docs)

PyTube is a volunteer effort. We encourage you to pitch in and [join the team](https://contributors.rubyonrails.org)!

Thanks! :smile: :heart:

PyTube Team
72 changes: 39 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,49 @@
dev:
pipenv install --dev

pipenv:
pip install pipenv
pipenv install --dev

deploy-patch: clean requirements bumpversion-patch upload clean

deploy-minor: clean requirements bumpversion-minor upload clean

deploy-major: clean requirements bumpversion-major upload clean

requirements:
pipenv_to_requirements

bumpversion-patch:
bumpversion patch
git push
git push --tags

bumpversion-minor:
bumpversion minor
git push
git push --tags

bumpversion-major:
bumpversion major
git push
git push --tags

upload:
python setup.py sdist bdist_wheel
twine upload dist/*

help:
@echo "clean - remove all build, test, coverage and Python artifacts"
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "install - install the package to the active Python's site-packages"

pipenv:
ci:
pip install pipenv
pipenv install --dev

test:
pipenv run flake8 pytube/
pipenv run flake8 tests/
pipenv run black pytube --check
pipenv run black tests --check
pipenv run mypy pytube
pipenv run pytest --cov-report term-missing --cov=pytube

ci: pipenv test
pipenv install --dev --skip-lock
pipenv run flake8
pipenv run pytest --cov-report term-missing --cov=humps

clean: clean-build clean-pyc

Expand All @@ -33,27 +60,6 @@ clean-pyc:
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
find . -name '.pytest_cache' -exec rm -fr {} +
find . -name '.mypy_cache' -exec rm -fr {} +

install: clean
python setup.py install

package: clean
pipenv run python setup.py sdist bdist_wheel

upload:
twine upload dist/*

tag:
git diff-index --quiet HEAD -- # checks for unstaged/uncomitted files
git tag "v`pipenv run python pytube/version.py`"
git push --tags

check-master:
if [[ `git rev-parse --abbrev-ref HEAD` != "master" ]]; then exit 1; fi

pull:
git pull

release: check-master pull clean test tag package upload
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ pytest-cov = "*"
pytest-mock = "*"
pytest-profiling = "*"
sphinx_rtd_theme = "*"
pipenv-to-requirements = "*"
Loading