-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
26 changed files
with
533 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"name": "kitops", | ||
"version": "1.0.1" | ||
"version": "1.0.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
This part of the project documentation focuses on an | ||
**understanding-oriented** approach. You'll get a | ||
chance to read about the background of the project, | ||
as well as reasoning about how it was implemented. | ||
|
||
> **Note:** Expand this section by considering the | ||
> following points: | ||
- Give context and background on your library | ||
- Explain why you created it | ||
- Provide multiple examples and approaches of how | ||
to work with it | ||
- Help the reader make connections | ||
- Avoid writing instructions or technical descriptions | ||
here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
This part of the project documentation focuses on a | ||
**problem-oriented** approach. You'll tackle common | ||
tasks that you might have, with the help of the code | ||
provided in this project. | ||
|
||
## How To Create A Kitfile Object? | ||
|
||
Whether you're working with an existing ModelKit's Kitfile, | ||
or starting from nothing, the `kitops` package can help you | ||
get this done. | ||
|
||
Install the `kitops` package from PYPI into your project's environment | ||
with the following command | ||
``` | ||
pip install kitops | ||
``` | ||
|
||
Inside of your code you can now import the `Kitfile` | ||
class from the `kitops.modelkit.kitfile` module: | ||
|
||
# your code | ||
from kitops.modelkit.kitfile import Kitfile | ||
|
||
After you've imported the class, you can use it | ||
to create a Kitfile object from an existing ModelKit's Kitfile: | ||
|
||
# your code | ||
from kitops.modelkit.kitfile import Kitfile | ||
|
||
my_kitfile = Kitfile(path='/path/to/Kitfile') | ||
print(my_kitfile.to_yaml()) | ||
|
||
# The output should match the contents of the Kitfile | ||
# located at: /path/to/Kitfile | ||
|
||
You can also create an empty Kitfile from scratch: | ||
|
||
# your code | ||
from kitops.modelkit.kitfile import Kitfile | ||
|
||
my_kitfile = Kitfile() | ||
print(my_kitfile.to_yaml()) | ||
|
||
# OUTPUT: {} | ||
|
||
Regardless of how you created the Kitfile, you can update its contents | ||
like you would do with any other python dictionary: | ||
|
||
# your code | ||
my_kitfile.manifestVersion = "3.0" | ||
my_kitfile.package = { | ||
"name": "Another-Package", | ||
"version": "3.0.0", | ||
"description": "Another description", | ||
"authors": ["Someone"] | ||
} | ||
print(my_kitfile.to_yaml()) | ||
|
||
# OUTPUT: | ||
# manifestVersion: '3.0' | ||
# package: | ||
# name: Another-Package | ||
# version: 3.0.0 | ||
# description: Another description | ||
# authors: | ||
# - Someone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
This site contains the project documentation for the | ||
`KitOps Manager` project. Its aim is to provide a python library for | ||
easily working with [KitOps' ModelKits](https://kitops.ml). | ||
|
||
## Table Of Contents | ||
|
||
The documentation follows the best practice for | ||
project documentation as described by Daniele Procida | ||
in the [Diátaxis documentation framework](https://diataxis.fr/) | ||
and consists of four separate parts: | ||
|
||
1. [Tutorials](tutorials.md) | ||
2. [How-To Guides](how-to-guides.md) | ||
3. [Reference](reference.md) | ||
4. [Explanation](explanation.md) | ||
|
||
Quickly find what you're looking for depending on | ||
your use case by looking at the different pages. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This part of the project documentation focuses on | ||
an **information-oriented** approach. Use it as a | ||
reference for the technical implementation of the | ||
`kitops` project code. | ||
|
||
::: src.kitops.modelkit.kitfile.Kitfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This part of the project documentation focuses on a | ||
**learning-oriented** approach. You'll learn how to | ||
get started with the code in this project. | ||
|
||
> **Note:** Expand this section by considering the | ||
> following points: | ||
- Help newcomers with getting started | ||
- Teach readers about your library by making them | ||
write code | ||
- Inspire confidence through examples that work for | ||
everyone, repeatably | ||
- Give readers an immediate sense of achievement | ||
- Show concrete examples, no abstractions | ||
- Provide the minimum necessary explanation | ||
- Avoid any distractions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
site_name: KitOps Manager Documentation | ||
|
||
theme: | ||
name: "material" | ||
|
||
plugins: | ||
- mkdocstrings | ||
|
||
nav: | ||
- KitOps Manager Docs: index.md | ||
- tutorials.md | ||
- How-To Guides: how-to-guides.md | ||
- reference.md | ||
- explanation.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
tox | ||
tox-conda | ||
mkdocs | ||
"mkdocstrings[python]" | ||
mkdocs-material |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
''' | ||
Copyright 2024 The KitOps Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
SPDX-License-Identifier: Apache-2.0 | ||
''' | ||
|
||
from .kitfile import Kitfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.