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

Workspace reorganization #998

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/actions/derive-cache-info/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
- id: main
shell: bash
run: |
source ./ci/util.sh
source ./.github/ci/util.sh
DOCKER_IMG=${{ inputs.docker-img }}
CACHE_KEY=`as_docker_cache_key $DOCKER_IMG`
CACHE_DIR="/tmp/cachedir-$CACHE_KEY"
Expand Down
30 changes: 0 additions & 30 deletions .github/actions/publish-android/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/setup-codecov-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ runs:
docker run --rm -d --name mysql --network host -e MYSQL_ROOT_PASSWORD=mysecretpassword mysql:5.7.35
docker run --rm -d --name indypool --network host ${{ env.DOCKER_IMAGE_POOL }}
sleep 5
docker-compose -f ./ci/agency/docker-compose.yml up -d
docker-compose -f ./.github/ci/agency/docker-compose.yml up -d
2 changes: 1 addition & 1 deletion .github/actions/setup-testing-nodejs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
docker run --rm -d --name mysql --network host -e MYSQL_ROOT_PASSWORD=mysecretpassword mysql:5.7.35
docker run --rm -d --name indypool --network host ${{ env.DOCKER_IMAGE_POOL }}
sleep 5
docker-compose -f ./ci/agency/docker-compose.yml up -d
docker-compose -f ./.github/ci/agency/docker-compose.yml up -d
- name: "Build binding module"
shell: bash
run: (cd wrappers/vcx-napi-rs && npm install && npm run build:napi:debug)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ jobs:
run: |
set -x

HASH_DOCKERFILE_LIBVCX=${{ hashFiles('ci/libvcx.dockerfile') }}
HASH_DOCKERFILE_VDRPROXY=${{ hashFiles('ci/vdrproxy.dockerfile') }}
HASH_DOCKERFILE_LIBVCX=${{ hashFiles('.github/ci/libvcx.dockerfile') }}
HASH_DOCKERFILE_VDRPROXY=${{ hashFiles('.github/ci/vdrproxy.dockerfile') }}
HASH_SRC_LIBVDRTOOLS=${{ hashFiles('libvdrtools') }}
HASH_SRC_LIBVCX=${{ hashFiles('libvcx') }}
HASH_SRC_ARIESVCX=${{ hashFiles('aries_vcx') }}
HASH_SRC_ARIESVCX_CORE=${{ hashFiles('aries_vcx_core') }}
HASH_SRC_AGENCYCLIENT=${{ hashFiles('agency_client') }}
HASH_SRC_DIDDOC=${{ hashFiles('diddoc') }}
HASH_SRC_MESSAGES=${{ hashFiles('messages') }}
HASH_SRC_WRAPPER_JAVA=${{ hashFiles('wrappers/java') }}

SEED_HASH_ARIESVCX=${HASH_SRC_LIBVDRTOOLS:0:11}-${HASH_SRC_ARIESVCX_CORE:0:11}-${HASH_SRC_ARIESVCX:0:11}-${HASH_SRC_AGENCYCLIENT:0:11}-${HASH_SRC_DIDDOC:0:11}-${HASH_SRC_MESSAGES:0:11}}
HASH_ARIESVCX=$(echo -n "$SEED_HASH_ARIESVCX" | sha256sum | awk '{print $1}')
Expand Down Expand Up @@ -233,7 +232,7 @@ jobs:
uses: ./.github/actions/build-image
with:
docker-img: ${{ env.DOCKER_IMG_CACHED }}
dockerfile-path: "ci/vdrproxy.dockerfile"
dockerfile-path: ".github/ci/vdrproxy.dockerfile"
build-arg: "ALPINE_CORE_IMAGE=$DOCKER_IMG_CACHED_ALPINE_CORE"
branch-name: ${{ env.BRANCH_NAME }}
branch-main: ${{ env.MAIN_BRANCH }}
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
**/node_modules
**/*.node
**/dist
wrappers/ios/vcx/vcx.framework/**
wrappers/ios/vcx/vcx.framework.dSYM/**
wrappers/ios_legacy/vcx/vcx.framework/**
wrappers/ios_legacy/vcx/vcx.framework.dSYM/**
.vscode
*.code-workspace
**/tails.txt
Expand Down
2 changes: 0 additions & 2 deletions did_doc/rustfmt.toml

This file was deleted.

3 changes: 1 addition & 2 deletions did_doc/src/schema/did_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ use did_parser::{Did, DidUrl};
use serde::{Deserialize, Serialize};
use serde_json::Value;

use crate::error::DidDocumentBuilderError;

use super::{
service::Service,
types::uri::Uri,
utils::OneOrList,
verification_method::{VerificationMethod, VerificationMethodKind},
};
use crate::error::DidDocumentBuilderError;

pub type ControllerAlias = OneOrList<Did>;

Expand Down
3 changes: 1 addition & 2 deletions did_doc/src/schema/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ use std::collections::HashSet;

use serde::{Deserialize, Serialize};

use crate::error::DidDocumentBuilderError;

use super::{
types::{uri::Uri, url::Url},
utils::OneOrList,
};
use crate::error::DidDocumentBuilderError;

pub type ServiceTypeAlias = OneOrList<String>;

Expand Down
14 changes: 7 additions & 7 deletions did_doc/src/schema/verification_method/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ mod public_key;
mod verification_method_kind;
mod verification_method_type;

pub use self::public_key::PublicKeyField;

use ::public_key::Key;
pub use verification_method_kind::VerificationMethodKind;
pub use verification_method_type::VerificationMethodType;

use did_parser::{Did, DidUrl};
use serde::{Deserialize, Serialize};
pub use verification_method_kind::VerificationMethodKind;
pub use verification_method_type::VerificationMethodType;

pub use self::public_key::PublicKeyField;
use crate::{error::DidDocumentBuilderError, schema::types::jsonwebkey::JsonWebKey};

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
Expand Down Expand Up @@ -160,16 +158,18 @@ impl CompleteVerificationMethodBuilder {
id: self.id,
controller: self.controller,
verification_method_type: self.verification_method_type,
public_key: self.public_key.unwrap(), // SAFETY: The builder will always set the public key
public_key: self.public_key.unwrap(), /* SAFETY: The builder will always set the
* public key */
}
}
}

