Cloneable referential to initialize a Python project based on this template with the best practice. This is a pre-configured and read-to-used project to create deployable python libraries or application much more easily.
My Python project is a simple application that allows users to create, read, update and delete the tasks. It is designed to be easy to use and expand.
To install the project, make sure you have Python 3.8 or later version
and pip
installed on your machine. And then run the following command lines.
git clone git@github.com:mokira3d48/PyOrigin.git my_project;
cd my_project;
sudo rm -r .git;
git init; # To create a new instance of git repository
And then,
sudo apt install cmake python3-venv
Install Cmake and Virtual env;python3 -m venv .venv
create a virtual env into directory namedenv
;source .venv/bin/activate
activate the virtual environment named.venv
;make install
install the requirements of this package;pip install -e .
install the package in dev mode in virtual environment;make test
run the unit test scripts located attests
directory;make run
run script located atsrc/package_name/__main__.py
.- Or Run
mycmd
as a command line to runsrc/package_name/__main__.py
.
git clone git@github.com:mokira3d48/PyOrigin.git my_project
cd my_project
And then, delete the hidden directory named .git
located at the root
of the directory project.
And then,
- Install python for windows;
- Open your command prompt;
- Run
python -m venv .venv
to create a virtual env into directory named.venv
; 4 . Run.venv\Scripts\activate
to activate the virtual environment; - Run
pip install -r requirements.txt
to install the requirements of this package or project; - Run
pip install -e .
install the package in dev mode in virtual environment; - Run
python -m package_name
to run main script located atsrc\package_name\__main__.py
. Or Runmycmd
as a command line to runsrc\package_name\__main__.py
and start the application.
Here is an example how to add a new task:
from package_name.utils import get_file_paths_list
def main():
"""Main function
"""
file_paths = get_file_paths_list('./')
file_paths = sorted(file_paths)
print("List of file paths:", file_paths)
if __name__ == '__main__':
main()
- Add tasks.
- Mark tasks as complete.
- Delete tasks.
- Show all the tasks.
To execute the unittest, make sure you have pytest
package installed,
and then run the following command line:
make test
or
pytest
Contributions are welcome! Please follow these steps:
- Create a new branch for your feature (
git checkout -b feature/my-feature
); - Commit your changes (
git commit -m 'Adding a new feature'
); - Push toward the branch (
git push origin feature/my-feature
); - Create a new Pull Request or Merge Request.
This project is licensed under the MIT License. See the file LICENSE for more details, contact me please.
For your question or suggestion, contact me please:
- Name : Your name (Doctor Mokira)
- Email : Your email address (dr.mokira@gmail.com)
- GitHub : Your GitHub or Gitlab profile