Contributing
Contributions are welcome. This page covers how to set up the project locally, run tests, and submit changes.
Development Setup
1. Clone the Repository
git clone https://github.com/danielsuit/mathfunctionize.git
cd mathfunctionize
2. Create a Virtual Environment
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
3. Install the Package
pip install .
Project Structure
mathfunctionize/
├── mathfunctionize/
│ ├── __init__.py # re-exports everything
│ ├── mathfunctionize.py # main module (all public functions)
│ ├── arithmetic.py # internal arithmetic helpers
│ └── algebra.py # internal algebra helpers
├── test_.py # tests
├── setup.py # package config
├── upcoming.md # planned features
└── README.md
The public API lives in mathfunctionize/mathfunctionize.py. Internal helpers in arithmetic.py and algebra.py are not meant to be imported directly.
Running Tests
# Run all tests
python -m pytest test_.py
# Run with verbose output
python -m pytest test_.py -v
Submitting Changes
- Fork the repository and create a feature branch from
main. - Make your changes. Write tests for new functionality.
- Ensure all tests pass.
- Write a clear commit message describing what you changed and why.
- Open a pull request against
main.
Adding a New Function
When adding a new math function:
- Add the function to
mathfunctionize/mathfunctionize.py. If it relies on lower-level helpers, put those inarithmetic.pyoralgebra.py. - Add tests in
test_.py. - Update the API Reference docs with signature, parameters, return type, and a code example.
- Add a practical example to the Examples page if the use case is non-trivial.
- Add an entry in the Changelog.
Planned Features
See upcoming.md on GitHub for a list of functions planned for future releases, including:
- Calculus — limits, derivatives, integrals, concavity
- Complex Analysis — conjugate, roots of unity
- Set Theory — power set, union, intersection, open sets
- Number Theory — primality testing
- Polynomials — factoring, division, zeros
- Topology — smooth functions
- Knot Theory, Type Theory, Homotopy Theory — future areas
Code of Conduct
Be respectful. Keep discussions focused on the technical merits of the work.