This repository contains a collection of base Python scripts that are invoked by the CI/CD processes of other repositories, especially the template repository. These scripts are used for formatting, checking files, version control, and updating the year in file headers or documentation.
- Formatting Scripts: Format code files according to specified style guidelines.
- File Checking Scripts: Check files for compliance, correctness, and other criteria.
- Version Control Scripts: Manage version numbers in your project.
- Year Update Scripts: Update the year in file headers or documentation.
To use these scripts in your project, add this repository as a submodule.
-
Add the scripts repository as a submodule in your project:
git submodule add https://github.com/JuanVilla424/scripts.git
or, using branch
git submodule add -b <branch_name> https://github.com/JuanVilla424/scripts.git
-
Update the submodule when there are changes:
git submodule update --remote --merge
Contributions are welcome! To contribute to this repository, please follow these steps:
-
Fork the Repository
-
Create a Feature Branch
git checkout -b feature/your-feature-name
-
Commit Your Changes
git commit -m "feat(<scope>): your feature commit message - lower case"
-
Push to the Branch
git push origin feature/your-feature-name
-
Open a Pull Request into
dev
branch
Please ensure your contributions adhere to the Code of Conduct and Contribution Guidelines.
Mandatory: Setting Up a Python Virtual Environment
Setting up a Python virtual environment ensures that dependencies are managed effectively and do not interfere with other projects.
-
Create a Virtual Environment
python -m venv venv
-
Activate the Virtual Environment
On Unix or MacOS:
source venv/bin/activate
On Windows:
powershell.exe -ExecutionPolicy Bypass -File .\venv\Scripts\Activate.ps1
-
Upgrade pip
python -m ensurepip pip install --upgrade pip
-
Install Dependencies
pip install -r requirements.txt pip install poetry poetry lock poetry install
- Deactivate the Virtual Environment
When you're done, deactivate the environment:
deactivate
Install and check pre-commit hooks: MD files changes countermeasures, python format, python lint, yaml format, yaml lint, version control hook, changelog auto-generation
pre-commit install
pre-commit install -t pre-commit
pre-commit install -t pre-push
pre-commit autoupdate
pre-commit run --all-files
For any inquiries or support, please open an issue or contact [email protected].
2024 - This project is licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license. For more details, please refer to the LICENSE file included in this repository.