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

  1. Fork the repository and create a feature branch from main.
  2. Make your changes. Write tests for new functionality.
  3. Ensure all tests pass.
  4. Write a clear commit message describing what you changed and why.
  5. Open a pull request against main.

Adding a New Function

When adding a new math function:

  1. Add the function to mathfunctionize/mathfunctionize.py. If it relies on lower-level helpers, put those in arithmetic.py or algebra.py.
  2. Add tests in test_.py.
  3. Update the API Reference docs with signature, parameters, return type, and a code example.
  4. Add a practical example to the Examples page if the use case is non-trivial.
  5. 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.