-
Notifications
You must be signed in to change notification settings - Fork 119
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
Added a metacourse with instructions on how to add a course/run #394
Conversation
I'm gonna update the last part about adding the webhook once I code the automatic webhook installation. |
Hodně děláš odkazy "zde". To se mi nelíbí. http://pristupnost.nawebu.cz/texty/pravidla-standardy.php?full#rule27 |
Opravím. |
Takhle? |
Ano. |
|
||
## Instalace | ||
|
||
Nejprve musíš naklonovat repozitář ze kterého se Nauč se Python vykresluje. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
čárka před ze kterého
style: md | ||
attribution: Napsal Mikuláš Poul, 2018 | ||
license: cc-by-sa-40 | ||
license_code: cc0 |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
lessons/meta/local-run/index.md
Outdated
|
||
Teď když už máš lokální instalaci Nauč se, můžeš začít vytvářet vlastní kurz. | ||
|
||
První věc, kterou musíš udělat je vybrat si identifikátor kurzu, pod kterým bude kurz uložený. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
udělat čárka
lessons/meta/local-run/index.md
Outdated
### O formátu YAML | ||
|
||
Formát se skládá z několika stavebních bloků, které se dají poté skládat dohromady. | ||
Prvním je seznam hodnot (pokud umíš v Pythonu, tak si to představ jako pole). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seznam, ne pole.
lessons/meta/local-run/index.md
Outdated
- První položka | ||
- Druhá položka | ||
- 3 | ||
- Položka můžeš být i něco jiného než text! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
může
lessons/meta/local-run/index.md
Outdated
## Otestování vlastního kurzu | ||
|
||
Po vytvoření souboru ``info.yml`` se povinnými položkami se můžeš konečně podívat na svůj kurz jak bude vypadat. | ||
Podle instrukcí z předchozí části manuálu si spusť Nauč se v režimu ``serve``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
odkaz na předchozí část
lessons/meta/local-run/index.md
Outdated
|
||
Po vytvoření souboru ``info.yml`` se povinnými položkami se můžeš konečně podívat na svůj kurz jak bude vypadat. | ||
Podle instrukcí z předchozí části manuálu si spusť Nauč se v režimu ``serve``. | ||
Otevři si adresu, který ti příkaz napíše a odnaviguj se do části s kurzy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kterou
lessons/meta/local-run/index.md
Outdated
|
||
Pokud se stránka s kurzy nevykreslí, tak jsi nejspíš udělal{{a}} někde nějakou chybu při definici povinných údajů – zkontroluj si jestli jsi vážně vyplnil{{a}} všechny údaje. | ||
V opačném případě si rozklikni svůj kurz. | ||
Pokud se ti nevykreslí detail kurzu, nejspíš jsi udělal{{a}} nějakou chybu v definici lekcí nebo materiálů – zkontroluj si, jestli například nemáš dvě lekce se stejným identifikátorem, jesli není překlep v nějakém klíčí a jestli například neodkazuješ na materiál, který neexistuje. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uvidíš python výjimku, která ti může pomoct, ale taky může být pěkně matoucí. kdyžtak se nám ozvi (přes issues?)
lessons/meta/local-run/index.md
Outdated
Pokud se ti nevykreslí detail kurzu, nejspíš jsi udělal{{a}} nějakou chybu v definici lekcí nebo materiálů – zkontroluj si, jestli například nemáš dvě lekce se stejným identifikátorem, jesli není překlep v nějakém klíčí a jestli například neodkazuješ na materiál, který neexistuje. | ||
|
||
Dále si pak můžeš proklikat všechny jednotlivé materiály, jestli vše funguje. | ||
Pokud se ti to nechce dělat ručně, můžeš pustit Nauč se v druhém režimu, který projde všechny stránky sám a vyhodí chybu, pokud v nějaké bude chyba. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tuhle větu bych přepsal, nezí moc lidsky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jak vidíš, tak já na tom s češtinou nejsem o moc líp oproti angličtině :)
lessons/meta/local-run/index.md
Outdated
``title`` nastavuje název, ``style`` může být ``md`` nebo ``ipynb`` podle toho jaký formát bude mít text. | ||
``license`` nastavuje licensi pod kterou materiály píšeš – identifikátor ze složky ``licenses``. | ||
|
||
Dále má soubor nepovinné položky, první ``attributuons`` – buď jednoduchý text nebo seznam textů s informacemi o tom kdo a proč materiál napsal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
butions?
Samozřejmě si všímám dalších chyb až co jsem to pushnul... Ještě si to projdu... |
lessons/meta/local-run/index.md
Outdated
``` | ||
|
||
Druhým stavebním blokem je mapa (v Pythonu slovník), která se skládá z klíčů a hodnot, nezáleží v ní tedy na pořadí, protože se k informaci vždy člověk dostance pomocí klíče. | ||
Mapa se ve formátu YAML zapisuje následovně: | ||
Druhým stavebním blokem je slovník (zase podobně jako v Pythonu), která se skládá z klíčů a hodnot, nezáleží v ní tedy na pořadí, protože se k informaci vždy člověk dostance pomocí klíče. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slovník, který
$ cd naucse.python.cz | ||
``` | ||
|
||
A vytvoři si v něm virtuální prostředí – pokud nevíš jak na to, můžeš se podívat do návodu na instalaci Pythonu, na který je odkaz výše. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vytvoři → vytvoř
* Restarting with stat | ||
* Debugger is active! | ||
* Debugger PIN: 256-270-314 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funguje nastavování proměnné prostředí takhle i na Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nefunguje, přidal jsem nad to separátně nastavování proměné
V ukázce vidíš rovnou i příklad toho co to vypíše – zajímá tě jen ta adresa, to ve formátu `http://0.0.0.0:8003/`. | ||
Když si ji zkopíruješ a otevřeš ve webovém prohlížeči, uvidíš Nauč se. | ||
|
||
Druhý režim je nejdříve vykreslí všechny stránky a až poté ti je zobrazí – hodí se spíše na kontrolu toho, že se při vývoji nic nepokazilo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Druhý režim je" → "Druhý režim"
lessons/meta/local-run/index.md
Outdated
|
||
První věc, kterou musíš udělat, je vybrat si identifikátor kurzu, pod kterým bude kurz uložený. | ||
Tento identifikátor také bude ve všech adresách, které se budou týkat tohoto kurzu. | ||
Identifikátor se může skládat pouze z malých alfanumerických znaků a pomlček a musí být uníkátní, alespoň v daném roce. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tady by bylo fajn dát pár příkladů, ať lidi líp ví o co jde a co v těch runs
hledají.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Přidal jsem pod to poznámku
</div> | ||
|
||
Vytvoření chvilku trvá. | ||
To, že je fork vytvořen poznáš tak, že tě GitHub přesměruje na stránku, která bude skoro stejná, ale v hlavičce bude tvoje username a pod tím text `forked from pyvec/naucse.python.cz`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preferoval bych "username" → "uživatelské jméno" (tady i níže)
$ git checkout -b pridanikurzu origin/master | ||
``` | ||
|
||
Možná sis všiml{{a}}, že tvoje změny jsou najednou pryč, ale neboj, oni jsou uložené jak na tvém počítači tak na GitHubu, jen zrovna nejsou vidět. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oni → ony
naucse/models.py
Outdated
@@ -500,7 +504,8 @@ def __str__(self): | |||
description = DataProperty(info) | |||
long_description = DataProperty(info) | |||
|
|||
vars = DataProperty(info) | |||
# none of the variables are required, so empty ``vars:`` should not be required either | |||
vars = DataProperty(info, default=None, convert=lambda x: dict(x) if x else {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fungovalo by default=(), convert=dict
?
Blokuje tohle ještě něco? AFAIK jsem udělal všechny požadované změny. Jsem si vědom #397, nicméně to vypadá, že bude nějakou chvíli trvat než se to tam definuje, takže by se to mohlo přidat až to bude nadefinované? |
Projdu to ještě jednou. |
naucse/templates/_base.html
Outdated
|
||
<p> | ||
<a href="{{ url_for("course", course="course/meta") }}">Jak přidat kurz</a> | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Myslím že není potřeba mít odkaz na metakurz na každé stránce.
Můžeš to dát třeba jen na úvodní stránku?
Po tom co se správci PR schváli a sloučí tvoje změny do základního repozitáře, stačí počkat pár minut a tvůj kurz se objeví na [naucse.python.cz](https://naucse.python.cz/). | ||
|
||
## Upravování kurzu | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tady ještě chybí přepnutí větve v Gitu zpátky tam, kde je kurz co se má upravovat :)
No description provided.