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

Ianco #6

Open
wants to merge 1,599 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1599 commits
Select commit Hold shift + click to select a range
14edef4
fix undefined property
andrewwhitehead Nov 20, 2018
653b3bf
add text to mobile menu
andrewwhitehead Nov 20, 2018
bf7a8ac
add basic faceted filter controls
andrewwhitehead Nov 20, 2018
a59d59b
fix type checking error
andrewwhitehead Nov 20, 2018
e913c17
fix error when sorting facet options
andrewwhitehead Nov 20, 2018
5451511
skip empty category facets; handle missing translation
andrewwhitehead Nov 20, 2018
d919deb
update entity_type, address_type translations
andrewwhitehead Nov 20, 2018
cd6b8da
adjust search results layout
andrewwhitehead Nov 20, 2018
d3c4467
improve mobile layout of search (issue #583)
andrewwhitehead Nov 20, 2018
4679ab4
misc style adjustments
andrewwhitehead Nov 20, 2018
8b38e2a
add border for consistency
andrewwhitehead Nov 20, 2018
6193238
remove revoked filter option
andrewwhitehead Nov 20, 2018
9586a64
add scroll-to-top button
andrewwhitehead Nov 21, 2018
bd67c6b
fix border
andrewwhitehead Nov 21, 2018
21aa6e3
Fixed a small bug in UI in Ont theme (#677)
Nov 21, 2018
935eef6
adjust spacing on filters panel
andrewwhitehead Nov 21, 2018
3d8342a
use smooth scrolling when available; reduce scrolling when search par…
andrewwhitehead Nov 21, 2018
79077b2
increase distance before scroll-to-top control is shown
andrewwhitehead Nov 21, 2018
b886695
alternative loading indicator
andrewwhitehead Nov 21, 2018
7eceda0
don't add short words to optional search matches
andrewwhitehead Nov 21, 2018
2b69c76
remove unused modules
andrewwhitehead Nov 21, 2018
00be226
start adding about page; push container class down to individual modu…
andrewwhitehead Nov 21, 2018
b5c333e
move breadcrumbs down to component level and reorganize code; allow t…
andrewwhitehead Nov 21, 2018
c87b1e2
start updating bcgov homepage layout
andrewwhitehead Nov 22, 2018
1941ca1
about component -> contact component
andrewwhitehead Nov 22, 2018
ac70f42
re-export custom initializers
andrewwhitehead Nov 22, 2018
f32e4b6
fix breadcrumb loading; remove link from current breadcrumb
andrewwhitehead Nov 22, 2018
f8d2c19
extend contact page content; small updates to home page layout
andrewwhitehead Nov 22, 2018
704f726
start expanding page footer
andrewwhitehead Nov 22, 2018
74be6c5
add search in-progress message
andrewwhitehead Nov 22, 2018
1bbd02d
misc UI adjustments
andrewwhitehead Nov 22, 2018
43f3730
adjust past credentials filter on subpanel; show 'no results' when no…
andrewwhitehead Nov 22, 2018
acbafa3
remove border on footer navbar
andrewwhitehead Nov 22, 2018
e61a765
add number shortening for front page statistics
andrewwhitehead Nov 22, 2018
5f6c8a8
Work-around for NPE on blank expiry date
ianco Nov 23, 2018
186b8fd
more semantically valid header elements; layout adjustments for mobil…
andrewwhitehead Nov 23, 2018
71661ea
update search form layout for consistency; increase drop shadow
andrewwhitehead Nov 23, 2018
0b254cf
minor homepage layout updates
andrewwhitehead Nov 23, 2018
245bc0b
skip all search facets with no results
andrewwhitehead Nov 23, 2018
c3c74b6
minor homepage layout updates
andrewwhitehead Nov 23, 2018
33379e5
Update deployment configurations
WadeBarnes Nov 23, 2018
b72f24d
use solr queries to generate counts on homepage (issue #531)
andrewwhitehead Nov 23, 2018
19d6d12
throw exception on invalid effective/revoked date
andrewwhitehead Nov 23, 2018
13a3b79
fix typecheck error
andrewwhitehead Nov 23, 2018
b105f67
handle effective/revoked date input without time
andrewwhitehead Nov 23, 2018
2a3b89d
turn subheader into a label for the search field
andrewwhitehead Nov 24, 2018
637d560
add missing include
andrewwhitehead Nov 24, 2018
ca8c840
consistent panel border colours
andrewwhitehead Nov 24, 2018
85368a0
Fix credential date magic
ianco Nov 24, 2018
cc8d08a
extend timezone handling for credential effective/revoked date
andrewwhitehead Nov 24, 2018
f3c1d98
add created date to solr index; improve text summary
andrewwhitehead Nov 24, 2018
eb1b282
update npm-run-all minimum version to remove event-stream dependency …
andrewwhitehead Nov 26, 2018
4a67eaf
use consistent label for date attributes
andrewwhitehead Nov 26, 2018
b4475d0
minor style updates
andrewwhitehead Nov 26, 2018
f7c0f7f
restrict subpanel filter options to current facet options
andrewwhitehead Nov 26, 2018
3358b97
content text updates
andrewwhitehead Nov 26, 2018
0e8cfc6
split credential verification details into separate page
andrewwhitehead Nov 27, 2018
cbcd3a9
restore feedback link
andrewwhitehead Nov 27, 2018
031fce5
license -> licence
andrewwhitehead Nov 27, 2018
f414c01
adjust focus style for search input
andrewwhitehead Nov 27, 2018
8e130e9
Update descriptive text on home page
jljordan42 Nov 27, 2018
212cd78
Update home.component.html
andrewwhitehead Nov 27, 2018
006bf3c
Add management commands
WadeBarnes Nov 27, 2018
b92136e
add skip-to-content links for accessibility
andrewwhitehead Nov 27, 2018
4cf0fa6
disable auto-focus on search input
andrewwhitehead Nov 27, 2018
249b180
increase flexibility of number shortener
andrewwhitehead Nov 27, 2018
2282702
replace navigation links
andrewwhitehead Nov 27, 2018
fbce6d2
add basic feedback form
andrewwhitehead Nov 27, 2018
c58ad03
adjust focus style for search input
andrewwhitehead Nov 27, 2018
430bf8a
include suffix when shortening number
andrewwhitehead Nov 27, 2018
2a06b48
update homepage counts and labels
andrewwhitehead Nov 27, 2018
a80cdea
Update to latest image
ianco Nov 27, 2018
9f50ed5
further changed to home page text
jljordan42 Nov 28, 2018
a7ff6b6
fix typo on home page
jljordan42 Nov 28, 2018
ed3f8fc
Change search box label string
jljordan42 Nov 28, 2018
55b84f8
Update home.component.html
andrewwhitehead Nov 28, 2018
a5428c2
Typo fix
jljordan42 Nov 28, 2018
38031da
fix recent credentials count on homepage
andrewwhitehead Nov 28, 2018
0fb94cd
add meta tags to page header; support variable replacement in certain…
andrewwhitehead Nov 29, 2018
23c7075
change default app URL to dev for testing
andrewwhitehead Nov 29, 2018
e3e50be
update card image, meta tags
andrewwhitehead Nov 29, 2018
14715a8
Update von-image version
ianco Nov 29, 2018
84d3b22
Update to bcgovimages/von-image:py36-1.6-ew-13-s2i
WadeBarnes Nov 29, 2018
e3fa1a2
update temporary card image
andrewwhitehead Nov 30, 2018
9108919
implement feedback API; add feedback reason to form
andrewwhitehead Nov 30, 2018
bb40405
hide navigation at top of search results
andrewwhitehead Nov 30, 2018
87114e7
fix back button behaviour when navigating to search form
andrewwhitehead Nov 30, 2018
62805e2
contact page cleanups
andrewwhitehead Nov 30, 2018
0c42a97
force refresh when pressing search button
andrewwhitehead Nov 30, 2018
3b009fd
fix excessive re-rendering on window events
andrewwhitehead Nov 30, 2018
3668ba9
default to timeline view for topic credentials
andrewwhitehead Nov 30, 2018
31cf74b
more consistent title spacing
andrewwhitehead Nov 30, 2018
6d1b496
allow custom page size in default paginator (up to 100)
andrewwhitehead Nov 30, 2018
b5bb65d
adjust page meta tags as route is updated (issue #567)
andrewwhitehead Nov 30, 2018
8795cc6
increase text size on card image
andrewwhitehead Nov 30, 2018
9367610
do not display topic page until reladed data has loaded
andrewwhitehead Nov 30, 2018
78f819c
expand information in feedback email results (issue #680)
andrewwhitehead Nov 30, 2018
98393fc
add share link to topic page (issue #572)
andrewwhitehead Dec 1, 2018
f9c292a
test USE_X_FORWARDED_HOST to generate correct URL in swagger UI
andrewwhitehead Dec 3, 2018
9ecd022
rename app in swagger UI
andrewwhitehead Dec 3, 2018
1e6baed
OrgBook BC name change for public beta release
jljordan42 Dec 3, 2018
cf00a30
Update en.json
andrewwhitehead Dec 3, 2018
8df1a87
disable custom base URL for swagger UI
andrewwhitehead Dec 3, 2018
ad76abf
Update settings
WadeBarnes Dec 3, 2018
4f9b2ce
defer to x-forwarded-port when provided
andrewwhitehead Dec 3, 2018
48aa105
straggling BC OrgBook reference tidy up
jljordan42 Dec 3, 2018
b3645b0
BC OrgBook -> OrgBook BC
andrewwhitehead Dec 3, 2018
c137af6
replace temporary card image
andrewwhitehead Dec 3, 2018
ac429bb
skip business types when adding optional words to search results; ski…
andrewwhitehead Dec 3, 2018
966079f
search layout adjustments
andrewwhitehead Dec 3, 2018
78d706e
show last-issued date on credential types (issue #689)
andrewwhitehead Dec 3, 2018
fe379aa
larger share dialog
andrewwhitehead Dec 3, 2018
6d5ea79
only expand header links on large screen
andrewwhitehead Dec 3, 2018
a208f05
adjust spacing of credential details
andrewwhitehead Dec 3, 2018
bc03990
consistent link classes
andrewwhitehead Dec 3, 2018
0f8724e
updates to related topic list layout
andrewwhitehead Dec 3, 2018
b85b7fb
Update deployment configuration
WadeBarnes Dec 3, 2018
2220237
adjust layout for mobile; fix display of related topic name
andrewwhitehead Dec 3, 2018
2bb9fcb
add company to filtered words
andrewwhitehead Dec 3, 2018
6a00433
reset _sectionsLoaded when navigating between topics
andrewwhitehead Dec 3, 2018
17868e4
more semantic markup for search results page, filters
andrewwhitehead Dec 4, 2018
2a08be9
add hover style for search filters
andrewwhitehead Dec 4, 2018
91db7ce
minor typo in footer
jljordan42 Dec 4, 2018
c982eaa
fix timeline display when no rows are found
andrewwhitehead Dec 4, 2018
20e6c3f
fix duplicate breadcrumb links on not-found page
andrewwhitehead Dec 4, 2018
61e4cc7
use topic ID when linking to credential via timeline
andrewwhitehead Dec 4, 2018
b65a771
improve visibility of timeline marker when multiple rows are present
andrewwhitehead Dec 4, 2018
5356843
Update domain names
WadeBarnes Dec 5, 2018
41d33e6
update URL
jljordan42 Dec 5, 2018
188d46b
adding proxy to s2i build
weiiv Dec 5, 2018
062f437
add withLang directive for easier inline language-specific blocks
andrewwhitehead Dec 5, 2018
3a171c8
remove debug statement
andrewwhitehead Dec 5, 2018
8a86589
add explanatory text to credential detail page
andrewwhitehead Dec 5, 2018
9743a41
feedback form layout updates
andrewwhitehead Dec 5, 2018
936c4a8
Connect the Ontario `prod` environment to the SLN MainNet.
WadeBarnes Dec 6, 2018
24947c4
Prep Ontario environment for going live.
WadeBarnes Dec 6, 2018
a15ad39
store URL on credential type
andrewwhitehead Dec 7, 2018
7aae835
add default ordering to models
andrewwhitehead Dec 7, 2018
eb6078d
Updated APPLICATION_URL for default deployment (dev/test/prod).
esune Dec 7, 2018
99ba750
Update gitignore
WadeBarnes Dec 7, 2018
04285a3
Initial certificate install configuration
WadeBarnes Dec 7, 2018
7011a84
Added app-group label to template for all deployable objects.
esune Dec 8, 2018
9eebc75
disable inclusive search terms in ontario settings (issue #671)
andrewwhitehead Dec 9, 2018
92928c6
improve header layout on mobile
andrewwhitehead Dec 9, 2018
c4f7530
Google Analytics
weiiv Dec 10, 2018
55ccbf6
Use correct URL for test environment.
WadeBarnes Dec 10, 2018
33c12d8
Fix API URL
WadeBarnes Dec 10, 2018
adfb068
add development site banner
andrewwhitehead Dec 11, 2018
b3126b3
avoid copying search parameters to other endpoints
andrewwhitehead Dec 11, 2018
ff64ccb
fix issuer credential types query
andrewwhitehead Dec 12, 2018
20a66c6
Migrate SonarQube URLs
WadeBarnes Dec 13, 2018
78343c9
pass blank timezone value when input has no time component
andrewwhitehead Dec 14, 2018
079ccef
set timezone to UTC for plain date value
andrewwhitehead Dec 14, 2018
5a4598f
swap variable used to show development message
andrewwhitehead Dec 19, 2018
15b788a
update demo site message
andrewwhitehead Dec 19, 2018
57de9f0
Update to use latest postgres wallet storage
ianco Dec 22, 2018
9cc203b
update to angular 6, rxjs 6, ng-bootstrap 2, localize-router 2; fix i…
andrewwhitehead Dec 31, 2018
3db8208
use formatDate directly in DateFormatPipe
andrewwhitehead Jan 3, 2019
e328dba
fix compatibility with drf-yasg 1.12.0+
andrewwhitehead Jan 4, 2019
d8df25a
add basic support for django-filter
andrewwhitehead Jan 4, 2019
5bfba2a
Update configurations
WadeBarnes Jan 7, 2019
956423c
Update Configuration
WadeBarnes Jan 7, 2019
5138b8c
add on_delete parameter required by django 2.x
andrewwhitehead Jan 7, 2019
b39795b
update django version to 2.0.10 (issue #707)
andrewwhitehead Jan 7, 2019
70dfe52
update URL definitions; fix middleware configuration for django 2.0
andrewwhitehead Jan 8, 2019
8e49b69
Updated ledger address with new dedicated instance
esune Jan 9, 2019
f861c08
Update to latest image
ianco Jan 9, 2019
be9fcf6
Updated openshift manage script
esune Jan 9, 2019
d1afe79
Remove some unnecessary dependencies
ianco Jan 9, 2019
c75421a
Update von-image
WadeBarnes Jan 10, 2019
ffd7444
Update wallet type configurations
WadeBarnes Jan 10, 2019
159bc17
Fix postgres config
ianco Jan 10, 2019
6f18114
Remove accidently added files
ianco Jan 10, 2019
45f9d75
Re-factor indy dependencies into separate api directory
ianco Jan 10, 2019
5d2a893
Re-factor startup script and add s2i startup param APP_FILE
ianco Jan 11, 2019
36ac505
Update configurations
WadeBarnes Jan 11, 2019
5a64b04
Add support for themes from external directory
esune Jan 11, 2019
c0d90d5
Updated OpenShift configs to support themes from external directory.
esune Jan 11, 2019
260f6a8
Add separate startup paths for indy vs no indy
ianco Jan 11, 2019
128a3f4
Re-factor to get search working in vanilla django mode
ianco Jan 11, 2019
45e4b5b
Move tob_anchor to indy folder
ianco Jan 11, 2019
8775332
Update documentation
WadeBarnes Jan 14, 2019
0959370
Updated django version
ianco Jan 14, 2019
d04cc65
Moved auditable mixin to api-v2 package
ianco Jan 14, 2019
5fcc567
Google Tag Manager
weiiv Jan 14, 2019
f1f13d7
Updates to the readme and other MD files
swcurran Jan 15, 2019
01c085c
Google Tag Manager
weiiv Jan 15, 2019
0846017
Updating references to the renamed Permitify to dFlow repo
swcurran Jan 16, 2019
55adce3
Google Tag Manager
weiiv Jan 14, 2019
3ad9852
Update documentation
WadeBarnes Jan 14, 2019
d2dce36
Updates to the readme and other MD files
swcurran Jan 15, 2019
87edc92
Google Tag Manager
weiiv Jan 15, 2019
3704a5d
Updating references to the renamed Permitify to dFlow repo
swcurran Jan 16, 2019
49d737d
Update Jenkinsfile and buildconfig to use binary build with multiple …
esune Jan 17, 2019
d6f4789
Re-factor old User model into api_v2 maintaining migration history
ianco Jan 17, 2019
fd730f7
Removed unnecessary parameters, added theme-specific jenkinsfiles
esune Jan 17, 2019
60392e7
Change from permitify to dFlow
swcurran Jan 17, 2019
a1c5bc7
A bit of cleanup in prep for indy cat migration
ianco Jan 17, 2019
a0bab0a
Added python config file
ianco Jan 17, 2019
4af9629
Removed build-specific Jenkinsfiles.
esune Jan 17, 2019
2ddbf8d
Add route transfer configuration.
WadeBarnes Jan 17, 2019
2944a74
Updated file re-org for icat move
ianco Jan 17, 2019
a84e8cc
Updated script and instructions for indycat migration
ianco Jan 18, 2019
6f7941a
Add Google Analytics support
esune Jan 18, 2019
b500533
Updated analytics ID for BCGov theme.
esune Jan 18, 2019
b34e8db
Typo
ianco Jan 18, 2019
7ef6838
Add Google Analytics script to support Tag manager implementation
esune Jan 18, 2019
dd50b76
Added tob-web migration
ianco Jan 18, 2019
52c5bf0
Added tob-web migration
ianco Jan 18, 2019
c2148a4
Added tob-web migration
ianco Jan 18, 2019
98ce631
Added tob-web migration
ianco Jan 18, 2019
f4df248
Added tob-web migration
ianco Jan 18, 2019
1b1ade7
Added python files
ianco Jan 18, 2019
6c39f55
Integrate webhook backup notification.
WadeBarnes Jan 18, 2019
21d5519
Added some missing codes
ianco Jan 18, 2019
de81e81
Default robots file to limit site indexing
ianco Jan 21, 2019
23b98fd
Un-do the api migration refactor
ianco Jan 21, 2019
aa7cf00
Fix settings
ianco Jan 21, 2019
8e7daa4
Update configurations
WadeBarnes Jan 21, 2019
305e930
reduce maximum page size
andrewwhitehead Jan 21, 2019
a8a46ff
reduce maximum page size
andrewwhitehead Jan 21, 2019
960829a
fix solr query error when filter is blank
andrewwhitehead Jan 22, 2019
4e650d2
require query input of at least two characters (issue #738)
andrewwhitehead Jan 22, 2019
ea83e65
Add testimonials section to home page
esune Jan 21, 2019
f80b4ef
Put a cap on returned results
ianco Jan 22, 2019
3d8e435
Updated BCGov homepage
esune Jan 22, 2019
46e19fc
Fix api validation to include topic_id (#745)
ianco Jan 23, 2019
fa6051d
Update openapi.yml (#741)
nrempel Jan 23, 2019
dd9cd9f
store translation values received by agents on credential type records
andrewwhitehead Jan 23, 2019
e69dfda
expose credential type language as well as credential type ID for top…
andrewwhitehead Jan 23, 2019
d045e7c
translate category values in front-end using agent-submitted language…
andrewwhitehead Jan 23, 2019
77d88a0
Add field endpoint to issuer.
esune Jan 25, 2019
f9bb864
restrict rxjs to version 6.3.x (6.4 requires a newer typescript version)
andrewwhitehead Feb 5, 2019
aac8ae8
Remove Google Analytics and use Fathom instead - for BCGov theme
esune Feb 5, 2019
bffc1dc
Workaround to limit analytics to BC ToB prod site.
esune Feb 6, 2019
ef5bc1f
Add support for adding deployment-specific Fathom tracker.
esune Feb 6, 2019
25a582e
in attribute formatting, avoid adjustment of date value according to …
andrewwhitehead Feb 11, 2019
4bacbe6
Add blacklist configurations
WadeBarnes Feb 11, 2019
625d775
Add blacklist creation scripts
WadeBarnes Feb 11, 2019
1dfa73c
Add Matomo tracking snippet to BCGov theme.
esune Feb 12, 2019
12a8333
Update black list generation scripts.
WadeBarnes Feb 12, 2019
35635e3
update django dependency
andrewwhitehead Feb 12, 2019
a225f6b
fix method signature (causing 'invalid method signature' error)
andrewwhitehead Feb 13, 2019
7a49460
update django REST framework version to 3.9.1
andrewwhitehead Feb 13, 2019
b9b19dc
Update comments in icat-migration script
ianco Feb 14, 2019
8846c04
Updated script
ianco Feb 14, 2019
90b7997
Script tweaks
ianco Feb 14, 2019
111aaa9
Update scripts to support build/run of credential registry
ianco Feb 14, 2019
202a990
Fix up
mikelodder7 Feb 15, 2019
022f9e1
Add GitLab-CI file
WadeBarnes Apr 10, 2019
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
36 changes: 34 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ venv.bak/
### Visual Studio Code
###

.vscode/
.vscode/*

###
### MacOS
Expand All @@ -138,6 +138,7 @@ Icon
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.settings

# Directories potentially created on remote AFP share
.AppleDB
Expand Down Expand Up @@ -178,4 +179,35 @@ $RECYCLE.BIN/
*.msp

# Windows shortcuts
*.lnk
*.lnk

# Indy Agent - genesis transaction file(s)
genesis

# Visual Studio Code
.vscode
.idea/*
.vs

out

.gradle
/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

*.crt
*.key
/tob-api/Pipfile
/tob-api/Pipfile.lock

60 changes: 60 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
image: bcgovimages/von-image:py36-1.8-0

Agent Tests:
stage: test
script:
- mkdir test-reports
- mkdir test-reports/pytest
- cd agent
- python3 -m venv venv
- . venv/bin/activate
- pip install -r requirements.txt -r requirements.dev.txt pytest
- pytest
- ls -last
- pwd
coverage: '/^TOTAL\s+\d+\s+\d+\s+(\d+\%)$/'
artifacts:
name: "$CI_JOB_NAME"
paths:
- test-reports/
reports:
junit: test-reports/pytest/junit.xml
expire_in: 1 week

# Dependency Scanning
include:
template: Dependency-Scanning.gitlab-ci.yml

# Code Quality Scanning
code_quality:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
reports:
codequality: gl-code-quality-report.json
expire_in: 1 week

pages:
stage: deploy
dependencies:
- Agent Tests
script:
- mkdir -p public/coverage
- cp -r test-reports/cov_html/* public/coverage
artifacts:
paths:
- public
expire_in: 1 week
only:
- master
12 changes: 6 additions & 6 deletions agent/docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:18.04

RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-setuptools \
libsodium23 && \
rm -rf /var/lib/apt/lists/*
apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-setuptools \
libsodium23 && \
rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

Expand Down
85 changes: 38 additions & 47 deletions agent/indy_catalyst_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
"""Entrypoint."""

import argparse
import asyncio
import os
import signal

from .conductor import Conductor
from .defaults import default_message_factory
from .logging import LoggingConfigurator
from .transport.inbound import InboundTransportConfiguration

PARSER = argparse.ArgumentParser(description="Runs an Indy Agent.")
from .version import __version__


parser = argparse.ArgumentParser(description="Runs an Indy Agent.")

PARSER.add_argument(
parser.add_argument(
"-it",
"--inbound-transport",
dest="inbound_transports",
Expand All @@ -23,7 +25,7 @@
help="Choose which interface(s) to listen on",
)

PARSER.add_argument(
parser.add_argument(
"-ot",
"--outbound-transport",
dest="outbound_transports",
Expand All @@ -34,7 +36,7 @@
help="Choose which outbound transport handlers to register",
)

PARSER.add_argument(
parser.add_argument(
"--logging-config",
dest="logging_config",
type=str,
Expand All @@ -43,90 +45,81 @@
help="Specifies a custom logging configuration file",
)

PARSER.add_argument(
parser.add_argument(
"--log-level",
dest="log_level",
type=str,
metavar="<log-level>",
default=None,
help="Specifies a custom logging level "
+ "(debug, info, warning, error, critical)",
help="Specifies a custom logging level (debug, info, warning, error, critical)",
)

PARSER.add_argument(
parser.add_argument(
"-e",
"--endpoint",
type=str,
metavar="<endpoint>",
help="Specify the default endpoint to use when "
+ "creating connection invitations and requests",
help="Specify the default endpoint to use when creating connection invitations and requests",
)

PARSER.add_argument(
parser.add_argument(
"-l",
"--label",
type=str,
metavar="<label>",
help="Specify the default label to use when creating"
+ " connection invitations and requests",
help="Specify the default label to use when creating connection invitations and requests",
)

PARSER.add_argument(
parser.add_argument(
"--wallet-key",
type=str,
metavar="<wallet-key>",
help="Specify the master key value to use when opening the wallet",
)

PARSER.add_argument(
"--wallet-name", type=str, metavar="<wallet-name>", help="Specify the wallet name"
parser.add_argument(
"--wallet-name",
type=str,
metavar="<wallet-name>",
help="Specify the wallet name",
)

PARSER.add_argument(
parser.add_argument(
"--wallet-type",
type=str,
metavar="<wallet-type>",
help="Specify the wallet implementation to use",
)

PARSER.add_argument("--debug", action="store_true", help="Enable debugging features")

PARSER.add_argument(
"--seed", type=str, metavar="<did-seed>", help="Specify the default seed to use"
parser.add_argument(
"--debug",
action="store_true",
help="Enable debugging features",
)

PARSER.add_argument(
"--invite",
action="store_true",
help="Generate and print a new connection invitation URL",
parser.add_argument(
"--seed",
type=str,
metavar="<did-seed>",
help="Specify the default seed to use",
)

PARSER.add_argument(
"--send-invite",
parser.add_argument(
"--invite",
type=str,
metavar="<agent-endpoint>",
help="Specify an endpoint to send an invitation to",
)


async def start(
inbound_transport_configs: list, outbound_transports: list, settings: dict
):
"""
Start.

:inbound_transport_configs: list:
"""
async def start(inbound_transport_configs, outbound_transports, settings: dict):
factory = default_message_factory()
conductor = Conductor(
inbound_transport_configs, outbound_transports, factory, settings
)
conductor = Conductor(inbound_transport_configs, outbound_transports, factory, settings)
await conductor.start()


def main():
"""Entrypoint."""
args = PARSER.parse_args()
args = parser.parse_args()
settings = {}

inbound_transport_configs = []
Expand Down Expand Up @@ -163,15 +156,13 @@ def main():
if args.seed:
settings["debug.seed"] = args.seed
if args.invite:
settings["debug.print_invitation"] = True
if args.send_invite:
settings["debug.send_invitation_to"] = args.send_invite
settings["debug.send_invitation_to"] = args.invite

loop = asyncio.get_event_loop()
try:
asyncio.ensure_future(
start(inbound_transport_configs, outbound_transports, settings), loop=loop
)
start(inbound_transport_configs, outbound_transports, settings),
loop=loop)
loop.run_forever()
except KeyboardInterrupt:
print("\nShutting down")
Expand Down
24 changes: 4 additions & 20 deletions agent/indy_catalyst_agent/classloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,21 @@

from .error import BaseError


class ModuleLoadError(BaseError):
"""Module load error."""

pass


class ClassNotFoundError(BaseError):
"""Class not found error."""

pass


class ClassLoader:
"""Class used to load classes from modules dynamically."""

def __init__(self, base_path, super_class):
self.logger = logging.getLogger(__name__)
self.base_path = base_path
self.super_class = super_class

def load(self, module_path, load_relative=False):
"""
Load module by module path.

:param module_path: Dotted path to module
:param load_relative: (Default value = False) Should the method check in the
configured base path for relative import
"""
# We can try to load the module relative to a given base path
if load_relative:
relative_module_path = ".".join([self.base_path, module_path])
Expand Down Expand Up @@ -67,10 +53,8 @@ def load(self, module_path, load_relative=False):

@classmethod
def load_class(cls, class_name: str, default_module: str = None):
"""Resolve a complete class path (ie. typing.Dict) to the class itself

:param class_name: str: Class name
:param default_module: str: (Default value = None)
"""
Resolve a complete class path (ie. typing.Dict) to the class itself
"""
if "." in class_name:
# import module and find class
Expand All @@ -79,12 +63,12 @@ def load_class(cls, class_name: str, default_module: str = None):
mod_path = default_module
else:
raise ClassNotFoundError(f"Cannot resolve class name: {class_name}")

try:
mod = import_module(mod_path)
except ModuleNotFoundError:
error_message = f"Unable to import module {mod_path}"
raise ModuleLoadError(error_message)

resolved = getattr(mod, class_name, None)
resolved = getattr(mod, class_name, None)
return resolved
Loading