Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toml #2

Merged
merged 2 commits into from
Dec 31, 2023
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ your-project/
└── README.md
```

### Source Code in `src/` Directory πŸ“‚
### Source Code in `src/` or `your_package_name/` Directory πŸ“‚

The `src/` directory is the heart of your project, containing the Python code that constitutes your package. This structure encourages clean imports and testing practices.
The `src/` or `your_package_name/` directory is the heart of your project, containing the Python code that constitutes your package. This structure encourages clean imports and testing practices.

### Testing with the `tests/` Directory πŸ§ͺ

Expand All @@ -61,7 +61,7 @@ To kickstart a new Python project with this template:

1. **Create Your New Repository**: Use this template to generate a new repository for your project.
2. **Customize the Template**: Tailor the template files like `requirements.txt`, `.pre-commit-config.yaml`, and GitHub workflow YAMLs to suit your project's needs.
3. **Develop Your Package**: Begin adding your code into the `src/` directory and corresponding tests in the `tests/` directory.
3. **Develop Your Package**: Begin adding your code into the `src/` or `your_package_name/` directory and corresponding tests in the `tests/` directory.
4. **Document Your Project**: Update the README and, if necessary, add documentation to the `docs/` directory.
5. **Continuous Integration**: Leverage the pre-configured GitHub Actions for automated testing and other CI/CD processes.

Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build-backend = "setuptools.build_meta"
# Project settings -----------------------------------------------------------------------------------------------------
[project]
name = "template" # Required
version = "0.0.0" # Required
dynamic = ["version"]
description = "Ultralytics Template Python Package" # Optional
readme = "README.md" # Optional
requires-python = ">=3.8"
Expand Down Expand Up @@ -75,8 +75,12 @@ tests = ["pytest"]
# sample = "sample:main" # executes the function `main` from this package when "sample" is called.

# Tools settings -------------------------------------------------------------------------------------------------------
[tool.setuptools] # This is configuration specific to the `setuptools` build backend.
[tool.setuptools] # configuration specific to the `setuptools` build backend.
packages = { find = { where = ["."], include = ["template", "template.*"] } }
package-data = { "sample" = ["*.yaml"] }

[tool.setuptools.dynamic]
version = { attr = "template.__version__" }

[tool.ruff]
line-length = 120
2 changes: 1 addition & 1 deletion template/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<br>
<img src="https://raw.githubusercontent.com/ultralytics/assets/main/logo/Ultralytics_Logotype_Original.svg" width="320">

# Source Code Directory (`/template`)
# Source Code Directory (`src/` or `your_package_name/`)

The root directory of this project serves as the container for the Python source code.

Expand Down
2 changes: 1 addition & 1 deletion template/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ == "0.0.0"
__version__ = "0.0.0"