Skip to content

Commit

Permalink
Toml (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Dec 31, 2023
1 parent 5b5863f commit 6d50dbc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
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"

0 comments on commit 6d50dbc

Please sign in to comment.