Skip to content

Davina0316/open-source-python

Repository files navigation

Open Source Python Project

Description

This repository serves as a Python project template for CS-GY 9223 Open Source Development, providing a structured foundation for designing and maintaining fully equipped Python projects. It includes configurations for continuous integration (CircleCI), static analysis (Ruff & Mypy), code formatting, and dependency management using uv.


Prerequisites

  • Python 3.11 or higher
  • uv for Python dependency management

Project Setup

1. Clone the Repository

git clone https://github.com/Davina0316/open-source-python.git

2. Navigate to the Project Directory

cd open-source-python

3. Install uv (if not already installed)

pip install uv

4. Create virtual environment using uv

uv venv --python 3.11

5. Activate virtual environment

.venv\Scripts\activate

6. Install Project Dependencies

uv pip install -r requirements.txt

Running the Application

To run the application, use:

uv run python src\calculator_component\main.py
uv run python src\logger_component\main.py
uv run python src\notifier_component\main.py

Testing

To run tests, execute:

pytest --cov=src

This will run unit tests and generate a coverage report.

Static Analysis & Code Formatting

To check and auto-fix code style and type errors, run:

ruff check src --fix
mypy src

Continuous Integration (CI/CD)

This project is set up with CircleCI, which automatically:

  • Runs tests (pytest)
  • Checks code quality (ruff, mypy)
  • Enforces code formatting and linting rules

Any new commits pushed to GitHub will trigger these checks.

Contributing

Contributions are welcome! We use GitHub for:

  • Issue tracking
  • Feature requests
  • Pull requests

Bug Reports & Feature Requests

Please use the provided issue templates when submitting:

  • Bug reports
  • Feature requests

Navigate to .github/ISSUE_TEMPLATE to find the appropriate templates.

Pull Requests

Follow these steps to submit a pull request:

  1. Use the Pull Request Template in .github/pull_request_template.md.
  2. Provide a clear summary of the changes.
  3. Explain the motivation behind the update.
  4. Ensure all tests pass before submission (pytest --cov=src).
  5. Follow the coding guidelines (ruff, mypy).

By contributing, you agree that your contributions will be licensed under the project’s license.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Additional Information

  • The .gitignore file is configured to ignore Python-specific files, such as __pycache__ and the venv directory.
  • For further details on project structure and development workflow, refer to the documentation in the docs directory.

About

Python project for CS-GY 9223 Open Source Development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages