<commit_before>@done

Feature: Export Data Package
  As a Data Packager
  I want to export the data and associated metadata in a data package
  So that Data Consumers can access usuable open data and associated metadata in a single file

  Specification:
  - The Data Package properties are defined at http://specs.frictionlessdata.io/data-package/
  - The application only works with Tabular Data Packages, defined at http://specs.frictionlessdata.io/tabular-data-package/

  Export data package creates a datapackage.zip file that includes:
  - readme.md (containing the provenance information)
  - datapackage.json (containing the data package, table (data resource), csv dialect and column (schema) properties)
  - a data directory (containing each data file in the appropriate separated value file format)

  Rules to enable export data package menu item:
  - Licence property is mandatory
  - Successful validation against Table Schema

  Defaults:
  - Default the file save location from the Preferences/Settings (when implemented)
  - Default the filename to datapackage name property

  Export Data Package can be invoked by a menu item or the toolbar

  Scenario: Use the menu to Export Data Package
    Given I have opened Data Curator
    And I have completed all the required column, table and data package properties
    When I invoke the "Export Data Package" command
    Then prompt for location and name to save the file
    And assemble the data, properties and provenance information into a data package file<commit_msg>update export data package to set more defaults<commit_after>@done

Feature: Export Data Package
  As a Data Packager
  I want to export the data and associated metadata in a data package
  So that Data Consumers can access usuable open data and associated metadata in a single file

  Specification:
  - The Data Package properties are defined at http://specs.frictionlessdata.io/data-package/
  - The application only works with Tabular Data Packages, defined at http://specs.frictionlessdata.io/tabular-data-package/

  Export data package creates a datapackage.zip file that includes:
  - readme.md (containing the provenance information)
  - datapackage.json (containing the data package, table (data resource), csv dialect and column (schema) properties)
  - a data directory (containing each data file in the appropriate separated value file format)

  Rules to enable export data package menu item:
  - Licence property is mandatory
  - Successful validation against Table Schema

  Defaults:
  - Default the file save location from the Preferences/Settings (when implemented)
  - Default the filename to datapackage name property
  - Set Created to Now - see http://specs.frictionlessdata.io/data-package/#created
  - Set Profile to `tabular-data-package` - see http://specs.frictionlessdata.io/tabular-data-package/#specification

  Export Data Package can be invoked by a menu item or the toolbar

  Scenario: Use the menu to Export Data Package
    Given I have opened Data Curator
    And I have completed all the required column, table and data package properties
    When I invoke the "Export Data Package" command
    Then prompt for location and name to save the file
    And assemble the data, properties and provenance information into a data package file
{'fraction_non_alphanumeric': 0.043766978569272565, 'fraction_numerical': 0.0, 'mean_word_length': 4.0288315629742035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2486356', 'n_tokens_mistral': 821, 'n_tokens_neox': 784, 'n_words': 430}