@voxgig/create-sdkgen 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/bin/voxgig-create-sdkgen +196 -0
  2. package/dist/create-sdkgen.d.ts +8 -8
  3. package/dist/create-sdkgen.js +60 -70
  4. package/dist/create-sdkgen.js.map +1 -1
  5. package/dist/standard/ModelSdk.js +7 -67
  6. package/dist/standard/ModelSdk.js.map +1 -1
  7. package/dist/standard/Root.js +54 -19
  8. package/dist/standard/Root.js.map +1 -1
  9. package/dist/tsconfig.tsbuildinfo +1 -1
  10. package/package.json +13 -10
  11. package/src/create-sdkgen.ts +50 -85
  12. package/src/standard/ModelSdk.ts +8 -85
  13. package/src/standard/Root.ts +22 -25
  14. package/bin/run-create-sdkgen.js +0 -330
  15. package/bin/run-create-sdkgen.js~ +0 -1
  16. package/src/utility.ts +0 -8
  17. package/tm/standard/.env.local +0 -2
  18. package/tm/standard/build/doc.js +0 -23
  19. package/tm/standard/build/sdk.js +0 -22
  20. package/tm/standard/def/DEFINITION.md +0 -4
  21. package/tm/standard/model/.model-config/model-config.jsonic +0 -15
  22. package/tm/standard/model/go.jsonic +0 -6
  23. package/tm/standard/model/js.jsonic +0 -6
  24. package/tm/standard/model/php.jsonic +0 -6
  25. package/tm/standard/model/py.jsonic +0 -7
  26. package/tm/standard/model/rb.jsonic +0 -6
  27. package/tm/standard/package.json +0 -31
  28. package/tm/standard/src/DocStaticRoot.ts +0 -32
  29. package/tm/standard/src/Root.ts +0 -62
  30. package/tm/standard/src/go/Entity_go.ts +0 -226
  31. package/tm/standard/src/go/MainEntity_go.ts +0 -26
  32. package/tm/standard/src/go/Main_go.ts +0 -168
  33. package/tm/standard/src/go/Quick_go.ts +0 -108
  34. package/tm/standard/src/go/ReadmeInstall_go.ts +0 -19
  35. package/tm/standard/src/go/ReadmeQuick_go.ts +0 -45
  36. package/tm/standard/src/go/TestAcceptEntity_go.ts +0 -219
  37. package/tm/standard/src/go/TestAccept_go.ts +0 -38
  38. package/tm/standard/src/go/TestEntity_go.ts +0 -79
  39. package/tm/standard/src/go/TestMain_go.ts +0 -61
  40. package/tm/standard/src/go/Test_go.ts +0 -20
  41. package/tm/standard/src/js/Entity_js.ts +0 -196
  42. package/tm/standard/src/js/MainEntity_js.ts +0 -22
  43. package/tm/standard/src/js/Main_js.ts +0 -154
  44. package/tm/standard/src/js/Quick_js.ts +0 -81
  45. package/tm/standard/src/js/ReadmeInstall_js.ts +0 -19
  46. package/tm/standard/src/js/ReadmeQuick_js.ts +0 -27
  47. package/tm/standard/src/js/TestAcceptEntity_js.ts +0 -101
  48. package/tm/standard/src/js/TestAccept_js.ts +0 -60
  49. package/tm/standard/src/js/TestEntity_js.ts +0 -24
  50. package/tm/standard/src/js/TestMain_js.ts +0 -123
  51. package/tm/standard/src/js/Test_js.ts +0 -24
  52. package/tm/standard/src/php/Entity_php.ts +0 -97
  53. package/tm/standard/src/php/MainEntity_php.ts +0 -43
  54. package/tm/standard/src/php/Main_php.ts +0 -50
  55. package/tm/standard/src/php/Quick_php.ts +0 -59
  56. package/tm/standard/src/php/TestAcceptEntity_php.ts +0 -81
  57. package/tm/standard/src/php/TestAccept_php.ts +0 -33
  58. package/tm/standard/src/php/TestEntity_php.ts +0 -64
  59. package/tm/standard/src/php/TestMain_php.ts +0 -120
  60. package/tm/standard/src/php/Test_php.ts +0 -21
  61. package/tm/standard/src/py/Entity_py.ts +0 -98
  62. package/tm/standard/src/py/MainEntity_py.ts +0 -19
  63. package/tm/standard/src/py/Main_py.ts +0 -211
  64. package/tm/standard/src/py/Quick_py.ts +0 -133
  65. package/tm/standard/src/py/TestAcceptEntity_py.ts +0 -47
  66. package/tm/standard/src/py/TestAccept_py.ts +0 -77
  67. package/tm/standard/src/py/TestEntity_py.ts +0 -50
  68. package/tm/standard/src/py/TestMain_py.ts +0 -103
  69. package/tm/standard/src/py/Test_py.ts +0 -28
  70. package/tm/standard/src/rb/Client_rb.ts +0 -142
  71. package/tm/standard/src/rb/Entity_rb.ts +0 -153
  72. package/tm/standard/src/rb/Error_rb.ts +0 -56
  73. package/tm/standard/src/rb/MainEntity_rb.ts +0 -16
  74. package/tm/standard/src/rb/Main_rb.ts +0 -55
  75. package/tm/standard/src/rb/Quick_rb.ts +0 -65
  76. package/tm/standard/src/rb/ReadmeInstall_rb.ts +0 -19
  77. package/tm/standard/src/rb/ReadmeQuick_rb.ts +0 -30
  78. package/tm/standard/src/rb/TestAcceptEntity_rb.ts +0 -83
  79. package/tm/standard/src/rb/TestAccept_rb.ts +0 -45
  80. package/tm/standard/src/rb/TestEntity_rb.ts +0 -82
  81. package/tm/standard/src/rb/TestMain_rb.ts +0 -67
  82. package/tm/standard/src/rb/Test_rb.ts +0 -27
  83. package/tm/standard/src/tsconfig.json +0 -15
  84. package/tm/standard/tm/go/.env.example +0 -2
  85. package/tm/standard/tm/go/LICENSE +0 -22
  86. package/tm/standard/tm/go/go.mod +0 -5
  87. package/tm/standard/tm/go/go.sum +0 -2
  88. package/tm/standard/tm/js/LICENSE +0 -22
  89. package/tm/standard/tm/js/package.json +0 -17
  90. package/tm/standard/tm/php/LICENSE +0 -22
  91. package/tm/standard/tm/py/LICENSE +0 -22
  92. package/tm/standard/tm/py/MANIFEST.in +0 -4
  93. package/tm/standard/tm/py/Makefile +0 -14
  94. package/tm/standard/tm/py/pyproject.toml +0 -4
  95. package/tm/standard/tm/py/pytest.ini +0 -3
  96. package/tm/standard/tm/py/requirements.txt +0 -4
  97. package/tm/standard/tm/py/setup.cfg +0 -2
  98. package/tm/standard/tm/py/setup.py +0 -82
  99. package/tm/standard/tm/rb/.rspec +0 -1
  100. package/tm/standard/tm/rb/Gemfile +0 -21
  101. package/tm/standard/tm/rb/LICENSE +0 -22
  102. package/tm/standard/tm/rb/Rakefile +0 -6
  103. package/tm/standard/tm/rb/spec/spec_helper.rb +0 -22
  104. package/tm/standard/tm/rb/tm.gemspec +0 -39
