Git Product home page Git Product logo

m1-2022-git-workflow's Introduction

M1-2022-git

Introduction

This repository is a fork from the previous repository. The bugs in the converter have been fixed and now we want to publish our work as a publicly available python package.

Getting started

You should be working from your own repository that is a fork of M1-2022-git-workflow. In order to run this project, you will have to follow these steps.

  1. Clone this project
  2. move into the project folder
cd M1-2022-git-workflow
  1. Set up a virtual environment
  • Create the virtual environment
python -m venv myvenv
  • Activate venv
. venv/bin/activate
  1. Install pytest
pip install -U pytest
  1. Execute main script
python main.py

Instructions

Merge feature branch into dev

Now that the converter has no more bugs, we want to merge our branch feature into the dev branch. We will do a pull request (on your own repo). On GitHub, go to the "Pull requests tab" and click "New pull request". Select base and compare. Remember : we want to merge decimal-binary-converter into dev. Then, Create the pull request. Add some description of the work you have done and publish the Pull Request.

Note : We could have just merge decimal-binary-converter into dev from the command line. However, when working on a real project, you probably won't have the rights to do so. Remember : dev is a public branch. So all the work going down there should be carefully reviewed and tested.

Publish your work

We now have an awesome binary/decimal two ways converter ! It's time to publish it so the rest of the world can enjoy it ! We will publish it on PyPI (Python Package Index) which is a public repository of softwares for Python.

  1. First, you have to create an account on Pypi.org
  2. Then, in your repository, you will find a .github directory
  3. Inside this directory, you will find .yml files that defines workflows (using GitHub actions)
  4. Open the yml files and take time to understand them. Do not hesitate to ask the teacher about them

Hands on !

  1. We want to create a workflow that will, on publish, test our code and if tests succeed, then publish our package on PyPI
  2. In GitHub, click on the Actions tab, then click on new workflow
  3. Choose among the suggestions the template that best suits your use-case and click Configure
  4. You may find some useful informations in the Python documentation
  5. When creating a release on GitHub, do not forget to create a tag corresponding to that release

Pull request

  1. Once the workflow is setup and tested (you have published your package using it) you can open a pull request to the original repository

m1-2022-git-workflow's People

Contributors

rgt-yncrea avatar drago164 avatar

Forkers

nomadenss

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.