From e01f1c1d953e9d5d12bb7b472eeed810a2ed4b63 Mon Sep 17 00:00:00 2001 From: Lukas <76838159+wolflu05@users.noreply.github.com> Date: Wed, 2 Aug 2023 23:06:47 +0200 Subject: [PATCH] :tada: Bump version to v1.0.0 (#42) --- .../components/BulkDefinitionSchemaBuilder.js | 2 +- .../integration/test_InvenTreeBulkPlugin.py | 12 +++--- .../tests/integration/test_migrations.py | 2 +- .../tests/unit/test_BulkGenerator.py | 38 +++++++++---------- inventree_bulk_plugin/version.py | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/inventree_bulk_plugin/templates/components/BulkDefinitionSchemaBuilder.js b/inventree_bulk_plugin/templates/components/BulkDefinitionSchemaBuilder.js index 3fbcec2..780375f 100644 --- a/inventree_bulk_plugin/templates/components/BulkDefinitionSchemaBuilder.js +++ b/inventree_bulk_plugin/templates/components/BulkDefinitionSchemaBuilder.js @@ -54,7 +54,7 @@ function BulkDefinitionSchemaBuilder({ schema, setSchema, generateKeys = {} }) { useEffect(() => { if (schema === null) { setSchema({ - version: "0.1.0", + version: "1.0.0", input: {}, templates: [], output: null, diff --git a/inventree_bulk_plugin/tests/integration/test_InvenTreeBulkPlugin.py b/inventree_bulk_plugin/tests/integration/test_InvenTreeBulkPlugin.py index d6605a7..ee0f4de 100644 --- a/inventree_bulk_plugin/tests/integration/test_InvenTreeBulkPlugin.py +++ b/inventree_bulk_plugin/tests/integration/test_InvenTreeBulkPlugin.py @@ -35,7 +35,7 @@ def test_validate_template(self): validate_template(schema) valid_schema = json.dumps({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -53,7 +53,7 @@ def setUp(self): super().setUp() self.simple_valid_generation_template = { - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -66,7 +66,7 @@ def setUp(self): self.simple_valid_generation_template_json = json.dumps(self.simple_valid_generation_template) self.complex_valid_generation_template = { - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -130,7 +130,7 @@ def test_url_parse(self): # There should be a 400 on invalid user input - invalid generation template data = { - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -149,7 +149,7 @@ def test_url_parse(self): # If template_type is provided and exists, everything should work data = { - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -189,7 +189,7 @@ def url(pk): # generation without name should raise an error schema = { - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": {"generate": {"description": "Test description"}} diff --git a/inventree_bulk_plugin/tests/integration/test_migrations.py b/inventree_bulk_plugin/tests/integration/test_migrations.py index b22a9cf..4f03970 100644 --- a/inventree_bulk_plugin/tests/integration/test_migrations.py +++ b/inventree_bulk_plugin/tests/integration/test_migrations.py @@ -29,7 +29,7 @@ def prepare(self): bulk_creation_template = self.old_state.apps.get_model('inventree_bulk_plugin', 'bulkCreationTemplate') simple_valid_generation_template = { - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { diff --git a/inventree_bulk_plugin/tests/unit/test_BulkGenerator.py b/inventree_bulk_plugin/tests/unit/test_BulkGenerator.py index 51821d1..bce6db6 100644 --- a/inventree_bulk_plugin/tests/unit/test_BulkGenerator.py +++ b/inventree_bulk_plugin/tests/unit/test_BulkGenerator.py @@ -15,7 +15,7 @@ def test_1D_generation(self): for dim, exp in dimensions: with self.subTest(f"test {dim} dimension"): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -34,7 +34,7 @@ def test_1D_generation(self): def test_template(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [ { @@ -106,7 +106,7 @@ def test_apply_template(self): def test_reference_undefined_template(self): with self.assertRaisesRegex(ValueError, "template Drawer is not defined"): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -116,7 +116,7 @@ def test_reference_undefined_template(self): def test_without_dimensions(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -135,7 +135,7 @@ def test_without_dimensions(self): def test_input_variables(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {"a": "2", "b": "Hello"}, "templates": [], "output": { @@ -157,7 +157,7 @@ def test_input_variables(self): def test_invalid_template(self): with self.assertRaisesRegex(Exception, "1 validation error for BulkDefinitionSchema\noutput\n output.dimensions.0: 'hello' is undefined"): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -180,7 +180,7 @@ def test_invalid_template_on_dimensions_render(self): with self.subTest(name, template=template): with self.assertRaisesRegex(error, error_regex): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -195,7 +195,7 @@ def test_invalid_template_on_dimensions_render(self): def test_merge_base_child_to_childs(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -217,7 +217,7 @@ def test_merge_base_child_to_childs(self): def test_merge_base_child_to_childs_with_no_childs(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -237,7 +237,7 @@ def test_merge_base_child_to_childs_with_no_childs(self): def test_parent_name_match(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -264,7 +264,7 @@ def test_parent_name_match(self): def test_missing_child_match(self): with self.assertRaisesRegex(ValueError, "No match for 1"): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -283,7 +283,7 @@ def test_missing_child_match(self): def test_error_in_parent_name_match(self): with self.assertRaisesRegex(ValueError, "Invalid generator template '{{something.not.existing}}'"): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -301,7 +301,7 @@ def test_error_in_parent_name_match(self): def test_parent_context(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -321,7 +321,7 @@ def test_parent_context(self): def test_len_context_variable(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": { @@ -340,7 +340,7 @@ def test_len_context_variable(self): def test_not_allowed_field(self): with self.assertRaisesRegex(ValueError, "'NOT_ALLOWED_KEY' is not allowed to be generated"): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": {"generate": {"NOT_ALLOWED_KEY": "1"}, } @@ -348,7 +348,7 @@ def test_not_allowed_field(self): def test_cast_field(self): res = BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": {"generate": {"number_field": "42"}, } @@ -359,7 +359,7 @@ def test_cast_field(self): def test_required_field(self): with self.assertRaisesRegex(ValueError, "'required_field' is a required field, but template returned empty string"): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": {"generate": {"required_field": ""}, } @@ -367,7 +367,7 @@ def test_required_field(self): with self.assertRaisesRegex(ValueError, "'name' is missing in generated keys"): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": {"generate": {"description": ""}, } @@ -375,7 +375,7 @@ def test_required_field(self): with self.assertRaisesRegex(ValueError, "'name' is a required field, but template returned empty string"): BulkGenerator({ - "version": "0.1.0", + "version": "1.0.0", "input": {}, "templates": [], "output": {"generate": {"name": "", "description": "AA"}, } diff --git a/inventree_bulk_plugin/version.py b/inventree_bulk_plugin/version.py index f851254..d12ede8 100644 --- a/inventree_bulk_plugin/version.py +++ b/inventree_bulk_plugin/version.py @@ -1 +1 @@ -BULK_PLUGIN_VERSION = "0.1.0" +BULK_PLUGIN_VERSION = "1.0.0"