#[cfg(test)]
mod tests {
use super::*;
use serde_json::Value;

use super::*;

fn create_valid_did() -> Did {
Did::parse("did:example:123456789abcdefghi".to_string()).unwrap()
}
Expand Down
2 changes: 0 additions & 2 deletions did_parser/rustfmt.toml

This file was deleted.

11 changes: 6 additions & 5 deletions did_parser/src/did.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use std::convert::TryFrom;
use std::fmt::{Display, Formatter};
use std::str::FromStr;
use std::{
convert::TryFrom,
fmt::{Display, Formatter},
str::FromStr,
};

use serde::{Deserialize, Deserializer, Serialize, Serializer};

use crate::DidUrl;
use crate::{error::ParseError, utils::parse::parse_did_method_id, DidRange};
use crate::{error::ParseError, utils::parse::parse_did_method_id, DidRange, DidUrl};

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Did {
Expand Down
3 changes: 1 addition & 2 deletions did_parser/src/utils/parse.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::error::ParseError;
use crate::DidRange;
use crate::{error::ParseError, DidRange};

pub(crate) fn parse_key_value(
did_url: &str,
Expand Down
3 changes: 2 additions & 1 deletion did_parser/tests/did_url/positive.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use did_parser::DidUrl;
use std::collections::HashMap;

use did_parser::DidUrl;

macro_rules! test_cases_positive {
($($name:ident: $input:expr, $expected_did:expr, $expected_method:expr, $expected_id:expr, $expected_path:expr, $expected_fragment:expr, $expected_queries:expr, $expected_params:expr)*) => {
$(
Expand Down
2 changes: 0 additions & 2 deletions did_resolver/rustfmt.toml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::shared_types::did_document_metadata::DidDocumentMetadata;
use std::io::Read;

use super::dereferencing_metadata::DidDereferencingMetadata;
use crate::shared_types::did_document_metadata::DidDocumentMetadata;

pub struct DidDereferencingOutput<R: Read + Send + Sync> {
dereferencing_metadata: DidDereferencingMetadata,
Expand Down
2 changes: 1 addition & 1 deletion did_resolver/src/traits/dereferenceable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ pub mod dereferencing_output;

use std::io::Read;

use crate::{error::GenericError, traits::resolvable::DidResolvable};
use async_trait::async_trait;
use did_parser::DidUrl;

use self::{
dereferencing_options::DidDereferencingOptions, dereferencing_output::DidDereferencingOutput,
};
use crate::{error::GenericError, traits::resolvable::DidResolvable};

#[async_trait]
pub trait DidDereferenceable: DidResolvable {
Expand Down
2 changes: 1 addition & 1 deletion did_resolver/src/traits/resolvable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ pub mod resolution_metadata;
pub mod resolution_options;
pub mod resolution_output;

use crate::error::GenericError;
use async_trait::async_trait;
use did_parser::Did;

use self::{resolution_options::DidResolutionOptions, resolution_output::DidResolutionOutput};
use crate::error::GenericError;

#[async_trait]
pub trait DidResolvable {
Expand Down
2 changes: 0 additions & 2 deletions did_resolver_registry/rustfmt.toml

This file was deleted.

6 changes: 4 additions & 2 deletions did_resolver_registry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,13 @@ impl ResolverRegistry {

#[cfg(test)]
mod tests {
use super::*;
use std::{error::Error, pin::Pin};

use async_trait::async_trait;
use did_resolver::did_doc::schema::did_doc::DidDocumentBuilder;
use mockall::{automock, predicate::eq};
use std::{error::Error, pin::Pin};

use super::*;

struct DummyDidResolver;

Expand Down
2 changes: 0 additions & 2 deletions did_resolver_sov/rustfmt.toml

This file was deleted.

3 changes: 1 addition & 2 deletions did_resolver_sov/src/dereferencing/dereferencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ use did_resolver::{
},
};

use crate::resolution::DidSovResolver;

use super::utils::dereference_did_document;
use crate::resolution::DidSovResolver;

#[async_trait]
impl DidDereferenceable for DidSovResolver {
Expand Down
15 changes: 9 additions & 6 deletions did_resolver_sov/src/dereferencing/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,17 @@ pub(crate) fn dereference_did_document<E: Default + Serialize>(

#[cfg(test)]
mod tests {
use super::*;

use did_resolver::did_doc::schema::did_doc::DidDocumentBuilder;
use did_resolver::did_doc::schema::verification_method::VerificationMethodType;
use did_resolver::did_parser::DidUrl;
use did_resolver::traits::resolvable::resolution_output::DidResolutionOutput;
use did_resolver::{
did_doc::schema::{
did_doc::DidDocumentBuilder, verification_method::VerificationMethodType,
},
did_parser::DidUrl,
traits::resolvable::resolution_output::DidResolutionOutput,
};
use serde_json::Value;

use super::*;

fn example_did_document_builder() -> DidDocumentBuilder<()> {
let verification_method = VerificationMethod::builder(
DidUrl::parse("did:example:123456789abcdefghi#keys-1".to_string()).unwrap(),
Expand Down
3 changes: 1 addition & 2 deletions did_resolver_sov/src/resolution/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ use did_resolver::{
};
use serde_json::Value;

use super::utils::{is_valid_sovrin_did_id, ledger_response_to_ddo};
use crate::{
error::{parsing::ParsingErrorSource, DidSovError},
reader::AttrReader,
};

use super::utils::{is_valid_sovrin_did_id, ledger_response_to_ddo};

pub struct DidSovResolver {
ledger: Arc<dyn AttrReader>,
}
Expand Down
3 changes: 2 additions & 1 deletion did_resolver_sov/src/resolution/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ pub(super) async fn ledger_response_to_ddo<E: Default>(

#[cfg(test)]
mod tests {
use super::*;
use chrono::TimeZone;
use did_resolver::did_doc::schema::verification_method::PublicKeyField;

use super::*;

#[test]
fn test_prepare_ids() {
let did = "did:example:1234567890".to_string();
Expand Down
9 changes: 5 additions & 4 deletions did_resolver_sov/src/service.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::collections::HashSet;
use std::fmt::Display;
use std::{collections::HashSet, fmt::Display};

use serde::{Deserialize, Deserializer};
use url::Url;
Expand Down Expand Up @@ -66,10 +65,12 @@ where

#[cfg(test)]
mod tests {
use super::*;
use serde_json::from_str;
use std::iter::FromIterator;

use serde_json::from_str;

use super::*;

#[test]
fn test_deserialize_endpoint_did_sov() {
let json = r#"{
Expand Down
15 changes: 7 additions & 8 deletions did_resolver_sov/tests/resolution.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
use std::sync::Arc;
use std::thread;
use std::time::Duration;
use std::{sync::Arc, thread, time::Duration};

use aries_vcx::core::profile::profile::Profile;
use aries_vcx::{
common::ledger::{
service_didsov::{DidSovServiceType, EndpointDidSov},
transactions::write_endpoint,
},
core::profile::profile::Profile,
utils::devsetup::SetupProfile,
};
use did_resolver::did_parser::Did;
use did_resolver::traits::resolvable::{resolution_options::DidResolutionOptions, DidResolvable};
use did_resolver_sov::reader::ConcreteAttrReader;
use did_resolver_sov::resolution::DidSovResolver;
use did_resolver::{
did_parser::Did,
traits::resolvable::{resolution_options::DidResolutionOptions, DidResolvable},
};
use did_resolver_sov::{reader::ConcreteAttrReader, resolution::DidSovResolver};

async fn write_test_endpoint(profile: &Arc<dyn Profile>, did: &str) {
let endpoint = EndpointDidSov::create()
Expand Down
3 changes: 2 additions & 1 deletion libvdrtools/indy-api-types/src/domain/wallet/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use serde_json::value::Value;
use std::collections::HashMap;

use serde_json::value::Value;

use crate::validation::Validatable;

#[derive(Debug, Serialize, Deserialize, Clone, Default)]
Expand Down
Loading