Coder Social home page Coder Social logo

raguggg / makefile Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4 KB

This repository demonstrates the use of a Makefile to automate tasks in a Python project, including setting up a virtual environment, installing dependencies, running tests, and cleaning up.

Makefile 57.59% Python 42.41%

makefile's Introduction

Python Project

This is a simple Python project with a Makefile to automate common tasks such as setting up a virtual environment, installing dependencies, running tests, and cleaning up.

Project Structure

python_project/
├── Makefile
├── README.md
├── requirements.txt
├── main.py
└── tests/
└── test_main.py

Getting Started

Prerequisites

  • Python 3.6 or higher
  • make tool

Setting Up the Project

  1. Clone the repository:

    git clone https://github.com/Raguggg/Makefile.git
    cd Makefile
  2. Run the default Makefile target to set up the environment and run tests:

    make

This command will:

  • Create a virtual environment in the venv directory
  • Install dependencies from requirements.txt
  • Run the unit tests in the tests directory

Available Makefile Targets

  • all: Default target that sets up the environment and runs tests.

    make
  • venv: Creates a virtual environment.

    make venv
  • install: Installs dependencies from requirements.txt.

    make install
  • test: Runs unit tests using unittest.

    make test
  • clean: Removes the virtual environment directory.

    make clean

Cleaning Up

To clean up the project, removing the virtual environment directory, run:

make clean

Project Details

main.py

A simple Python script that contains a function hello_world() which returns "Hello, world!".

tests/test_main.py

A unit test for main.py that tests the hello_world() function.

Contributing

Feel free to submit issues and pull requests. For major changes, please open an issue first to discuss what you would like to change

makefile's People

Contributors

raguggg avatar

Watchers

 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.