Giter Club home page Giter Club logo

my-hypermodern-python's Introduction

๐Ÿ†™ Hypermodern Python

Improving the way I live Python...

This repository follows the tutorial from Claudio Jolowicz.

โ” What it is...

Get some random facts from the Wikipedia API and print them to the CLI.

To configure and run it, run these commands into the shell (assuming you have installed at least Python 3.7 and Poetry):

# checkout the repository (the example is via SSH)
git clone [email protected]:Robin-Castellani/my-hypermodern-python.git
cd my-hypermodern-python

# install dependencies in a separated virtual environment
poetry install

# run it
poetry run my-hypermodern-python

๐Ÿ›  Test suite

A small test suite has been implemented with Pytest. You can run them (along with the Coverage) with the command

poetry run pytest --cov

Also, it is possible to run tests in multiple Python environment (now 3.7 and 3.8) using Nox with

nox

Nox runs many sessions (by default lint, safety, mypy, pytype, test and typeguard); here are the available sessions:

  • lint to lint the code, check whether annotations are present, check for security issues, check for wrong import order, check whether docstrings are present, check the correctness of docstring, and check whether black would change the code;
  • safety to check whether third-part packages have security issues;
  • mypy and pytype to statically check types;
  • test to run the test suite with the coverage;
  • typeguard to check types at runtime with pytest;
  • black to restyle the code;
  • docs to build documentation from docstrings using Sphinx;
  • xdoctest to test the examples in the documentation.

To run a single session, use

nox -s <session-name>

To speed up the following Nox sessions, reuse the existing virtual envs:

nox -rs <session-name>

These two custom options are available for nox, to be added after --:

  • --cov to get the code coverage of the test suite;
  • -m e2e or -m "not e2e" to perform the test only on or to avoid the end to end tests.

my-hypermodern-python's People

Contributors

robin-castellani avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.