Giter Site home page Giter Site logo

robotics1's Introduction

COMP0037-CW1

Development Guide

First time setup

Basic Python Environment Setup

Install anaconda 4.9.2, the latest version of Anaconda.

Then, we use conda to create a distinct development environment to ensure compatible Python and third-party dependencies versions. We use conda-forge to get more recent versions of point releases of Python 3.8.* series and third party dependencies not included in the base conda registry.

# Create a new environment
conda create -n comp0037 -c conda-forge python=3.8.6 
# Activate the new environment
conda activate comp0037
# Functionality dependencies
conda install numpy

Note that conda typically uses base as the default Python environment when a new shell instance is launched. To activate the previously created project environment, use

conda activate comp0037

To deactivate the project environment, use

conda deactivate

Linters and Formatters

In the comp0037 project environment, we now add some development conveniences to help reduce formatting and logical issues. We use autopep8 to format our code, then use flake8 to check for conformance with PEP8 formatting standard and identify other code quality issues.

# Install pre-commit hook to check for stylistic and logical issues
conda install -c conda-forge pre-commit
# Install rope for refactoring
conda install -c conda-forge rope
# Install autopep8 and flake8
conda install -c conda-forge autopep8 flake8

Add .pre-commit-config.yaml with relevant git hooks (autopep8 and flake8) to configure the pre-commit hooks. Now, run

pre-commit install

to install the git pre-commit hooks to local .git.

robotics1's People

Contributors

zhiqingwei avatar

Watchers

James Cloos 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.