@@ -1,83 +0,0 @@
1
-
2
- import { cmp, camelify, Content } from '@voxgig/sdkgen'
3
-
4
-
5
- const TestAcceptEntity = cmp(function TestEntity(props: any) {
6
- const { entity } = props
7
-
8
- entity.Name = camelify(entity.name)
9
-
10
- Content(`
11
- describe '${entity.name}-load' do
12
- it 'loads the entity correctly' do
13
- out = @client.${entity.Name}.load(id: 't01')
14
- # puts '${entity.name}-load', out
15
-
16
- expect(out.data).to be_a(Hash)
17
- end
18
- end
19
-
20
- describe '${entity.name}-list' do
21
- it 'lists the entity correctly' do
22
- out = @client.${entity.Name}.list
23
- # puts '${entity.name}-list', out
24
-
25
- expect(out).to be_a(Array)
26
- end
27
- end
28
-
29
- describe '${entity.name}-create' do
30
- it 'creates the entity correctly' do
31
- out = @client.${entity.Name}.create(${JSON.stringify(generateObjectFromFields(entity.field))})
32
- # puts '${entity.name}-create', out
33
-
34
- expect(out.data).to be_a(Hash)
35
- end
36
- end
37
-
38
- describe '${entity.name}-save' do
39
- it 'saves the entity correctly' do
40
- out = @client.${entity.Name}.save(${JSON.stringify(generateObjectFromFields(entity.field))})
41
- # puts '${entity.name}-save', out
42
-
43
- expect(out.data).to be_a(Hash)
44
- end
45
- end
46
-
47
- describe '${entity.name}-remove' do
48
- it 'removes the entity correctly' do
49
- out = @client.${entity.Name}.remove(id: 't01')
50
- # puts '${entity.name}-remove', out
51
-
52
- expect(out.data).to be_a(Hash)
53
- end
54
- end
55
-
56
- `);
57
- })
58
-
59
- function generateObjectFromFields(fields: any) {
60
- const getRandomString = (length: number): string =>
61
- Array.from({ length }, () => 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(Math.random() * 62))).join('');
62
-
63
- const defaultValues: Record<string, any> = {
64
- number: Math.floor(Math.random() * 100),
65
- string: getRandomString(5),
66
- object: { [getRandomString(3)]: getRandomString(3) },
67
- boolean: Math.random() > 0.5,
68
- array: Array.from({ length: 3 }, () => getRandomString(3)),
69
- }
70
-
71
- const result: Record<string, any> = {}
72
-
73
- for (const key in fields) {
74
- result[key] = defaultValues[fields[key].type] ?? null;
75
- }
76
-
77
- return result
78
- }
79
-
80
-
81
- export {
82
- TestAcceptEntity
83
- }
@@ -1,45 +0,0 @@
1
-
2
- import { cmp, each, File, Content } from '@voxgig/sdkgen'
3
-
4
-
5
- import { TestAcceptEntity } from "./TestAcceptEntity_rb"
6
-
7
-
8
- const TestAccept = cmp(function TestMain_js(props: any) {
9
- const { build } = props
10
- const { model } = props.ctx$
11
-
12
-
13
- File({ name: model.name + '_sdk_spec.rb' }, () => {
14
-
15
- Content(`
16
- RSpec.describe '${model.Name}SDK::Client Acceptance Tests' do
17
- before(:each) do
18
- @client = ${model.Name}SDK::Client.new(
19
- apikey: ENV['${model.NAME}_APIKEY'],
20
- endpoint: ENV['${model.NAME}_ENDPOINT']
21
- )
22
- end
23
-
24
- it 'happy' do
25
- out = @client.Geofence.load(id: 'gf01')
26
- # puts 'Geofence-load', out.inspect
27
- expect(out.data[:id]).to eq('gf01')
28
- end
29
- `)
30
-
31
- each(model.main.sdk.entity, (entity: any) => {
32
- TestAcceptEntity({ model, build, entity })
33
- })
34
-
35
- Content(`end`)
36
-
37
-
38
- })
39
- })
40
-
41
-
42
- export {
43
- TestAccept
44
- }
45
-
@@ -1,82 +0,0 @@
1
- import {
2
- cmp,
3
- camelify,
4
- Content,
5
- } from '@voxgig/sdkgen';
6
-
7
- const TestEntity = cmp(function TestEntity(props: any) {
8
- const { entity, model } = props;
9
-
10
- entity.Name = camelify(entity.name);
11
-
12
-
13
- Content(`
14
- describe '${entity.name}-load' do
15
- it 'loads the entity with the correct data' do
16
- stub_request(:get, "http://example.com/${entity.name}/t01")
17
- .to_return(body: { id: 't01', title: 'T01' }.to_json, headers: { 'Content-Type' => 'application/json' })
18
-
19
- out = @client.${entity.Name}.load(id: 't01')
20
- expect(out.data).to eq({ id: 't01', title: 'T01' })
21
- end
22
- end
23
-
24
- describe '${entity.name}-list' do
25
- it 'lists the entities with the correct data' do
26
- stub_request(:get, "http://example.com/${entity.name}")
27
- .to_return(body: {name: '${entity.name}' ,list:[{ id: 't01', title: 'T01' }, { id: 't02', title: 'T02' }]}.to_json, headers: { 'Content-Type' => 'application/json' })
28
-
29
- out = @client.${entity.Name}.list
30
- expect(out).to be_an(Array)
31
-
32
- end
33
- end
34
- `);
35
-
36
- // const entityTestCases: Record<string,any> = {
37
- // create: {
38
- // requestBody: `{ id: 't01', title: 'T01' }`,
39
- // responseBody: `{ id: 't01', title: 'T01' }`,
40
- // description: 'creates the entity with the correct data'
41
- // },
42
- // save: {
43
- // requestBody: `{ id: 't01', title: 'T01' }`,
44
- // responseBody: `{ id: 't01', title: 'T01' }`,
45
- // description: 'saves the entity with the correct data'
46
- // },
47
- // load: {
48
- // idParam: 't01',
49
- // requestBody: `{ id: 't01' }`,
50
- // responseBody: `{ id: 't01', title: 'T01' }`,
51
- // description: 'loads the entity with the correct data'
52
- // },
53
- // list: {
54
- // responseBody: `{ name: '${entity.name}', list: [{ id: 't01', title: 'T01' }, { id: 't02', title: 'T02' }]}`,
55
- // description: 'lists the entities with the correct data'
56
- // },
57
- // remove: {
58
- // idParam: 't01',
59
- // requestBody: `{ id: 't01' }`,
60
- // description: 'removes the entity with the correct data'
61
- // },
62
- // }
63
-
64
- // Object.keys(entity.op).forEach((op: any) => {
65
- // const testData = entityTestCases[op];
66
- // Content(`
67
-
68
- // describe('${entity.name}-${op}') do
69
- // it '${testData.description}' do
70
- // stub_request(:${entity.op[op].method}, "http://example.com/${entity.name}${testData.idParam ? `/${testData.idParam}` : ''}")
71
- // .to_return(body: ${testData.responseBody ? testData.responseBody : `''`}.to_json, headers: { 'Content-Type' => 'application/json' })
72
-
73
- // out = @client.${entity.Name}().${op}(${testData.requestBody ? testData.requestBody : ``})
74
- // expect(${op == 'list' ? 'out' : 'out.data'}).to eq(${testData.responseBody ? testData.responseBody : ''})
75
- // end
76
- // end
77
-
78
- // `);
79
- // })
80
- });
81
-
82
- export { TestEntity };
@@ -1,67 +0,0 @@
1
- import {
2
- cmp,
3
- each,
4
- File,
5
- Content,
6
- snakify,
7
- } from '@voxgig/sdkgen';
8
-
9
- import { TestEntity } from './TestEntity_rb'
10
-
11
- const TestMain = cmp(function TestMain(props: any) {
12
- const { build } = props
13
- const { model } = props.ctx$
14
-
15
-
16
- File({ name: snakify(model.name) + "_sdk_spec.rb" }, () => {
17
- Content(`
18
- RSpec.describe '${model.Name}SDK::Client Unit Tests' do
19
- before(:each) do
20
- ${model.Name}SDK.configure do |config|
21
- config.options = {
22
- endpoint: 'http://example.com',
23
- apikey: 'test_api_key',
24
- }
25
- end
26
- @client = ${model.Name}SDK::Client.new
27
- end
28
-
29
- describe '.configure' do
30
- it 'creates a new client with the given options' do
31
- expected_options = { apikey: 'test_api_key', endpoint: 'http://example.com' }
32
- expect(@client).to be_a(${model.Name}SDK::Client)
33
- expect(@client.options).to include(expected_options)
34
- end
35
-
36
- it 'merges the options with the default options' do
37
- expected_options = { apikey: 'another_api_key', endpoint: 'http://example.com' }
38
- another_client = ${model.Name}SDK::Client.new(apikey: 'another_api_key')
39
- expect(another_client.options).to include(expected_options)
40
- end
41
- end
42
-
43
- describe '#initialize' do
44
- it 'sets the options' do
45
- expected_options = { apikey: 'test_api_key', endpoint: 'http://example.com' }
46
- expect(@client.options).to include(expected_options)
47
- end
48
- end
49
-
50
- `);
51
-
52
- each(model.main.sdk.entity, (entity: any) => {
53
- TestEntity({ model, build, entity });
54
- });
55
-
56
- Content(`
57
-
58
- end
59
-
60
- `);
61
- });
62
- })
63
-
64
- export {
65
- TestMain
66
- }
67
-
@@ -1,27 +0,0 @@
1
-
2
- import { cmp, File, Content, Folder, Copy } from '@voxgig/sdkgen'
3
-
4
- import { Quick } from './Quick_rb'
5
- import { TestMain } from './TestMain_rb'
6
- import { TestAccept } from './TestAccept_rb'
7
-
8
-
9
- const Test = cmp(function Test(props: any) {
10
- const { build } = props
11
-
12
- Copy({ from: "tm/" + build.name + "/.rspec", name: ".rspec" });
13
-
14
- Folder({ name: 'spec' }, () => {
15
- Copy({ from: "tm/" + build.name + "/spec/spec_helper.rb", name: "spec_helper.rb" });
16
- Quick({ build })
17
- TestMain({ build })
18
- Folder({ name: 'integration' }, () => {
19
- TestAccept({ build })
20
- })
21
- })
22
- })
23
-
24
-
25
- export {
26
- Test
27
- }
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "esModuleInterop": true,
4
- "module": "nodenext",
5
- "noEmitOnError": true,
6
- "outDir":"../dist",
7
- "rootDir":".",
8
- "resolveJsonModule": true,
9
- "sourceMap": true,
10
- "strict": true,
11
- "target": "es2021",
12
- "declaration": true,
13
- "declarationDir": "../dist"
14
- }
15
- }
@@ -1,2 +0,0 @@
1
- $$NAME$$_ENDPOINT=<URL>
2
- $$NAME$$_APIKEY=<API_KEY>
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) $$year$$ $$Name$$
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
@@ -1,5 +0,0 @@
1
- module github.com/plantquest/plantquest-sdk
2
-
3
- go 1.23.0
4
-
5
- require github.com/joho/godotenv v1.5.1
@@ -1,2 +0,0 @@
1
- github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
2
- github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) $$year$$ $$Name$$
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
@@ -1,17 +0,0 @@
1
- {
2
- "name": "$$name$$-sdk",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "src/$$Name$$SDK.js",
6
- "scripts": {
7
- "test": "node --test test/*.test.js",
8
- "test-accept": "node --test test/accept/*.test.js",
9
- "test-all": "npm run test && npm run test-accept"
10
- },
11
- "author": "$$Name$$",
12
- "license": "MIT",
13
- "devDependencies": {
14
- "@hapi/code": "^9.0.3",
15
- "dotenv": "^16.4.5"
16
- }
17
- }
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) $$year$$ $$Name$$
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) $$year$$ $$Name$$
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
@@ -1,4 +0,0 @@
1
- include setup.py
2
- include MANIFEST.in
3
- include LICENSE
4
- include README.md
@@ -1,14 +0,0 @@
1
- py_test_local: # Run tests without the need to install first
2
- python3 setup.py pytest --addopts --ignore=tests/accept
3
- py_test_accept:
4
- python3 setup.py pytest --addopts tests/accept
5
- py_test:
6
- pytest -s
7
-
8
- py_install:
9
- python3 setup.py install
10
-
11
- py_build:
12
- python3 setup.py build
13
-
14
-
@@ -1,4 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=61.0"]
3
- build-backend = "setuptools.build_meta"
4
-
@@ -1,3 +0,0 @@
1
- # content of pytest.ini
2
- [pytest]
3
- addopts = -s
@@ -1,4 +0,0 @@
1
- pytest
2
- python-dotenv
3
- pydantic
4
- requests
@@ -1,2 +0,0 @@
1
- # [aliases]
2
- # test=pytest
@@ -1,82 +0,0 @@
1
- #!/usr/bin/env python3
2
-
3
- # -*- encoding: utf-8 -*-
4
-
5
- import io
6
- from glob import glob
7
- from os.path import basename
8
- from os.path import dirname
9
- from os.path import join
10
- from os.path import splitext
11
-
12
- from setuptools import find_packages
13
- from setuptools import setup
14
-
15
-
16
- '''
17
- classifiers=[
18
- # complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers
19
- 'Development Status :: 5 - Production/Stable',
20
- 'Intended Audience :: Developers',
21
- 'License :: OSI Approved :: BSD License',
22
- 'Operating System :: Unix',
23
- 'Operating System :: POSIX',
24
- 'Operating System :: Microsoft :: Windows',
25
- 'Programming Language :: Python',
26
- 'Programming Language :: Python :: 2.7',
27
- 'Programming Language :: Python :: 3',
28
- 'Programming Language :: Python :: 3.5',
29
- 'Programming Language :: Python :: 3.6',
30
- 'Programming Language :: Python :: 3.7',
31
- 'Programming Language :: Python :: 3.8',
32
- 'Programming Language :: Python :: 3.9',
33
- 'Programming Language :: Python :: Implementation :: CPython',
34
- 'Programming Language :: Python :: Implementation :: PyPy',
35
- # uncomment if you test on these interpreters:
36
- # 'Programming Language :: Python :: Implementation :: IronPython',
37
- # 'Programming Language :: Python :: Implementation :: Jython',
38
- # 'Programming Language :: Python :: Implementation :: Stackless',
39
- 'Topic :: Utilities',
40
- ],
41
- '''
42
-
43
- def read(*names, **kwargs):
44
- with io.open(
45
- join(dirname(__file__), *names),
46
- encoding=kwargs.get('encoding', 'utf8')
47
- ) as fh:
48
- return fh.read()
49
-
50
- def read_version(fname="src/$$name$$_sdk/version.py"):
51
- exec(compile(open(fname, encoding="utf-8").read(), fname, "exec"))
52
- return locals()["__version__"]
53
-
54
- setup(
55
- name='$$name$$_sdk',
56
- version='0.0.1',
57
- license='MIT',
58
- description='An example SDK.',
59
- long_description='Long description of SDK',
60
- author='$$Name$$ Ltd',
61
- url='https://github.com/$$name$$',
62
- packages=find_packages('src'),
63
- package_dir={'': 'src'},
64
- # py_modules=['$$name$$_sdk/example'],
65
-
66
- # py_modules=[splitext(basename(path))[0] for path in glob('src/$$name$$_sdk/*.py')],
67
- include_package_data=True,
68
- # data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']), ('config', ['cfg/data.cfg'])],
69
- zip_safe=False,
70
- keywords=[
71
- ],
72
- python_requires='>=3.0',
73
- install_requires=[
74
- 'python-dotenv>=1.0.1',
75
- 'pydantic>=2.8.0'
76
- ],
77
- extras_require={"dev": [ "pytest" ]},
78
- setup_requires=[
79
- 'pytest-runner',
80
- ],
81
- tests_require=['pytest']
82
- )
@@ -1 +0,0 @@
1
- --require spec_helper
@@ -1,21 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- # General dependencies
6
- gem 'json', '~> 2.7'
7
- gem 'rake', '~> 13.2'
8
-
9
- # Test dependencies
10
- group :test do
11
- gem 'rspec', '~> 3.10'
12
- gem "rspec-json_expectations", "~> 2.2"
13
- gem 'webmock', '~> 3.23'
14
- gem 'simplecov', '~> 0.22'
15
- gem 'codecov', require: false
16
- end
17
-
18
- # Development and test dependencies
19
- group :development, :test do
20
- gem 'pry', '~> 0.14'
21
- end
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) $$year$$ $$Name$$
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: :spec
@@ -1,22 +0,0 @@
1
- require 'bundler/setup'
2
- require 'rspec'
3
- require 'webmock/rspec'
4
- require 'plantquest_sdk'
5
-
6
- WebMock.disable_net_connect!(allow_localhost: true)
7
-
8
- RSpec.configure do |config|
9
- # Enable flags like --only-failures and --next-failure
10
- config.example_status_persistence_file_path = ".rspec_status"
11
-
12
- config.expect_with :rspec do |expectations|
13
- # This options is used to enable RSpec to display the chain clauses in the error message
14
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
15
- end
16
-
17
- config.mock_with :rspec do |mocks|
18
- # Prevents you from mocking or stubbing a method that does not exist on
19
- mocks.verify_partial_doubles = true
20
- end
21
-
22
- end