Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ body:
label: Are you willing to submit a PR?
description: >
(Optional) We encourage you to submit a [Pull Request](https://github.com/ultralytics/PROJECT_NAME/pulls) (PR) to help improve Ultralytics software for everyone, especially if you have a good understanding of how to implement a fix or feature.
See the Ultralytics [Contributing Guide](https://docs.ultralytics.com/help/contributing/) to get started.
See the Ultralytics [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started.
options:
- label: Yes I'd like to help by submitting a PR!
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ body:
label: Are you willing to submit a PR?
description: >
(Optional) We encourage you to submit a [Pull Request](https://github.com/ultralytics/PROJECT_NAME/pulls) (PR) to help improve Ultralytics software for everyone, especially if you have a good understanding of how to implement a fix or feature.
See the Ultralytics [Contributing Guide](https://docs.ultralytics.com/help/contributing/) to get started.
See the Ultralytics [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started.
options:
- label: Yes I'd like to help by submitting a PR!
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Welcome to the Ultralytics Python Project Template! This repository provides a s
This template is meticulously organized for intuitive navigation and a clear understanding of project components. Familiarize yourself with the [Python project structure best practices](https://realpython.com/python-application-layouts/) to make the most of this layout.

- `src/` or `your_package_name/`: Contains the core source code of your Python package, organized into modules. Using a `src` layout is a common practice detailed in [Python packaging guides](https://packaging.python.org/en/latest/tutorials/packaging-projects/#configuring-metadata).
- `tests/`: Dedicated directory for unit tests and integration tests, crucial for implementing [continuous testing](https://docs.ultralytics.com/help/CI/) practices. Consider using frameworks like [pytest](https://docs.pytest.org/en/stable/) for writing tests.
- `tests/`: Dedicated directory for unit tests and integration tests, crucial for implementing [continuous testing](https://docs.ultralytics.com/help/CI) practices. Consider using frameworks like [pytest](https://docs.pytest.org/en/stable/) for writing tests.
- `docs/`: (Optional) Houses project documentation. Tools like [MkDocs](https://www.mkdocs.org/) can be used to generate comprehensive documentation from this directory.
- `pyproject.toml`: The standard configuration file for Python projects, detailing dependencies, build system requirements, formatting rules, and packaging information as specified by [PEP 518](https://peps.python.org/pep-0518/) and subsequent PEPs.
- `.gitignore`: Configured to exclude unnecessary files (like `*.pyc` or virtual environment directories) from [Git](https://git-scm.com/) tracking.
Expand Down Expand Up @@ -96,7 +96,7 @@ Ultralytics thrives on community collaboration, and we deeply value your contrib

- **Reporting Issues**: Encounter a bug? Please report it on [GitHub Issues](https://github.com/ultralytics/template/issues).
- **Feature Requests**: Have an idea for improvement? Share it via [GitHub Issues](https://github.com/ultralytics/template/issues).
- **Pull Requests**: Want to contribute code? Please read our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) first, then submit a Pull Request.
- **Pull Requests**: Want to contribute code? Please read our [Contributing Guide](https://docs.ultralytics.com/help/contributing) first, then submit a Pull Request.
- **Feedback**: Share your thoughts and experiences by participating in our official [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey).

A heartfelt thank you πŸ™ goes out to all our contributors! Your efforts help make Ultralytics tools better for everyone.
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ The documentation should be continuously updated alongside the project's develop

## πŸ™Œ Contributing

Contributions to improve the documentation are welcome! Whether it's fixing typos, clarifying explanations, adding examples, or translating content, your help is valuable. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for more details on how to get started. You can also find helpful [tips for contributing to Ultralytics open-source projects](https://www.ultralytics.com/blog/tips-to-start-contributing-to-ultralytics-open-source-projects) on our blog or ask questions on the [Ultralytics Community Forums](https://community.ultralytics.com/).
Contributions to improve the documentation are welcome! Whether it's fixing typos, clarifying explanations, adding examples, or translating content, your help is valuable. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for more details on how to get started. You can also find helpful [tips for contributing to Ultralytics open-source projects](https://www.ultralytics.com/blog/tips-to-start-contributing-to-ultralytics-open-source-projects) on our blog or ask questions on the [Ultralytics Community Forums](https://community.ultralytics.com/).
6 changes: 3 additions & 3 deletions template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Our project follows a clean and organized structure to promote maintainability a

- **Root Organization**: Python [modules and sub-packages](https://docs.python.org/3/tutorial/modules.html) are organized directly within this root source directory.
- **Dedicated Folders**: Each significant feature or component typically resides in its own dedicated folder (sub-package) or file (module).
- **Configuration**: The [`pyproject.toml`](https://packaging.python.org/en/latest/specifications/pyproject-toml/) file, located at the project's root (outside this source directory), defines packaging, dependencies, and project metadata according to [PEP 621](https://peps.python.org/pep-0621/). You can find details on Ultralytics configuration options in our [docs](https://docs.ultralytics.com/usage/cfg/).
- **Configuration**: The [`pyproject.toml`](https://packaging.python.org/en/latest/specifications/pyproject-toml/) file, located at the project's root (outside this source directory), defines packaging, dependencies, and project metadata according to [PEP 621](https://peps.python.org/pep-0621/). You can find details on Ultralytics configuration options in our [docs](https://docs.ultralytics.com/usage/cfg).

## πŸ“ Guidelines

To ensure code quality, consistency, and collaboration, please adhere to the following guidelines:

- **Documentation**: Write clear, concise docstrings and comments. Consider using tools like [Sphinx](https://www.sphinx-doc.org/en/master/) or [MkDocs](https://www.mkdocs.org/) for generating comprehensive documentation, similar to the main [Ultralytics Docs](https://docs.ultralytics.com/).
- **Coding Standards**: Follow established Python best practices, primarily [PEP 8](https://peps.python.org/pep-0008/), and align with Ultralytics' internal coding conventions and [Code of Conduct](https://docs.ultralytics.com/help/code-of-conduct/).
- **Coding Standards**: Follow established Python best practices, primarily [PEP 8](https://peps.python.org/pep-0008/), and align with Ultralytics' internal coding conventions and [Code of Conduct](https://docs.ultralytics.com/help/code-of-conduct).
- **Modularity**: Design components to be modular and reusable. Introduce new modules or packages logically as the project evolves.
- **Testing**: Implement thorough unit and integration tests using frameworks like [`pytest`](https://docs.pytest.org/en/stable/). Rigorous testing is crucial for verifying functionality, performance, and preventing regressions. Explore [continuous integration (CI)](https://www.ultralytics.com/glossary/continuous-integration-ci) practices.
- **Dependencies**: Manage dependencies explicitly via `pyproject.toml`. Avoid unnecessary dependencies.

We encourage contributions! If you have suggestions or improvements, please refer to our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) and feel free to open an issue or pull request on the [Ultralytics GitHub](https://github.com/ultralytics).
We encourage contributions! If you have suggestions or improvements, please refer to our [Contributing Guide](https://docs.ultralytics.com/help/contributing) and feel free to open an issue or pull request on the [Ultralytics GitHub](https://github.com/ultralytics).
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ If you prefer to avoid installing external dependencies, you can use Python's st

## ✨ Contributing

We love contributions! If you find an issue or have an idea for improving the tests, please feel free to create an issue or submit a pull request. See our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for more details on how to get started.
We love contributions! If you find an issue or have an idea for improving the tests, please feel free to create an issue or submit a pull request. See our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for more details on how to get started.
5 changes: 4 additions & 1 deletion tests/test_with_unittest.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

import unittest

from template.module1 import add_numbers, main


class TestModule1(unittest.TestCase):
"""Test cases for module1 functions."""

def test_add_numbers(self) -> None:
"""Tests add_numbers function with positive and negative integers."""
self.assertEqual(add_numbers(2, 3), 5)
Expand All @@ -16,5 +18,6 @@ def test_main(self) -> None:
"""Tests main function executes without errors."""
main()


if __name__ == "__main__":
unittest.main()
Loading