Skip to content

Commit

Permalink
Update Ultralytics YouTube URL
Browse files Browse the repository at this point in the history
  • Loading branch information
UltralyticsAssistant committed Oct 29, 2024
1 parent 036d641 commit 69b12c8
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 5 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Ultralytics Template 🚀, AGPL-3.0 license
# Continuous Integration (CI) GitHub Actions tests

name: Template CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run Python tests
run: |
python -m pytest tests/test_module1.py -v
- name: Run CLI tests
run: |
example-cli-command
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,17 @@ classifiers = [# Optional, for a list of valid classifiers, see https://pypi.org
]

# Required dependencies ------------------------------------------------------------------------------------------------
dependencies = [# Optional
dependencies = [
"ultralytics",
"numpy",
]

# Optional dependencies ------------------------------------------------------------------------------------------------
[project.optional-dependencies] # Optional
tests = ["pytest"]
[project.optional-dependencies]
dev = [
"pytest",
"mkdocs",
]

[project.urls] # Optional
"Homepage" = "https://ultralytics.com"
Expand All @@ -74,7 +77,7 @@ tests = ["pytest"]
"Changelog" = "https://github.com/ultralytics/template/releases"

[project.scripts] # Optional
sample = "sample:main" # executes the function `main` from this package when "template sample" is run from CLI
example-cli-command = "template.module1:main" # executes `template.module1.main` when "example-cli-command" is run from CLI

# Tools settings -------------------------------------------------------------------------------------------------------
[tool.setuptools] # configuration specific to the `setuptools` build backend.
Expand Down
12 changes: 11 additions & 1 deletion template/module1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@


def add_numbers(a, b):

return a + b


def main():
a = 1
b = 2
y = add_numbers(a, b)
print(f"Added {a} + {b} = {y}")


if __name__ == "__main__":
main()

0 comments on commit 69b12c8

Please sign in to comment.