Skip to content

Pyknihovny 3 - #79

Merged
encukou merged 3 commits into
pyvec:masterfrom
encukou:pyknihovny-3
Mar 28, 2017
Merged

Pyknihovny 3#79
encukou merged 3 commits into
pyvec:masterfrom
encukou:pyknihovny-3

Conversation

@encukou

Copy link
Copy Markdown
Member

Příprava na 3. lekci kurzu "Python a jeho knihovny".
Odebrání úkolu, menší změny v obsahu, přidání do osnovy.

@hroncok

Copy link
Copy Markdown
Member

Chceme takhle odkazovat na úkol? Nechal bych zadání úkolu jen na MI-PYTu, kde odkazujeme na materiály. Odkaz an úkol z materiálů je z hlediska MI-PYTu už navíc.

Comment threadlessons/intro/distribution/index.md Outdated
Zatím jsme tvořili programy v Pythonu tak nějak na divoko, tedy v jednom nebo
více souborech bez nějakého zvláštního řádu. Na dnešním cvičení se podíváme na
to, jak tvořit redistribuovatelné moduly, které jdou instalovat pomocí pipu.
více souborech bez nějakého zvláštního řádu. Dnes se podíváme na

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pokud má text fungovat i pro čtenáře zvenčí, dal bych místo "dnes" "v této lekci".

Comment threadlessons/intro/distribution/index.md Outdated

Jak vidíte, `setuptools` si stěžuje, že náš projekt nemá `README`.
Jak vidíte, `setuptools` si stěžuje, že náš projekt nemá `README` – soubor,
do kterého se traadičně píšou základní informace o projektu.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo traadičně

@encukou

Copy link
Copy Markdown
MemberAuthor

Z hlediska naucse, nebo aspoň aktuálního kurzu, je odkaz na úkol užitečný. A i pro MI-PYT mi přijde fajn tam ten odkaz mít.

Comment threadlessons/intro/distribution/index.md Outdated
...
```

Hotový balíček pak můžete nainstalovat pomocí `pip`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nástroje/příkazu pip (jinak by to bylo pomocí pipu a skloňovat to moc nechceme)

Comment threadlessons/intro/distribution/index.md Outdated
@@ -196,9 +222,9 @@ V takovém případě uděláme modul ve formě složky. V našem případě sou
```

Soubor `__init__.py` jednak značí, že adresář `isholiday` je Pythonní modul,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pythonní malé p (není změněno, ale tady jsem si všiml)

Comment threadlessons/intro/distribution/index.md Outdated
pouze importovat veřejné rozhraní, tedy to, co budou z vašeho modulu importovat
jeho uživatelé.

Přesuňte tedy obsah `__main__.py` do `holidays.py`, a do `__main__.py`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Najednou se mluví o __main__.py, nemá to být __init__.py?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Má; thinko

entry_points={
'console_scripts': [
'executable_name = isholiday.holidays:main',
'isholiday_demo = isholiday.holidays:main',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 tohle tam lidi nechávali

Comment threadlessons/intro/distribution/index.md Outdated

### Soubor requirements.txt

Kromě závislostí v `setup.py` se u Pythonních projektů často setkáme se souborem

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opět malé p (asi třeba zkontrolovat celý dokument)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zkontroloval jsem to pomocí grep Pythonn

Comment threadlessons/intro/distribution/index.md Outdated
[================================] 8379/8379 - 00:00:02
```

Registrace se zdaří jen pokud jméno projektu již není zabrané.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opět nesouvisející chyba. Za "zdaří" patří čárka.

Comment threadlessons/intro/distribution/index.md Outdated
než ta, co už na PyPI je. Nejde tedy jednou nahraný modul přepsat.

Pro nahrání na opravdovou PyPI stačí vynechat `-r pypitest`.
Zabírat jména na PyPI jen tak není hezké vůči ostatním Pythonistům; registrujte

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Možná bych dal "na opravdové PyPI", na testovací ať si každý registruje, co chce.

@hroncokhroncok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Přidal jsem komentáře mimo review. Odkaz na úkol tedy nechme.

@encukou
encukou merged commit 378c46a into pyvec:masterMar 28, 2017
@encukou
encukou deleted the pyknihovny-3 branch March 28, 2017 15:32
messa pushed a commit to messa/naucse.python.cz that referenced this pull request Mar 5, 2020
* Fix: title attribute on img tag (pyvec#49)
* Remove course definition
* WIP pydata databases
* WIP pydata databases
* WIP pydata databases
* vraceni zmeny v nesouvisejici lekci
* oprava databases/info.yml
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* movies.sqlite
* WIP
* WIP
* WIP
* MVP
Co-authored-by: Jan Pipek <jan.pipek@gmail.com>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@encukou@hroncok