A small example package
Project description
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.
- Clone this project
- move into the project folder
cd M1-2022-git-workflow
- Set up a virtual environment
- Create the virtual environment
python -m venv myvenv
- Activate venv
. venv/bin/activate
- Install pytest
pip install -U pytest
- 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.
- First, you have to create an account on Pypi.org
- Then, in your repository, you will find a .github directory
- Inside this directory, you will find .yml files that defines workflows (using GitHub actions)
- Open the yml files and take time to understand them. Do not hesitate to ask the teacher about them
Hands on !
- We want to create a workflow that will, on publish, test our code and if tests succeed, then publish our package on PyPI
- In GitHub, click on the Actions tab, then click on new workflow
- Choose among the suggestions the template that best suits your use-case and click Configure
- You may find some useful informations in the Python documentation
- When creating a release on GitHub, do not forget to create a tag corresponding to that release
Pull request
- Once the workflow is setup and tested (you have published your package using it) you can open a pull request to the original repository
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for example_package_colleendesruisseaux-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3276c0cb6fbdd477df7024d661738855554bacd9892611445bcc10e5f26f5148 |
|
MD5 | 00b5c82d6997c8450e05040b77356b8d |
|
BLAKE2b-256 | 42905b615e500339408aa1776f5a60179e4f15f814723095aa64d22e534a7b4d |
Hashes for example_package_colleendesruisseaux-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ebcbba6b85c1eb4707e531e3c5d4689fa2865fe25851e920d495b33b0d6dfda |
|
MD5 | a4222395102a0fca292d0e72c5ff1148 |
|
BLAKE2b-256 | 878925fa1e84ccb86ec8b17232bd2dbf605cf97ce9061fd1182cc5c6ff38d6cd |