Skip to content

Commit

Permalink
0.3a Luna release
Browse files Browse the repository at this point in the history
  • Loading branch information
schrink committed Mar 12, 2018
2 parents 35e7af8 + 99a274c commit 6056694
Show file tree
Hide file tree
Showing 42 changed files with 3,970 additions and 398 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
NODE_ENV=development
NODE_IP=
DH_NODE_IP=
DH_NODE_PORT=
DH_WALLET=

DB_USERNAME=root
DB_PASSWORD=root
Expand Down
4 changes: 0 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ module.exports = {
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ config.json
package-lock.json
kad-storage/*
!kad-storage/.gitkeep
import-log.txt
system/*
!system/.gitkeep
import-log.txt
OT-GIT-NODE-DEVELOP.zip
manual-testing-scripts
log.log

24 changes: 12 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const gulp = require('gulp')
const beautify = require('gulp-beautify')
const eslint = require('gulp-eslint')
const gulp = require('gulp');
const beautify = require('gulp-beautify');
const eslint = require('gulp-eslint');

gulp.task('make-origintrail-great-again', function () {
gulp.src('./**/*.js')
.pipe(beautify({
indent_size: 2
}))
.pipe(eslint({
fix: true
}))
.pipe(gulp.dest('./'))
})
gulp.src('./**/*.js')
.pipe(beautify({
indent_size: 2
}))
.pipe(eslint({
fix: true
}))
.pipe(gulp.dest('./'));
});
File renamed without changes.
2 changes: 1 addition & 1 deletion importers/default_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
password = os.environ.get("DB_PASSWORD"),
enable_logging = True)

db = client.db('origintrail')
db = client.db(os.environ.get("DB_DATABASE"))
# client.grant_user_access(os.environ.get("DB_USERNAME"), os.environ.get("DB_DATABASE"))

current_graphs = db.graphs()
Expand Down
200 changes: 200 additions & 0 deletions importers/example_connected_v1.5.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
<OriginTrailExport version="1.5">
<DataProvider> <!-- Unique ID for supply chain entity that provides the file -->
<ParticipantId>WALLET_2_ID</ParticipantId>
</DataProvider>
<MasterData>
<!--
Master data is the core data that is essential to operations in a specific business or business unit. It represents the business objects which are agreed on and shared across the enterprise. It can cover relatively static reference data, unstructured, analytical, hierarchical and metadata. In our current XML structure, the Master Data entities are:
- ParticipantsList and Participant – Description of all entities (participants) in the supply chain
- BusinessLocationsList and BusinessLocation - describe all physical or system locations where business processes are executed
- ObjectsList and Object – entities that are subjects of business processes (items or goods being described)
-->
<ParticipantsList> <!-- Description of all entities (participants) in supply chain -->
<Participant>
<ParticipantIdentifiers>
<ParticipantId>RETAILER_ID</ParticipantId>
</ParticipantIdentifiers>
<ParticipantData>
<Name>
<EN>Retailer</EN>
</Name>
<Location>
<Address>Retailer's Street 01C</Address>
<City>Bytesfield</City>
<Country>Cryptonia</Country>
<Zip>20001</Zip>
<GeoLocation>
<Latitude>00.0000</Latitude>
<Longitude>00.0000</Longitude>
</GeoLocation>
</Location>
</ParticipantData>
</Participant>
<Participant>
<ParticipantIdentifiers> <!-- Required -->
<ParticipantId>PROVIDER_ID</ParticipantId> <!-- Required -->
<AnotherIdentifier>SomeValue</AnotherIdentifier> <!-- Optional: you may define and add more identifiers if needed -->
</ParticipantIdentifiers>
<ParticipantData>
<!-- ParticipantData tag is required, but all the contents inside are optional -->
<Name> <!-- Required -->
<en>Green Warehouse Ltd</en>
<de>Gruene Warehouse Ltd</de>
<!-- languages are defined by ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)-->
</Name>
<Location> <!-- Optional -->
<Address>Data Boulevard 01</Address>
<City>Traceshire</City>
<Country>Cryptonia</Country>
<Zip>10000</Zip>
<GeoLocation>
<Latitude>00.0000</Latitude>
<Longitude>00.0000</Longitude>
</GeoLocation>
</Location>
<AdditionalInformation> Lorem Ipsum </AdditionalInformation> <!-- Optional: you may add additional tags if needed -->
</ParticipantData>
</Participant>
</ParticipantsList>
<BusinessLocationsList> <!-- This tag describes all physical locations where business processes are executed -->
<BusinessLocation>
<BusinessLocationOwnerId>RETAILER_ID</BusinessLocationOwnerId>
<BusinessLocationIdentifiers>
<BusinessLocationId>STORE_1</BusinessLocationId>
</BusinessLocationIdentifiers>
<BusinessLocationData>
<BusinessLocationName>
<EN>Retailer's Store</EN>
</BusinessLocationName>
<BusinessLocationType>Store</BusinessLocationType>
<Location>
<Address>Retailer's Street 01C</Address>
<City>Bytesfield</City>
<Country>Cryptonia</Country>
<Zip>20001</Zip>
<GeoLocation>
<Latitude>00.0000</Latitude>
<Longitude>00.0000</Longitude>
</GeoLocation>
</Location>
</BusinessLocationData>
</BusinessLocation>
<BusinessLocation>
<BusinessLocationOwnerId>PROVIDER_ID</BusinessLocationOwnerId> <!-- Required. Corresponds to ParticipantId in ParticipantsList above -->
<BusinessLocationIdentifiers> <!-- Required -->
<BusinessLocationId>WAREHOUSE_1</BusinessLocationId> <!-- Required -->
<AnotherIdentifier>SomeValue</AnotherIdentifier> <!-- Optional: you may define and add more identifiers if needed -->
</BusinessLocationIdentifiers>
<BusinessLocationData> <!-- Required -->
<Name> <!-- Required -->
<en>Provider's Warehouse</en>
<de>Das Warehouse des Anbieters</de>
<!-- languages are defined by ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)-->
</Name>
<BusinessLocationType>Warehouse</BusinessLocationType> <!-- Required -->
<Location> <!-- Optional -->
<Address>Data Boulevard 02</Address>
<City>Traceshire</City>
<Country>Cryptonia</Country>
<Zip>10000</Zip>
<GeoLocation>
<Latitude>00.0000</Latitude>
<Longitude>00.0000</Longitude>
</GeoLocation>
</Location>
<AdditionalInformation> Lorem Ipsum </AdditionalInformation> <!-- Optional: you may add additional tags if needed -->
</BusinessLocationData>
</BusinessLocation>

