- Visit the NoLabs GitHub repository.
- Click the "Fork" button in the top-right corner of the page.
- This will create a copy of the repository in your GitHub account.
-
To add new models, create a folder within the microservices/ directory.
-
The folder should contain:
- A build directory with a Dockerfile inside it.
- A directory for the source code of the microservice.
- A
client/
directory, generated using a command like this (run microservice before):
npx @openapitools/openapi-generator-cli generate \ -i https://127.0.0.1:<microservice_port>/openapi.json \ -g python \ -o ./client \ --additional-properties=packageName=<microservice_name>
-
Ensure the microservice includes FastAPI's surface with a file called api.py, api models must go to api_models.py, and Uvicorn should start upon Docker run, similar to the example files: Dockerfile: https://github.com/BasedLabs/NoLabs/blob/master/microservices/esmfold/build/Dockerfile API file: https://github.com/BasedLabs/NoLabs/blob/master/microservices/esmfold/esmfold/api.py
-
Once everything is working, add the microservice to the docker-compose.yaml file in the main directory.
-
Create github workflow configs for your microservice build in .github/workflows (use .template files as templates)
-
If changes are made to the microservice, update the version of the image in the docker-compose file for the respective microservice:
esmfold: image: 'ghcr.io/basedlabs/esmfold:1.0.0' # Update to higher version
Pull requests (PRs) should be either bug fixes, meaningful refactoring, or new features. Reach out to jaktenstid or timurishmuratov7 for significant new features or refactoring. Update the image version of NoLabs in the docker-compose file:
nolabs:
image: 'ghcr.io/basedlabs/nolabs:1.2.1' # Update to higher version
- Commit your changes using
git commit -m "fix: Fixed something"
- Push your changes to your forked repository with
git push origin <branch_name>
- Visit your forked repository on GitHub.
- Click on the "Pull Request" button.
- Provide a clear title and description for your pull request, explaining the changes you've made.
- Submit the pull request.
- Use Conventional Commits.
- Branch Naming: Name your branches as "feature/<feature_name>", "fix/<fix_name>", or "refactor/<refactor_name>".
- Python Formatting: Follow PEP8 formatting guidelines for Python code.
- Recommended Tools: We strongly recommend using PyCharm (with pydantic and mypy plugins installed) and Webflow when developing NoLabs.
Feel free to discuss your changes with the community in the pull request comments. Be open to feedback and iterate on your changes based on suggestions. Once your pull request is approved, it will be merged into the main repository.