Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha 3 release ready #40

Merged
merged 181 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
126cd3a
docs: adds reference python projects
devraj Apr 15, 2024
b77dd79
fix: cli endpoint for tui
devraj Apr 15, 2024
97c8f44
refactor: script names
devraj Apr 15, 2024
fbec96c
chore: update dependencies
devraj Apr 15, 2024
2d257bd
feat: adds shillelagh REFS #31
devraj Apr 18, 2024
19a4b0e
docs: update description of the site
devraj Apr 18, 2024
0a9010b
chore: update lock file
devraj Apr 18, 2024
ded1ad8
chore: update packages
devraj Apr 18, 2024
7dd688e
refactor: entrypoint configuration for taskfile
devraj Apr 24, 2024
b7c5db3
refactor: renames cli entrypoint
devraj Apr 24, 2024
72a9953
docs: adds manifest documents for cli and tui
devraj Apr 24, 2024
a52d5f2
chore: adds placeholder package for sql interfaces
devraj Apr 24, 2024
3335ae7
chore: adds init for ext package
devraj Apr 24, 2024
66289ad
docs: adds philosophy behind the deliverables
devraj Apr 25, 2024
2a9c8d5
docs: placeholder for sql interface REFS #31
devraj Apr 25, 2024
af5f68f
docs: update philosophy behind various items
devraj Apr 27, 2024
9041f37
feat: adds division list cli endpoint
devraj Apr 27, 2024
9171af7
refactor: adds an exception that is raised for comming soon features
devraj Apr 27, 2024
de1987d
docs: adds placeholder docstrings
devraj Apr 27, 2024
1566d8e
refactor: renames detail summary to summary
devraj Apr 27, 2024
b73fcdf
refactor: documentation layout
devraj Apr 28, 2024
f2cc84f
refactor: adds mkdocs-typer plugin to document cli
devraj Apr 28, 2024
cde6068
chore: update depdenencies and add developer packages
devraj Apr 28, 2024
3154280
docs: update various design descriptions and inline docs
devraj Apr 28, 2024
5ecda82
docs: adds philosophy to the intro sections
devraj Apr 28, 2024
b44c516
feat: adds 404 override exception
devraj Apr 28, 2024
6095e14
feat: adds httpie wrapper to debug get endpoints
devraj Apr 28, 2024
bdbdd44
docs: adds toolchain information
devraj Apr 29, 2024
506c917
refactor: renames classes ahead of implementing #24
devraj Apr 29, 2024
3ef8ffe
refactor: responses now inherit from base response classes #24
devraj Apr 29, 2024
3f9bafe
docs: writes descriptions of utilities
devraj Apr 29, 2024
20db667
refactor: name of the parent class
devraj Apr 29, 2024
a793aa4
docs: layout of the api client page
devraj Apr 29, 2024
935260a
refactor: alarm summary class before detail endpoints
devraj Apr 29, 2024
8eb20f5
docs: placeholder to document how configuration works
devraj Apr 30, 2024
060c7ab
refactor: get alarm detail endpoint
devraj Apr 30, 2024
5a04ae1
test: adds test for alarm detail
devraj Apr 30, 2024
d210d29
feat: adds discovery expire method
devraj Apr 30, 2024
3577171
docs: writes logic behind the configuration of the endpoints
devraj Apr 30, 2024
c9ab29f
docs: move section out of root to developer
devraj Apr 30, 2024
749ee37
docs: remarks across the alarm handlers
devraj May 1, 2024
bee4ccc
feat: adds python shortcut to taskfile
devraj May 1, 2024
fb0f62f
feat: first exceptions bubbling up REFS #7
devraj May 1, 2024
b740acf
chore: adds pytest-dependency
devraj May 1, 2024
3e7667c
feat(wip): first specialised method for alarm
devraj May 1, 2024
9e55c74
chore: update to textual mayday release
devraj May 1, 2024
9d650cd
docs: updates python intro code example
devraj May 2, 2024
540f9c9
refactor: generic _get and _post methods for addons
devraj May 2, 2024
3015448
refactor: renames good_know_since to a private var
devraj May 2, 2024
919f91a
fix: incorrect url for comment post
devraj May 2, 2024
69fe4cc
test: comment that was created while testing
devraj May 2, 2024
2bf05eb
refactor: use generic _get method in list and retrieve
devraj May 2, 2024
4322bc6
chore: add citation file
devraj May 2, 2024
b6a6f70
fix: clean up test scripts
devraj May 3, 2024
dd01707
refactor: reduces network round trips for tests
devraj May 4, 2024
695e3fd
refactor: splits out fetch and compare
devraj May 4, 2024
e762b89
refactor: split post and checking for comments
devraj May 4, 2024
8610751
refactor: prettiness
devraj May 4, 2024
da8fd7c
Merge remote-tracking branch 'origin/master' into alpha-3
devraj May 4, 2024
a9f45db
docs: hard codes references to images
devraj May 5, 2024
ef8b926
feat: adds alarm endpoints in cli
devraj May 5, 2024
5e8a486
fix: branch names in links
devraj May 5, 2024
ed512f5
fix: raises exception when a 404 is encountered
devraj May 6, 2024
07eb407
refactor: mutation interactions with the cli
devraj May 6, 2024
043a7cc
feat: initial implementation of follow links
devraj May 7, 2024
907e44b
refactor: moves to using pyndatic HttpUrl for hrefs
devraj May 8, 2024
2c9cb67
docs: references to youtube videos
devraj May 8, 2024
8fa9101
feat: adds additional detail fields ahead of #1
devraj May 8, 2024
b1cd9da
reactor: naming convention of the mixin class
devraj May 8, 2024
6d6ba88
refactor: moves discovery to use the new href mixin
devraj May 8, 2024
df100d3
refactor: assigns none rather than a model instance
devraj May 8, 2024
d33175e
refactor: final migration of optinal href to mixin
devraj May 8, 2024
ad1e5a3
feat: adds placeholder folder for examples REFS #41
devraj May 8, 2024
a7a23d8
Merge branch 'alpha-3' into shillelagh-integration
devraj May 8, 2024
97fbd95
chore: update version number
devraj May 8, 2024
fce405f
refactor: implements firs next test
devraj May 8, 2024
69aaa43
fix: drops use of deprecated flag orm_mode
devraj May 8, 2024
025ebf6
feat: adds mkdocs shortcut
devraj May 8, 2024
10be890
refactor: groups errors and exceptions together
devraj May 8, 2024
6c8801c
chore: port method stubs from sample
devraj May 8, 2024
45f4be7
fix: adds missing identifier field in ref class
devraj May 8, 2024
aea18f5
refactor: methods visibility and type checking
devraj May 8, 2024
a058cae
test: adds discovery endpoint to the test schedule
devraj May 10, 2024
1d35d29
feat: adds reference powershell script for demo management
devraj May 10, 2024
79384d7
fix: fully qualified url for the images
devraj May 10, 2024
021a474
refactor: test endpoitns with and without tap output
devraj May 10, 2024
25354f6
docs: fix links third time lucky
devraj May 10, 2024
3369e66
fix: deprepcated github action runners
devraj May 11, 2024
fd588ec
fix: incorrectly referenced checkout action version
devraj May 11, 2024
b9151d4
refactor: fixes formatting thanks to black
devraj May 11, 2024
70ba504
feat: adds card holder model
devraj May 12, 2024
c4de387
feat: completes implementation of pdf detail
devraj May 12, 2024
6fb6c9e
refactor: complete pdf detail parsing implementation
devraj May 12, 2024
9d16899
docs: placeholders for design docs
devraj May 12, 2024
2ff2ffb
feat: adds various placeholder commands
devraj May 14, 2024
ddc78a7
docs: toc for design
devraj May 14, 2024
de72d4d
refactor: card detail now loads up CardholderCardSummary
devraj May 14, 2024
317e0c3
chore: adds tqdm for progress bars on tests
devraj May 14, 2024
56a33da
fix: imports for shillelagh adapter
devraj May 14, 2024
727d42f
refactor: adds placeholdref for future features
devraj May 14, 2024
f859b06
refactor: moves annotations to utils package
devraj May 14, 2024
5031ef4
refactor: renames cardholder extended ref used in event
devraj May 14, 2024
3d2b3f2
fix: pyndatic dict method deprecation
devraj May 14, 2024
462f14c
feat: enables relationship field
devraj May 14, 2024
352eec1
chore: update workflow name
devraj May 14, 2024
0ab83f5
fix: misconfigured adapter in pyproject
devraj May 14, 2024
bc1aa6e
refactor: basic working version of a sql interface
devraj May 15, 2024
040f48b
fix: typo in annotations
devraj May 15, 2024
f0b3689
docs: adds solution outline on how to implement the adapter
devraj May 15, 2024
f0be128
chore: update depdenencies
devraj May 17, 2024
b23177f
refactor: working version of the tui via textual-web
devraj May 18, 2024
87a5a12
refactor: moves to using mkdocs-material
devraj May 18, 2024
82cffca
chore: update packages
devraj May 19, 2024
30fe0e4
feat: adds logo thanks @matthewskiles
devraj May 19, 2024
eff81d4
docs: placeholder for cli design wisdom
devraj May 19, 2024
2c2c19d
Merge remote-tracking branch 'origin/master' into alpha-3
devraj May 19, 2024
6249b1b
fix: asset reference
devraj May 19, 2024
8d3dcfc
docs: updates credits
devraj May 19, 2024
c689938
docs: update readme
devraj May 20, 2024
b2dd276
docs: dresses up the texts and adds badge
devraj May 20, 2024
c803769
docs: revise badges
devraj May 20, 2024
ad30a3a
fix: alarm summary rendering on cli
devraj May 21, 2024
82fce79
docs: update descriptions
devraj May 21, 2024
5e0e9a3
refactor: replaces arrays with tuples
devraj May 21, 2024
03410d2
refactor: alarm detail cli interface working
devraj May 23, 2024
aec352a
chore: adds rich pixels
devraj May 23, 2024
0d2ad59
fix: flags for textual
devraj May 24, 2024
6dd5b6a
fix: removes duplicate line in response
devraj May 24, 2024
1db824c
refactor: disable logging and attempt tui layout
devraj May 24, 2024
b814dd3
refactor: various topics in the documentation
devraj May 25, 2024
449bd61
fix: inconsistent topic names
devraj May 25, 2024
e8764d7
docs: writes out design thoughts to bring project co completion
devraj May 25, 2024
2cc2f0a
refactor: moves cardholder endpoints out of subpackage
devraj May 25, 2024
84e516b
fix: slogan for sql interface
devraj May 27, 2024
40bef4d
refactor: adds support for virtual tables
devraj May 27, 2024
7e5f4da
feat: initial implementation of vtable support see SQL.md
devraj May 27, 2024
29bc168
refactor: thoughts on sql interface design around configuration
devraj May 27, 2024
279f95b
feat: ignore databases created by shillelagh
devraj May 27, 2024
5032d29
refactor: moves initialisation due to order of operation
devraj May 27, 2024
1de5049
refactor!: initial column discovery implementation
devraj May 27, 2024
2441e57
docs: update missing types of DTO
devraj May 27, 2024
4137c12
docs: adds NOTE links
devraj May 28, 2024
a983b4c
docs: updates markdown with highlights
devraj May 28, 2024
d96f9c8
refactor: drops the idea of vtables package
devraj May 28, 2024
0dcc5e7
refactor: name of the adapter class
devraj May 28, 2024
2f45db0
refactor: clean up shillelagh implementation
devraj May 29, 2024
0bcd691
refactor: adds property to return result_set
devraj May 29, 2024
cc1b767
refactor: moves to using dto_retrieve to get sql
devraj May 29, 2024
a182017
Merge pull request #43 from anomaly/sql-layout
devraj May 29, 2024
f509122
refactor: uses framework defined exceptions
devraj May 31, 2024
f4d8296
docs: major refactor of documentation begins
devraj May 31, 2024
45f3460
docs: completes intro to sql and rearranges sdk design
devraj May 31, 2024
0ef7e00
refactor: documentation organisation
devraj May 31, 2024
e9638ca
docs: reprahses introduction and intent of the project
devraj Jun 1, 2024
38a3c4d
chore: updates packages
devraj Jun 6, 2024
4f102a7
feat: adds css file to dashboard
devraj Jun 6, 2024
c3ef10a
docs: layout of installation manual
devraj Jun 6, 2024
6c25214
refactor: adds enum for pdf type and defines a summary object
devraj Jun 9, 2024
cb96a23
refactor: adds access group summary to cardholders
devraj Jun 10, 2024
da508e0
chore: update packages
devraj Jun 14, 2024
f1000af
chore: update tui and cli packages
devraj Jun 14, 2024
db82a6c
fix: removes deprecated use of dict on pydantic models
devraj Jun 15, 2024
0d15787
refactor: load pdf fields and cache them in capabilities
devraj Jun 15, 2024
2038c1b
refactor!: first attempt at using model_validator to solve the pdf pa…
devraj Jun 15, 2024
427a189
refactor: drop pdf field cache
devraj Jun 15, 2024
1c06118
refactor: pdf definition parsing working
devraj Jun 15, 2024
05dcaff
refactor: moves to using enums for credential class
devraj Jun 16, 2024
37f5594
chore: update packages
devraj Jun 20, 2024
9c9c573
docs: hardware configuration notes
devraj Jun 20, 2024
af89e46
refactor: implements pythonic shortcuts for pdf
devraj Jun 21, 2024
6f7957e
Merge pull request #44 from anomaly/issue-001
devraj Jun 21, 2024
2dff00f
docs: update syntax highlight configuration
devraj Jun 23, 2024
9a4e542
chore: fix syntax
devraj Jun 23, 2024
3ce8bc4
chore: update packages
devraj Jun 23, 2024
e9eec60
Merge remote-tracking branch 'origin/master' into alpha-3
devraj Jun 23, 2024
34395c7
docs: updates headings for sdk docs
devraj Jun 28, 2024
e854b23
chore: merge conflicts
devraj Jun 28, 2024
945d6a1
chore: update packages
devraj Jun 28, 2024
d1f2519
refactor: validation rules for cardholder detail
devraj Jun 28, 2024
8175949
fix: missing card type credential
devraj Jun 28, 2024
9437871
docs: big push towards completing docs
devraj Jun 28, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ jobs:
with:
python-version: 3.x
- run: pip install mkdocs
- run: pip install mkdocs-terminal
- run: pip install mkdocs-material
- run: pip install mkdocs-typer
- run: cd docs && mkdocs gh-deploy --force --clean --verbose
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Testing
name: ci
on:
push:
branches:
Expand All @@ -15,11 +15,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Install Task
uses: arduino/setup-task@v1
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SQlite databases
*.sqlite

