Coder Social home page Coder Social logo

bodskit's People

Contributors

odscjames avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

scatteredink

bodskit's Issues

mapping-sheet: 'range' values not as expected

Range should indicate the number of values required by a field.

For example, looking at person-statement.json, when the mapping-sheet command is used one would expect that - of the top level fields - only statementID and statementType would have range 1..1 (i.e. a single value is required). But optional like birthDate and deathDate are also given a range of 1..1 .

(Requirements-wise, could we please indicate sub-property ranges with brackets around the range value. So, for example we would end up with:

,identifiers,Identifiers,"One or more official identifiers for this perrson. Where available, official registration numbers should be provided.",array,0..n,,,,
,identifiers,Identifier,An identifier that has been assigned to this entity. The scheme or list from which the identifier is drawn should be declared.,object,,,,,
identifiers,identifiers/id,ID,The identifier for this entity as provided in the declared scheme.,string,(0..1),,,,
identifiers,identifiers/scheme,Scheme,"For entity statements, the scheme should be a entry from the org-id.guide codelist. For person statements, recognised values include 'passport', 'internal' and 'id-card'.",string,(0..1),,http://www.org-id.guide,,
identifiers,identifiers/schemeName,Scheme name,,string,(0..1),,,,
identifiers,identifiers/uri,URI,Where this identifier has a canonical URI this may be included,string,(0..1),uri,https://en.wikipedia.org/wiki/Uniform_Resource_Identifier,,
)

FYI, ocdskit mapping-sheet produces same output as bodskit

I noticed there were only about six lines different, so I merged those changes into the next version of OCDS Kit, while making changes to support OC4IDS. The command also works with SEDL. We can try to just update one bit of code instead of copying repositories.

(Note: You need to use --order-by path and --infer-required to get the same output as the test fixture. Drop --infer-required to fix #9.)

Similarly, ocdskit schema-report now also supports BODS with only stylistic changes in output, which can easily be changed if needed.

FYI, can use csvstack instead of all-codes

pip install csvkit
cd path/to/data-standard
csvstack --filenames -n codelist schema/codelists/* | sed s/\.csv// | in2csv -f csv 

Produces the same file.

Note: | sed s/\.csv// removes the .csv extension from the first column. | in2csv -f csv ensures all rows have the same number of columns. Neither is strictly necessary for the use case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.