Thank you for your interest in contributing to the Adaptive Code Flow Optimizer (ACFO)! We welcome contributions from the community to make ACFO a powerful tool for Python developers. This guide outlines how to contribute, including reporting issues, submitting pull requests, and adhering to coding standards.
-
Report Issues:
- Use the Issues tab on GitHub.
- Describe the bug or feature request clearly, including:
- Steps to reproduce (for bugs).
- Expected vs. actual behavior.
- Python version and environment.
- Example:
Title: ACFO fails with nested function calls Description: When parsing code with nested calls, ACFO misses dependencies. Code: def a(): def b(): c(); b() Expected: {'a': ['b'], 'b': ['c']} Actual: {'a': []}
-
Submit Pull Requests (PRs):
- Fork the repository:
https://github.com/dev-queiroz/acfo. - Create a branch:
git checkout -b feature/xyzorfix/bug-123. - Make changes and commit:
git commit -m "Add xyz feature". - Push to your fork:
git push origin feature/xyz. - Open a PR against the
mainbranch, describing:- What the PR does.
- Related issue (e.g.,
Fixes #123). - Tests added or updated.
- Fork the repository:
-
Suggest Improvements:
- Open a discussion in the Issues tab for new features or major changes.
- Examples: Loop optimization, memory profiling, visualization.
- Style: Follow PEP 8 for code style.
- Use
blackfor formatting:black . - Check with
flake8:flake8 .
- Use
- Documentation:
- Add docstrings for all functions and classes (use NumPy or Google style).
- Update architecture.md for architectural changes.
- Tests:
- Add unit tests in
tests/usingunittest. - Ensure 100% coverage for new code:
python -m unittest discover tests
- Add unit tests in
- Commits:
- Write clear, concise commit messages:
Add loop parsing to parse_code. - Group related changes in a single commit.
- Write clear, concise commit messages:
- Clone the repository:
git clone https://github.com/your-username/acfo.git cd acfo - Set up a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Install development tools:
pip install black flake8
- Run tests:
python -m unittest discover tests
- Short-Term:
- Support for loop and conditional parsing (
ast.For,ast.While,ast.If). - Memory profiling with
psutil. - CFG visualization with
networkxandmatplotlib.
- Support for loop and conditional parsing (
- Long-Term:
- Integration with Flask/Django for web optimization.
- Real-time optimization using
sys.settrace. - Publication as a PyPI package.
- Be respectful and inclusive.
- Provide constructive feedback.
- Acknowledge contributions from others.
- GitHub Issues: github.com/dev-queiroz/acfo/issues
- Email: your.email@example.com
Join us in making ACFO a game-changer for Python optimization!