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
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@

# -- Options for HTML output

html_theme = "sphinx_rtd_theme"
html_title = "SaagieAPI"
html_theme = "sphinx_book_theme"
html_theme_options = {"show_toc_level": 2, "toc_title": "On this page"}

# -- Options for EPUB output
epub_show_urls = "footnote"
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,12 @@ Your Saagie projects homepage has the following structure



Contents
--------
.. Contents
.. --------

.. toctree::
:titlesonly:
:hidden:

Platform/index
Projects/index
Expand Down
100 changes: 95 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ isort = "^5.12.0"
black = "^23.7.0"
pre-commit = "^3.3.3"
sphinx-rtd-theme = "^1.3.0"
sphinx-book-theme = "^1.0.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
1 change: 1 addition & 0 deletions saagieapi/gql_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
{
platform{
id
name
counts{
projects
jobs
Expand Down
6 changes: 3 additions & 3 deletions saagieapi/jobs/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ def count_deletable_instances_by_date(self, job_id: str, date_before: str):

Examples
--------
>>> saagie_api.jobs.count_instances_by_date(job_id=job_id, date_before="2023-06-01T00:00:00+01:00")
>>> saagie_api.jobs.count_deletable_instances_by_date(job_id=job_id, date_before="2023-06-01T00:00:00+01:00")
{
'countJobInstancesByDate': 3
}
Expand Down Expand Up @@ -1929,7 +1929,7 @@ def move_job(self, job_id: str, target_platform_id: int, target_project_id: str)
},
)

def generate_description_by_AI(self, job_id: str):
def generate_description_by_ai(self, job_id: str):
"""Generate a description for a job using AI.
Be careful, by calling this function the code contained in the job package will be sent to OpenAI
and thus will not be secured anymore by Saagie DataOps Platform.
Expand All @@ -1947,7 +1947,7 @@ def generate_description_by_AI(self, job_id: str):

Examples
--------
>>> saagie_api.jobs.generate_description_by_AI(job_id=job_id)
>>> saagie_api.jobs.generate_description_by_ai(job_id=job_id)
{
'editJobWithAiGeneratedDescription': {
'id': 'bfa25e4a-1796-4ebb-8c3d-138f74146973',
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/jobs_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def test_generate_description_by_ai(create_then_delete_job, create_global_projec
conf = create_global_project
job_id = create_then_delete_job

result = conf.saagie_api.jobs.generate_description_by_AI(job_id=job_id)
result = conf.saagie_api.jobs.generate_description_by_ai(job_id=job_id)

assert "editJobWithAiGeneratedDescription" in result
assert result["editJobWithAiGeneratedDescription"]["id"] == job_id
Expand Down