Contributing¶
We welcome contributions to fusionlab-learn! Whether you’re fixing a
bug, adding a new feature, improving documentation, or suggesting
ideas, your help is valued. Thank you for your interest in making
fusionlab-learn better.
Getting Started¶
Issues Tracker: The best place to start is the GitHub Issues page. Look for existing issues labeled
bug,enhancement,documentation, orgood first issue.Ideas: If you have an idea for a new feature or improvement, feel free to open a new issue to discuss it first. This helps ensure it aligns with the project’s goals before significant work is done.
Questions: If you have questions about usage or contributing, you can also use the GitHub Issues page.
Setting up for Development¶
To make changes to the code or documentation, you’ll need to set up a development environment. Please follow the instructions in the Installation guide under the section Installation from Source (for Development). This typically involves:
Forking the repository on GitHub (
earthai-tech/fusionlab).Cloning your fork locally (e.g.,
git clone https://github.com/[YourUsername]/fusionlab.git).Installing the package in editable mode with development dependencies (
pip install -e .[dev]). Using a virtual environment (likevenvorconda) is highly recommended.
Making Changes¶
Create a Branch: Create a new branch from the
mainbranch (or the current primary development branch) for your changes. Use a descriptive name (e.g.,fix/lstm-state-bugorfeature/add-transformer-encoder).# Make sure your main branch is up-to-date with the upstream repo # (First time setup: git remote add upstream https://github.com/earthai-tech/fusionlab.git) git checkout main git pull upstream main # Create your new feature branch git checkout -b your-descriptive-branch-name
Code Style: Please follow PEP 8 guidelines and strive for code consistency with the existing codebase. Using a linter like Flake8 (included in dev dependencies) is encouraged.
Docstrings: Write clear and informative docstrings for any new functions or classes. This project generally follows the NumPy docstring standard. Ensure existing docstrings are updated if function signatures or behavior change.
Testing:
fusionlab-learnuses pytest for testing.Add new tests for any new features you implement in the relevant tests/ directory.
Add or update tests to cover any bug fixes, ensuring the bug is resolved and doesn’t reappear.
Ensure all tests pass before submitting your changes. Run tests from the project root directory:
pytest fusionlab/tests # Or simply 'pytest' if configured
Documentation: If your changes affect the user interface, add new features, or change behavior, please update the relevant documentation files (in docs/source/). Build the documentation locally to check formatting and ensure links work correctly:
# Navigate to the docs directory cd docs # Build the HTML documentation make clean html # Open _build/html/index.html in your browser
Commit Changes: Make clear, concise commit messages that explain the “what” and “why” of your changes.
Submitting a Pull Request¶
Push to Fork: Push your changes to your forked repository on GitHub:
git push origin your-descriptive-branch-name
Open Pull Request: Go to the original
fusionlab-learnrepository on GitHub (earthai-tech/fusionlab) and open a Pull Request (PR) from your branch to thefusionlab-learnmain branch (or the designated development branch).Describe PR: Write a clear description of the changes you made and why they are needed. Link to the relevant GitHub issue(s) using #issue-number notation (e.g., “Closes #123”).
Checks: Ensure any automated checks (Continuous Integration tests, linters) configured for the repository pass on your PR. Address any failures.
Review: Your PR will be reviewed by the maintainers. Be prepared to discuss your changes and make adjustments based on feedback. Respond to comments and push updates to your branch as needed (the PR will update automatically).
Code of Conduct¶
All participants in the fusionlab-learn project (contributors,
maintainers, users in community spaces like the issue tracker) are
expected to adhere to the project’s Code of Conduct.
Please review this document to understand the expected standards of behavior.
We strive to foster an open, welcoming, and respectful community.
Thank you again for contributing to fusionlab-learn!