OpenMCL / ziyou-python-write-ups

Student write-ups for Ziyou Python courses

Home Page:http://140.115.26.67:12080/view/647ec65b-2194-4bb3-8524-bf3a628c583a

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

簡明 Python 學習講義:習題解答集

Code style: black

國立**大學吳維漢教授一著「簡明 Python 學習講義」的習題解答集、暨 MCL 工讀生合著紀念集。

Build Documents

Make sure you already have a XeLaTeX complier (to write documents), and a proper Python interpreter (to write codes).

Then, clone the project first (with submodules):

git clone --recurse-submodules https://github.com/OpenMCL/ziyou-python-write-ups

Enter the project, and run the following command to build the document:

xelatex docs/main.tex
xelatex docs/main.tex

or simply run make docs if you have make.

This would output a pdf file called main.pdf at the project root folder.

Setup Coding Environments

We suggest using Python 3.8 or higher versions.

Install Dependencies

With Poetry (Recommended)

To install all requirements, run the following command:

poetry install --with dev

With Pip

If you do not have poetry, you can also install all requirements with the following command:

pip install numpy matplotlib black flake8 flake8-black flake8-bugbear

Offline Code Linting

After the above installation, you can run flake8 to check code format:

flake8 src

or simply run make lint if you have make.

Contribution

We would love to accept your patches to this project. There are some guidelines you need to follow:

Coding Style

  • Please follow PEP8. We recommend you check your patch with Flake8.
  • In addition, please format your code with Black.

We recommend you use VS Code to write code with ease. You can put the following settings to ${workspaceFolder}/.vscode/settings.json:

{
  "[python]": {
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.organizeImports": true
    }
  },
  "python.formatting.provider": "black",
  "python.linting.enabled": true,
  "python.linting.flake8Enabled": true
}

Peer Review

All submissions require review. We use GitHub (or GitLab) pull requests and review systems to meet these requirements. See help here for more information on using GitHub pull requests.

License

About

Student write-ups for Ziyou Python courses

http://140.115.26.67:12080/view/647ec65b-2194-4bb3-8524-bf3a628c583a

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 59.9%Language:TeX 40.0%Language:Makefile 0.1%