2021.4.6 - Bessere Projektstruktur #20

Closed
opened 2021-04-03 14:16:22 +02:00 by edraft · 1 comment
Owner

Die Idee wäre die Projekt struktur ähnlich wie bei .NET Core anzulegen:

Ist-Zustand:
/src/app-name/__init__.py
/src/app-name/app-name.json
/src/app-name/application.py
/src/app-name/startup.py
/src/app-name/main.py

/src/lib-name/__init__.py
/src/lib-name/cli/application.py
/src/lib-name/cli/startup.py
/src/lib-name/cli/main.py
/src/lib-name/lib-name.json

/src/tests/__init__.py

/appsettings.json
/cpl.json
/LICENSE
/README.md
Soll-Zustand:
/src/app-name/__init__.py
/src/app-name/application.py
/src/app-name/appsettings.json
/src/app-name/startup.py
/src/app-name/main.py

/src/tests/__init__.py

/cpl.json
/LICENSE
/README.md
app-name/cpl-project.json:
{
  "ProjectSettings": {
    "Name": "app-name",
    "Version": {
      "Major": "0",
      "Minor": "0",
      "Micro": "0"
    },
    "Author": "",
    "AuthorEmail": "",
    "Description": "",
    "LongDescription": "",
    "URL": "",
    "CopyrightDate": "",
    "CopyrightName": "",
    "LicenseName": "",
    "LicenseDescription": "",
    "Dependencies": [
      "sh_cpl==2021.4.0"
    ],
    "PythonVersion": ">=3.9.2",
    "PythonPath": {},
    "Classifiers": []
  },
  
  "BuildSettings": {
    "ProjectType": "console",
    "SourcePath": "",
    "OutputPath": "dist",
    "Main": "app-name.main",
    "EntryPoint": "app-name",
    "IncludePackageData": false,
    "Included": [],
    "Excluded": [
      "*/__pycache__",
      "*/logs",
      "*/tests"
    ],
    "PackageData": {}
  }
}
lib-name/cpl-project.json:
{
  "ProjectSettings": {
    "Name": "lib-name",
    "Version": {
      "Major": "0",
      "Minor": "0",
      "Micro": "0"
    },
    "Author": "",
    "AuthorEmail": "",
    "Description": "",
    "LongDescription": "",
    "URL": "",
    "CopyrightDate": "",
    "CopyrightName": "",
    "LicenseName": "",
    "LicenseDescription": "",
    "Dependencies": [
      "sh_cpl==2021.4.0"
    ],
    "PythonVersion": ">=3.9.2",
    "PythonPath": {},
    "Classifiers": []
  },
  
  "BuildSettings": {
    "ProjectType": "library",
    "SourcePath": "",
    "OutputPath": "dist",
    "Main": "app-name.main",
    "EntryPoint": "app-name",
    "IncludePackageData": false,
    "Included": [],
    "Excluded": [
      "*/__pycache__",
      "*/logs",
      "*/tests"
    ],
    "PackageData": {}
  }
}
cpl-workspace.json:
"Projects": [
	'app-name',
	'lib-name'
]
Die Idee wäre die Projekt struktur ähnlich wie bei .NET Core anzulegen: ##### Ist-Zustand: ``` /src/app-name/__init__.py /src/app-name/app-name.json /src/app-name/application.py /src/app-name/startup.py /src/app-name/main.py /src/lib-name/__init__.py /src/lib-name/cli/application.py /src/lib-name/cli/startup.py /src/lib-name/cli/main.py /src/lib-name/lib-name.json /src/tests/__init__.py /appsettings.json /cpl.json /LICENSE /README.md ``` ##### Soll-Zustand: ``` /src/app-name/__init__.py /src/app-name/application.py /src/app-name/appsettings.json /src/app-name/startup.py /src/app-name/main.py /src/tests/__init__.py /cpl.json /LICENSE /README.md ``` ##### app-name/cpl-project.json: ```json { "ProjectSettings": { "Name": "app-name", "Version": { "Major": "0", "Minor": "0", "Micro": "0" }, "Author": "", "AuthorEmail": "", "Description": "", "LongDescription": "", "URL": "", "CopyrightDate": "", "CopyrightName": "", "LicenseName": "", "LicenseDescription": "", "Dependencies": [ "sh_cpl==2021.4.0" ], "PythonVersion": ">=3.9.2", "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { "ProjectType": "console", "SourcePath": "", "OutputPath": "dist", "Main": "app-name.main", "EntryPoint": "app-name", "IncludePackageData": false, "Included": [], "Excluded": [ "*/__pycache__", "*/logs", "*/tests" ], "PackageData": {} } } ``` ##### lib-name/cpl-project.json: ```json { "ProjectSettings": { "Name": "lib-name", "Version": { "Major": "0", "Minor": "0", "Micro": "0" }, "Author": "", "AuthorEmail": "", "Description": "", "LongDescription": "", "URL": "", "CopyrightDate": "", "CopyrightName": "", "LicenseName": "", "LicenseDescription": "", "Dependencies": [ "sh_cpl==2021.4.0" ], "PythonVersion": ">=3.9.2", "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { "ProjectType": "library", "SourcePath": "", "OutputPath": "dist", "Main": "app-name.main", "EntryPoint": "app-name", "IncludePackageData": false, "Included": [], "Excluded": [ "*/__pycache__", "*/logs", "*/tests" ], "PackageData": {} } } ``` ##### cpl-workspace.json: ```json "Projects": [ 'app-name', 'lib-name' ] ```
edraft added the
question
label 2021-04-03 14:16:22 +02:00
Author
Owner

Build und Publish dist/ Pfad muss angepasst werden:

dist/projectname/build
dist/projectname/publish

Build und Publish dist/ Pfad muss angepasst werden: dist/projectname/build dist/projectname/publish
edraft changed title from Besser Projektstruktur to 2021.4.5 - Besser Projektstruktur 2021-04-07 07:44:07 +02:00
edraft removed the
question
label 2021-04-07 07:44:21 +02:00
edraft added this to the 2021.4 milestone 2021-04-07 07:44:23 +02:00
edraft added this to the Sprint 2021.4 project 2021-04-07 07:44:25 +02:00
edraft self-assigned this 2021-04-07 07:44:28 +02:00
edraft changed title from 2021.4.5 - Besser Projektstruktur to 2021.4.6 - Besser Projektstruktur 2021-04-07 07:44:42 +02:00
edraft added the
improvement
story
labels 2021-04-07 07:45:27 +02:00
edraft changed title from 2021.4.6 - Besser Projektstruktur to 2021.4.6 - Bessere Projektstruktur 2021-04-07 16:46:49 +02:00
edraft added a new dependency 2021-04-09 22:11:24 +02:00
edraft reopened this issue 2021-04-11 15:50:51 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Blocks
Reference: sh-edraft.de/sh_cpl#20
No description provided.