Skip to content

Commit

Permalink
dynamic GH version
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinxten committed Feb 2, 2024
1 parent 27ca08d commit 0024312
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 5 deletions.
9 changes: 8 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
sys.path.insert(0, root_path)

from icometrix_sdk._version import __version__

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "icometrix-sdk"
copyright = f"{date.today().year}, icometrix"
author = "icometrix"
release = "0.0.1"
release = __version__

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand All @@ -27,6 +29,11 @@
"sphinx.ext.autodoc"
]

# sphinx.ext.autodoc options
autodoc_default_options = {
'exclude-members': 'model_config, model_fields' # exclude pydantic internal fields
}

templates_path = ["_templates"]
exclude_patterns = []

Expand Down
27 changes: 24 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
icometrix-sdk
=============
icometrix-sdk documentation
===========================

A library that provides a Python interface for the Icometrix API.

Quickstart
----------

.. toctree::
:hidden:
:maxdepth: 2

quickstart


API reference
-------------

.. toctree::
:maxdepth: 2

resources/index


Models
------

.. toctree::
:maxdepth: 2

models/index
6 changes: 6 additions & 0 deletions docs/models/base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Patient
=======

.. automodule:: icometrix_sdk.models.base
:members:
:undoc-members:
6 changes: 6 additions & 0 deletions docs/models/customer_report.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Customer Report
===============

.. automodule:: icometrix_sdk.models.customer_report_entity
:members:
:undoc-members:
11 changes: 11 additions & 0 deletions docs/models/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Models
======

.. toctree::

customer_report
patient
project
upload
user
base
6 changes: 6 additions & 0 deletions docs/models/patient.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Patient
=======

.. automodule:: icometrix_sdk.models.patient_entity
:members:
:undoc-members:
6 changes: 6 additions & 0 deletions docs/models/project.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Project
=======

.. automodule:: icometrix_sdk.models.project_entity
:members:
:undoc-members:
6 changes: 6 additions & 0 deletions docs/models/upload.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Upload
======

.. automodule:: icometrix_sdk.models.upload_entity
:members:
:undoc-members:
6 changes: 6 additions & 0 deletions docs/models/user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
User
====

.. automodule:: icometrix_sdk.models.user_entity
:members:
:undoc-members:
1 change: 1 addition & 0 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ icometrix_sdk can be installed with `pip <https://pip.pypa.io>`_
$ python -m pip install icometrix_sdk
Authentication
---------------

Expand Down
11 changes: 11 additions & 0 deletions gh-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# from refs/tags/v1.2.3 get 1.2.3
VERSION=$(echo $GITHUB_REF | sed 's#.*/v##')
PLACEHOLDER='__version__ = "develop"'
VERSION_FILE='icometrix_sdk/_version.py'

# ensure the placeholder is there. If grep doesn't find the placeholder
# it exits with exit code 1 and github actions aborts the build.
grep "$PLACEHOLDER" "$VERSION_FILE"
sed -i "s/$PLACEHOLDER/__version__ = \"${VERSION}\"/g" "$VERSION_FILE"
2 changes: 1 addition & 1 deletion icometrix_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.2"
__version__ = "develop"

0 comments on commit 0024312

Please sign in to comment.