</BusinessLocationsList>
<ObjectsList> <!-- Object descriptions - i.e. product (object) master data, involved in the supply chain -->
<Object>
<ObjectIdentifiers>
<ObjectId>OBJECT_2</ObjectId>
<ean13>1234567890124</ean13>
</ObjectIdentifiers>
<ObjectData>
<Name>
<EN>Packed crypto Carrots 1 Kg</EN>
</Name>
<ObjectType>Vegetable</ObjectType>
<ObjectCategory>Carrot</ObjectCategory>
<ObjectDescription>
<en>The cryptiest carrots in the entire Cryptonia, packed for retail in 1 Kg package.</en>
</ObjectDescription>
</ObjectData>
</Object>
</ObjectsList>
<BatchesList>
<Batch>
<BatchIdentifiers>
<BatchId>OUTPUT_BATCH_ID</BatchId> <!-- Required -->
<ObjectId>OBJECT_2</ObjectId> <!-- Required -->
<SomeOtherCode>SomeValue</SomeOtherCode> <!-- Optional -->
</BatchIdentifiers>
<BatchData>
<QuantitiesDataList> <!-- Optional -->
<QuantityData>
<Quantity>1</Quantity>
<Measure>Unit</Measure>
</QuantityData>
<QuantityData>
<Quantity>10</Quantity>
<Measure>Kg</Measure>
</QuantityData>
</QuantitiesDataList>
<Note>Purchased on time</Note> <!-- Optional -->
<AdditionalInformation>Lorem ipsum</AdditionalInformation> <!--Required -->
</BatchData>
</Batch>
</BatchesList>
</MasterData>
<TransactionData>
<ExternalTransactionsList>
<ExternalTransaction>
<ExternalTransactionIdentifiers>
<ExternalTransactionId>TRANSACTION_3</ExternalTransactionId>
<ExternalTransactionDocumentId>TRANSACTION_DOCUMENT_3</ExternalTransactionDocumentId>
</ExternalTransactionIdentifiers>
<TransactionBatchesInformation>
<TransactionBatchesList> <!-- Required -->
<TransactionBatch>
<TransactionBatchId>OUTPUT_BATCH_ID</TransactionBatchId>
<TransactionBatchData>
<QuantitiesDataList>
<QuantityData>
<Quantity>1</Quantity>
<Measure>Unit</Measure>
</QuantityData>
<QuantityData>
<Quantity>10</Quantity>
<Measure>Kg</Measure>
</QuantityData>
</QuantitiesDataList>
</TransactionBatchData>
</TransactionBatch>
</TransactionBatchesList>
</TransactionBatchesInformation>
<ExternalTransactionData>
<TransactionTime>21.12.2012T00:00:00</TransactionTime>
<BusinessProcess>Purchase</BusinessProcess>
<BusinessLocationId>STORE_1</BusinessLocationId>
<TransactionFlow>Input</TransactionFlow> <!-- Required -->
<SourceBusinessLocationId>WAREHOUSE_1</SourceBusinessLocationId>
<DestinationBusinessLocationId>STORE_1</DestinationBusinessLocationId>
<BusinessProcessDescription>Regular Purchase</BusinessProcessDescription>
<AdditionalInformation> <!-- Optional -->
<Price>
<Value>10</Value>
<VAT>1%</VAT>
<Total>11</Total>
<Currency>USD</Currency>
<Discount>0%</Discount>
</Price>
</AdditionalInformation>
</ExternalTransactionData>
</ExternalTransaction>
</ExternalTransactionsList>
</TransactionData>
</OriginTrailExport>
Loading

0 comments on commit 6056694

Please sign in to comment.