Support apsimNGpy development

Your support helps make continued development of apsimNGpy possible.

Whether you’re using this library for your research, in production systems, or as a learning tool, there are several ways you can contribute to sustaining and improving the project.

How You Can Support

Star the Repository
  • Show your appreciation by starring the project on GitHub.

  • It helps others discover the project and signals its value to the community.

🐛 Report Issues and Suggest Features
  • Found a bug or have a feature request? Open an issue on GitHub.

  • Feedback from users helps us improve usability and functionality.

🔧 Contribute Code or Documentation
  • We welcome pull requests that add features, fix bugs, or improve docs.

  • See the contributions guidelines below.

📣 Spread the Word
  • Share apsimNGpy with colleagues and collaborators.

  • Citing the project in your publications also helps increase visibility.

💬 Engage with the Community
  • Join the discussions on GitHub or open a topic for Q&A and support.

  • Community involvement makes open source projects thrive.

💰 Fund Development
  • If you or your organization use apsimNGpy extensively, consider sponsoring development.

  • For sponsorships or collaborative development opportunities, see contacts below.

Contact

For questions or collaborations, please contact:

Dr. Richard Magala Lead Developer, apsimNGpy 📧 [rmagala640@gmail.com]


Thank you for using and supporting apsimNGpy! This software is completely free to use but it is powered by coffee. Therefore, if you find apsimNGpy useful, consider buying me a coffee!

Buy Me a Coffee

How to Contribute to apsimNGpy

We welcome contributions from the community, whether they are bug fixes, enhancements, documentation updates, or new features. Here’s how you can contribute to apsimNGpy:

Reporting Issues

Note

apsimNGpy is developed and maintained by a dedicated team of volunteers. We kindly ask that you adhere to our community standards when engaging with the project. Please maintain a respectful tone when reporting issues or interacting with community members.

If you find a bug or have a suggestion for improving apsimNGpy, please first check the Issue Tracker to see if it has already been reported. If it hasn’t, feel free to submit a new issue. Please provide as much detail as possible, including steps to reproduce the issue, the expected outcome, and the actual outcome.

Contributing Code

We accept code contributions via Pull Requests (PRs). Here are the steps to contribute:

Start by forking the apsimNGpy repository on GitHub. This creates a copy of the repo under your GitHub account.

Clone your fork to your local machine:

git clone https://github.com/MAGALA-RICHARD/apsimNGpy.git
cd apsimNGpy
Create a New Branch

Create a new branch for your changes:

git checkout -b your-branch-name
Make Your Changes

Make the necessary changes or additions to the codebase. Please try to adhere to the coding style already in place.

Test Your Changes

Run any existing tests, and add new ones if necessary, to ensure your changes do not break existing functionality.

Commit Your Changes

Commit your changes with a clear commit message that explains what you’ve done:

git commit -m "A brief explanation of your changes"
Push to GitHub

Push your changes to your fork on GitHub:

git push origin your-branch-name

Submit a Pull Request Go to the apsimNGpy repository on GitHub, and you’ll see a prompt to submit a pull request based on your branch. Click on “Compare & pull request” and describe the changes you’ve made. Finally, submit the pull request.

Updating Documentation

Improvements or updates to documentation are greatly appreciated. You can submit changes to documentation with the same process used for code contributions.

Testing your pull request or your contribution

After making any code improvements, it is important to ensure that all modules are still working correctly. This calls for an explicit test of the added code changes.

apsimNGpy tests are implemented via Python’s unittest module. We provide a testing framework as shown below.

First, navigate to your apsimNGpy repository or the directory containing setup.py in your terminal, and run the following command:

pip install -e .  # Installs apsimNGpy as an editable package, enabling direct imports
                #and reflecting code changes without re-installation

Import the necessary modules as follows:

import unittest
from apsimNGpy.tests.tester_main import suite, loader, run_suite
from apsimNGpy.core.base_data import load_default_simulations

Set up the test and add any test case as shown below:

class TestCaseAddModule(unittest.TestCase):
    # Set up the model to use
    def setUp(self):
        self.model = load_default_simulations('Maize')
        self.out = 'test_edit_model.apsimx'

    # Add test case
    def test_add_crop_replacement(self):
        """+++test adding crop replacement++"""
        self.model.add_crop_replacements(_crop='Maize')
        self.model.create_experiment(permutation=True)

Finally, run the test suite. It is recommended to use the run_suite method, which executes all registered tests and ensures that dependent modules are functioning correctly. You may need to add your test case before running

if __name__ == '__main__':
    suite.addTests(loader.loadTestsFromTestCase(TestCaseAddModule))
    run_suite(2)

How to Cite apsimNGpy

If you use this software, please cite it as below:

Citation:

Magala, R. (2025). apsimNGpy: A Python package for running APSIM Next Generation in Python environment. Version 0.39.3, Released on 2025-06-13. URL: https://github.com/MAGALA-RICHARD/apsimNGpy.git

BibTeX format:

@misc{apsimNGpy,
  author       = {Richard Magala},
  title        = {apsimNGpy: A Python package for running APSIM Next Generation in Python environment},
  year         = {2025},
  version      = {0.39.3},
  howpublished = {\url{https://github.com/MAGALA-RICHARD/apsimNGpy.git}},
  note         = {If you use this software, please cite it.}
}