Skip to content

Help MongoDB-ODM - Get Help

Contributing

MongoDB-ODM is an open-source package that provides a powerful and flexible way to work with MongoDB databases in a Python environment. If you're a developer looking for an exciting project to contribute to, you are welcome to contribute here.

If you need to deep dive into the code, here are some guidelines.

Python

MongoDB-ODM supports Python 3.9 and above. Make sure at least Python 3.9 is installed on your device.

UV

MongoDB-ODM uses UV to build, package, and publish the project.

Install UV on your device by following the Official Documentation.

After installing UV, please visit their Official Documentation to learn more about it.

Repository

First, make sure you have the repository, and navigate to the directory.

Change the code or documentation you want to modify.

After making changes, follow the next steps.

Format

There is a script you can run that will format and clean all your code:

./scripts/format.sh

Docs

To start the docs locally, you can run this script:

./scripts/docs.sh

Testing

For testing the package, first we need to install and activate MongoDB.

Install MongoDB by following the installation documentation and start the MongoDB server.

Set the MONGO_URL environment variable:

export MONGO_URL=<your-connection-url>

After installing MongoDB and setting the environment variable, run this script:

./scripts/test.sh

Testing with Docker

If you have Docker installed on your device, run this command to test the package:

./scripts/test-with-docker.sh

Create a Pull Request

You can contribute to the source code with Pull Requests.

  • To fix a typo you found in the documentation.
  • To propose new documentation sections.
  • To fix an existing issue/bug.
  • Make sure to add tests.
  • To add a new feature.
  • Make sure to add tests.
  • Make sure to add documentation if it's relevant.

Steps to Follow Before Creating a PR

If you change the codebase, make sure to follow these steps before creating a PR.

  • ./scripts/test.sh Run the unit tests and make sure all tests pass and test coverage is more than 95%.
  • ./scripts/lint.sh Check that all formatting is implemented and code format is accurate.
  • ./scripts/format.sh Run auto-formatting like import sorting, etc.

Stay Connected

Announcements

You can follow announcements in the GitHub repository, for example:

  • New Release
  • Breaking Changes

Ideas

If you have a new idea, please create it in the GitHub repository, for example:

  • An idea about a new feature

Ask Questions

You can create a new question in the GitHub repository, for example:

  • Ask a question or ask about a problem

Issues

Found a new bug/issue or want to help others? Please visit GitHub Issues.

Connect with the Author

You can connect with me on several platforms.