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

[#171683040] administrations update function #39

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alexgpeppe
Copy link
Contributor

@alexgpeppe alexgpeppe commented Mar 30, 2020

This PR aims to add a timer trigger that schedules the update of public administrations: their list is read from IndicePA, then each entry is written on a blob storage

@pagopa-github-bot
Copy link
Contributor

pagopa-github-bot commented Apr 2, 2020

Affected stories

  • 🌟 #171683040: Come APP voglio poter accedere al dettaglio degli enti su IPA

New dependencies added: csv-stream, event-stream, node-fetch and @types/node-fetch.

csv-stream

Author: Remy Loubradou

Description: Simple CSV stream

Homepage: https://github.com/lbdremy/node-csv-stream#readme

Createdover 7 years ago
Last Updatedabout 2 years ago
LicenseMIT
Maintainers1
Releases5
Keywordscsv and stream
README

csv-stream - Simple CSV stream for node.js

Install

npm install csv-stream

Usage

var csv = require('csv-stream'),
var request = require('request');

// All of these arguments are optional.
var options = {
	delimiter : '\t', // default is ,
	endLine : '\n', // default is \n,
	columns : ['columnName1', 'columnName2'], // by default read the first line and use values found as columns
	columnOffset : 2, // default is 0
	escapeChar : '"', // default is an empty string
	enclosedChar : '"' // default is an empty string
}

var csvStream = csv.createStream(options);
request('http://mycsv.com/file.csv').pipe(csvStream)
	.on('error',function(err){
		console.error(err);
	})
	.on('header', function(columns) {
		console.log(columns);
	})
	.on('data',function(data){
		// outputs an object containing a set of key/value pair representing a line found in the csv file.
		console.log(data);
	})
	.on('column',function(key,value){
		// outputs the column name associated with the value found
		console.log('#' + key + ' = ' + value);
	})

Test

npm test

Contributions

Feel free to post issues and pull requests, more than welcome you are ;).

Licence

(The MIT License) Copyright 2012 HipSnip Limited

event-stream

Author: Dominic Tarr

Description: construct pipes of streams of events

Homepage: http://github.com/dominictarr/event-stream

Createdover 8 years ago
Last Updatedabout 1 year ago
LicenseMIT
Maintainers1
Releases84
Direct Dependenciesduplexer, from, map-stream, pause-stream, split, stream-combiner and through
Keywordsstream, map, flatmap, filter, split, join, merge and replace

node-fetch

Author: David Frank

Description: A light-weight module that brings window.fetch to node.js

Homepage: https://github.com/bitinn/node-fetch

Createdabout 5 years ago
Last Updated20 days ago
LicenseMIT
Maintainers3
Releases54
Direct Dependencies
Keywordsfetch, http and promise

@types/node-fetch

Author: Unknown

Description: TypeScript definitions for node-fetch

Homepage: http://npmjs.com/package/@types/node-fetch

Createdover 3 years ago
Last Updatedabout 1 month ago
LicenseMIT
Maintainers1
Releases31
Direct Dependencies@types/node and form-data
README

Installation

npm install --save @types/node-fetch

Summary

This package contains type definitions for node-fetch (https://github.com/bitinn/node-fetch).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch.

Additional Details

Credits

These definitions were written by Torsten Werner, Niklas Lindgren, Vinay Bedre, Antonio Román, Andrew Leedham, Jason Li, Brandon Wilson, Steve Faulkner, ExE Boss, Alex Savin, and Alexis Tyler.

Generated by 🚫 dangerJS

@codecov-io
Copy link

codecov-io commented Apr 2, 2020

Codecov Report

Merging #39 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #39   +/-   ##
=======================================
  Coverage   88.81%   88.81%           
=======================================
  Files          21       21           
  Lines         608      608           
  Branches       37       37           
=======================================
  Hits          540      540           
  Misses         67       67           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21924d2...92b85fb. Read the comment docs.

@alexgpeppe alexgpeppe force-pushed the 171683040-administrations-update-function branch from 13348a7 to 92b85fb Compare April 2, 2020 10:32
@alexgpeppe
Copy link
Contributor Author

@gunzip, there is currently a synchronization problem: the Activity that reads the file from indicePA seems not to get completed, the Orchestrator keeps waiting for its result.

@alexgpeppe alexgpeppe force-pushed the 171683040-administrations-update-function branch from 92b85fb to 3d51afe Compare April 3, 2020 13:09
@gunzip gunzip added the on-hold label Nov 17, 2020
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants