Skip to content

Commit

Permalink
Merge pull request #10 from schandrika/docs
Browse files Browse the repository at this point in the history
Documentation and workflow update. Python version update
  • Loading branch information
craig8 authored May 11, 2023
2 parents 9729b15 + 9d0623b commit a485656
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 248 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/dispatch-to-pypi.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/downstream-test-response.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Make full release

on:
workflow_dispatch:
inputs:
publish-to-test-pypi:
description: 'Publish to test pypi instead of pypi'
required: false
default: false
type: boolean
bump-rule:
description: 'Rule for computing next release version'
required: false
default: 'prerelease'
type: choice
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
- prerelease
release-version:
description: 'Version number to use(instead of computing). Should be of the format x.y.z[rcn]. Do not use hyphens.'
required: false
default: ''
type: string
merge-strategy:
description: 'Merge strategy and strategy options. Used only in case of merge conflicts'
required: false
default: ''
type: string

defaults:
run:
shell: bash

env:
LANG: en_US.utf-8
LC_ALL: en_US.utf-8
PYTHON_VERSION: '3.10'

jobs:
call-deploy-release:
permissions:
contents: write # To push a branch
pull-requests: write # To create a PR from that branch

uses: eclipse-volttron/github-tooling/.github/workflows/deploy-release.yml@main
with:
merge-strategy: ${{ inputs.merge-strategy }}
release-version: ${{ inputs.release-version }}
bump-rule: ${{ inputs.bump-rule }}
run-tests-wait: 600
publish-to-test-pypi: false
secrets:
git-token: ${{ secrets.AUTO_PROJECT_PAT }}
pypi-token: ${{ secrets.PYPI_TOKEN }}
40 changes: 0 additions & 40 deletions .github/workflows/publish-to-pypi.yml

This file was deleted.

88 changes: 0 additions & 88 deletions .github/workflows/run-downstream-tests.yml

This file was deleted.

35 changes: 15 additions & 20 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
- reopened
paths:
- '**.py'
- '**.yaml'
- '**.yml'
- '**.toml'

defaults:
run:
Expand All @@ -23,15 +26,15 @@ env:
LANG: en_US.utf-8
LC_ALL: en_US.utf-8
PYTHON_VERSION: '3.10'
PROJECT_NAME: volttron-lib-base-historian
PROJECT_NAME: volttron-sqlite-historian

jobs:

run-tests:
strategy:
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04"]
python: ["3.8", "3.9", "3.10"]
os: [ "ubuntu-22.04" ]
python: [ "3.10", "3.11" ]

runs-on: ${{ matrix.os }}

Expand All @@ -58,32 +61,24 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

# #----------------------------------------------
# # load cached venv if cache exists
# #----------------------------------------------
# - name: Load cached venv
# id: cached-poetry-dependencies
# uses: actions/[email protected]
# with:
# path: .venv
# key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
# #----------------------------------------------
# # install dependencies if cache does not exist
# #----------------------------------------------
# - name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
# run: poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, and run tests.
#----------------------------------------------
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v2
with:
files: tests

#----------------------------------------------
# install your root project, and run tests.
#----------------------------------------------
- name: Install library and run tests
run: |
poetry install --no-interaction
poetry add --group dev pytest-github-actions-annotate-failure
poetry add --group dev pytest-github-actions-annotate-failures
poetry run pytest --cov=src tests/test_sqlite_historian_integration.py
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[![Eclipse VOLTTRON™](https://img.shields.io/badge/Eclips%20VOLTTRON--red.svg)](https://volttron.readthedocs.io/en/latest/)
![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)
![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)
[![Run Pytests](https://github.com/eclipse-volttron/volttron-sqlite-historian/actions/workflows/run-test.yml/badge.svg)](https://github.com/eclipse-volttron/volttron-sqlite-historian/actions/workflows/run-test.yml)
[![pypi version](https://img.shields.io/pypi/v/volttron-sqlite-historian.svg)](https://pypi.org/project/volttron-sqlite-historian/)
![Passing?](https://github.com/VOLTTRON/volttron-sqlite-historian/actions/workflows/run-tests.yml/badge.svg)

VOLTTRON historian agent that stores data into a SQLite database


## Requirements

- Python >= 3.8
- Python >= 3.10

## Installation

Expand Down
40 changes: 26 additions & 14 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
Welcome to VOLTTRON Sqlite Historian's documentation!
===================================
SQLite Historian
================

**VOLTTRON Sqlite Historian** is ...
This is a VOLTTRON historian agent that stores its data in a sqlite database. It depends on
`volttron-lib-sql-historian <https://pypi.org/project/volttron-lib-sql-historian/>`_ and extends the class
`SQLHistorian <https://github.com/eclipse-volttron/volttron-lib-sql-historian/blob/main/src/historian/sql/historian.py#:~:text=class%20SQLHistorian>`_

Check out the :doc:`usage` section for further information, including
how to :ref:`installation` the project.
Configuration
-------------

.. note::
The following is a minimal configuration file that uses a relative path to the database.

This project is under active development.
::

Contents
--------
{
"connection": {
"type": "sqlite",
"params": {
"database": "data/historian.sqlite"
}
}
}

.. toctree::
All the above parameters are mandatory.

Optional Configuration
----------------------

In addition to the above configuration, SQLite Historian can optionally be configured using all the available
configurations exposed by the SQLHistorian and BaseHistorian. Please refer to
:ref:`SQL Historian <SQLHistorian-Library>` and :ref:`Base Historian Configurations <Base-Historian-Configurations>`
for more details

usage
agent
quick-start
fail-url-test-on-purpose

Loading

0 comments on commit a485656

Please sign in to comment.