Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Егор Пирогов. Один в поле не воин, или причем тут OSS

Егор Пирогов. Один в поле не воин, или причем тут OSS

Доклад о том, зачем начинающему (и не очень) разработчику участвовать в развитии OSS-проектов. Поговорим про PyPI, pip и Poetry, а также о не совсем очевидном следствии создания своего проекта.

More Decks by Python Community Chelyabinsk

Other Decks in Programming

Transcript

  1. Один в поле не воин и причем тут OSS? Егор

    Пирогов Онлайн-типография «100 Макетов»
  2. Octoverse 31 М+ 2.1 М+ 96 М+ разработчиков организаций репозиториев

    прибавьте BitBucket, SourceForge, LaunchPad и с десяток менее известных
  3. С чего начать? > с того что используешь каждый день

    > коммьюнити, Issue, How to contribute > поиск по «good first issue», «help wanted» > up-for-grabs.net > сodetriage.com > helpwanted.apache.org
  4. Выход в свет: создаем пакет $ tree . ├── hellopychel

    │ ├── helloworld.py │ └── __init__.py ├── LICENSE ├── README.md └── setup.py
  5. from setuptools import setup, find_packages with open("README.md", "r") as readme_file:

    long_description = readme_file.read() setup( name="hellopychel", version="0.1", author="George P.", author_email="[email protected]", description="The best way to greet the World.", long_description=long_description, long_description_content_type="text/markdown", license="MIT", url="", packages=find_packages(exclude=['tests*']), install_requires=[], python_requires='>=3', classifiers=[ "Programming Language :: Python", ], )
  6. Выход в свет: собираем пакет $ pip install --upgrade setuptools

    wheel twine $ python setup.py sdist bdist_wheel $ tree dist/ dist/ ├── hellopychel-0.1-py3-none-any.whl └── hellopychel-0.1.tar.gz $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
  7. Выход в свет: Yay! $ pip install -i https://test.pypi.org/simple/ hellopychel

    >>> from hellopychel import helloworld >>> helloworld.hello_pychel() Hello, World! Yay! $ twine upload dist/*
  8. Неочевидное $ tree ghreport/ ghreport/ ├── ghreport │ ├── ghreport.py

    │ └── __init__.py ├── LICENSE ├── README.md ├── requirements.txt └── setup.py
  9. Неочевидное $ pip install ghreport $ ghreport --help usage: ghreport

    [-h] [--version] [--date YYYY-MM-DD] [--store-token TOKEN] [--remove-token] [--store-repository REPOSITORY] [--remove-repository REPOSITORY] [--list-repositories] Review your activity on GitHub.
  10. Добрая машина пропаганды Программа минимум - retention: > короткое описание

    сути проекта > бейджи > инструкция по установке > пример(ы) использования > лого (опционально)
  11. Добрая машина пропаганды Программа минимум - acquisition > Reddit >

    up-for-grabs.net > Stack Overflow > Python meetup :) > Статьи
  12. Зачем? > прокачать профессиональные навыки > заработать репутацию и улучшить

    резюме > собрать «комплект увольнения» > improve your English > проверить и улучшить проект