# managed by direnv
.envrc

Expand Down
7 changes: 7 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@misc{gallagher_github,
author = {Anomaly},
title = {Gallagher},
howpublished = {GitHub Repository},
url = {https://github.com/anomaly/gallagher},
note = {Accessed: 2024-05-02},
}
47 changes: 47 additions & 0 deletions CLI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Command Line Interface

> The CLI is developed using [Typer](https://typer.tiangolo.com) which builds on the [infamous](https://click.palletsprojects.com/en/8.1.x/)

Over the course of developing the Python idiomatic client for Gallagher, it became evident to us that the primary utility of the application will come from use facing tools that make the library immediately useful. This document outlines the scope of intent of the CLI and what feature it will provide (or initially anyway).

## Objectives

A big motivation for building this client library is efficiency in integrating Gallagher Command Centre into other systems. Integration primarily presents itself in the following forms:

- Querying the state of the Command Centre and reacting to the information
- Mutating the state of the system (e.g add a card holder, pass, access group, etc)
- Synchronizing the information back to ta local system (talked in detail about in [SQL](SQL.md))

While the API client is designed for structured programmatic access to the API, these use facing tools are designed to automate everyday use cases without needing to code.

## Audience

While the REST API client is aimed at developers (primarily Python developers) the CLI is intended for use by higher level uses for automation. The CLI still requires some technical knowledge and it targeted towards high level system integrator to build automation around the Gallagher ecosystem.

## Design

Following the [Unix philosophy](https://en.wikipedia.org/wiki/Unix_philosophy) of `Make each program do one thing well.` or summarised by [Peter H. Salus](https://en.wikipedia.org/wiki/Peter_H._Salus) as:

- Write programs that do one thing and do it well.
- Write programs to work together.
- Write programs to handle text streams, because that is a universal interface.

Each component presented by this project aims to do just that.

> The primary objective of the CLI is to interact with the JSON API through the command line so users can build high level automation without having to interact directly with the JSON payloads. It uses the Python API client to ensure strict data rules when interacting with the API endpoints, thus preventing corruption.

The project must provide complete documentation for the tool to be useful to an end user / system administrator.

## Scope

The initial version

- Cardholder
- Visits
- Alarms



## Resources

- [Command Line Interface Guidelines - clig.dev](https://clig.dev)
28 changes: 28 additions & 0 deletions HARDWARE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Hardware

The following are some notes and resources I used to get our [Controller 7000 Single door](https://products.security.gallagher.com/security/global/en/products/access-control-hardware/controller-7000-single-door/p/BVC400011) PoE+ controller with a [T15 Multi Tech Reader](https://products.security.gallagher.com/security/global/en/products/access-control-hardware/readers-and-terminals/t15-multi-tech-reader/p/BVC300480) online with our Command Centre hosted on an AWS EC2 instance.

> [!WARNING]\
> Our setup was completely for demonstration purposes and was never intended for use in a production environment. Please consult a professional for any production setups.

A big thank you to [Gallagher Security](http://security.gallagher.com) for providing the hardware and software for this project.

## Shopping list

- [Controller 7000 Single door](https://products.security.gallagher.com/security/global/en/products/access-control-hardware/controller-7000-single-door/p/BVC400011)
- [T15 Multi Tech Reader](https://products.security.gallagher.com/security/global/en/products/access-control-hardware/readers-and-terminals/t15-multi-tech-reader/p/BVC300480)
- [Gallagher Command Centre](http://security.gallagher.com) software
- [Gallagher Mobile Connect](http://security.gallagher.com) app

## Reference videos

Official video tutorials from Gallagher Security:

- [Getting a Controller Online](https://www.youtube.com/watch?v=qDNjwEC2blU)
- [Getting a Controller Online using webpage adressing](https://www.youtube.com/watch?v=a4CCq_Ip0LQ)

Official documentation:

- [Controller 7000 Single door](https://products.security.gallagher.com/security/global/en/products/access-control-hardware/controller-7000-single-door/p/BVC400011)

- [Controller 7000 Single door documents](https://media.gallagher.com/web/1a00857c7c9c8d7/single-door-controller-7000-qr-code/?viewType=grid)
Loading