Closed ckunki closed 4 months ago
Related issue/pr: #153
https://exasol.github.io/python-toolbox/changes/unreleased.html
Partial Duplicate: #87
@Nicoretti consolidate
@ckunki, here's some feedback and context on the issue:
The settings provided in the documentation are examples. Exclusions can and should be defined by the project.
This issue is fixed but not yet released. See pull request #153.
These files could be generated, but if the project includes Sphinx documentation, it needs to have these files as they are a documentation requirement.
.github/workflows/checks.yml
: Missing StepUploading statistics/metrics is intended only for releases, as detailed in the CI-CD
workflow.
Not currently, because the workflow files can still be adjusted and need not exactly match what was generated. Customization based on extension points will be a feature in the future. Until then, workflows should be treated as if they were written manually, with the "generator" serving as a helper.
The settings provided in the documentation are examples. Exclusions can and should be defined by the project. References
You are right. I was also able to solve these problems by adding to file pyproject.toml
, below [tool.pylint.master]
:
ignore = [
"noxfile.py",
"version.py",
"noxconfig.py",
]
But I wanted to provide the fix to other users of the PTB, to enable jumping this hurdle quicker. Maybe we could add a sentence to the PTB documentation?
Maybe we could add a sentence to the PTB documentation?
Yeah, I think, we should mention, that some things need to configured manually per project and best also a list of what this includes
Here is another hint for excluding generated code from pylint in pyproject.toml
.
I propose adding a sentence to the documentation:
Additionally, the following section in file pyproject.toml
below [tool.pylint.master]
excludes all files below the specified directory to be excluded from linting. This can be necessary when you need to commit generated code.
ignore-paths = [
".*/exasol/saas/client/openapi/.*",
]
This issue does not appear to be a bug within the toolbox itself, but rather a configuration and project setup issue. Accordingly, most things will be addressed as part of Issue #166 on our GitHub repository.
Findings / Proposals for improvement
Linter settings prio :zero:
noxfile.py
noxconfig.py
version.py
As thresholds are tight, these linter problems cause the initial push to fail.
File
.github/workflows/checks.yml
: missing step prio :one:After step
Run Tests
there is another step missing:References to github workflows don't work prio :two:
exasol/toolbox/.github/workflows/xyz.yml@version
./.github/workflows/xyz.yml
Wrong reference to file version.py prio :five:
run: poetry run version-check exasol/toolbox/version.py
run: poetry run version-check version.py
Should some of the following files be included in file
.gitignore
? prio :nine:.lint.txt
.lint.json
.coverage
metrics.json
Wrong yaml indent in generated workflow
.github/workflows/checks.yml
prio :nine:build-documentation-job:
should be indented with 2 additional spacesMissing files prio :nine:
doc/conf.py
doc/index.rst
Missing folders prio :nine:
test
artifacts
File
.github/workflows/checks.yml
, step "Copy Artifacts into Root Folder" could be simplified prio :nine:cp .coverage/.coverage ../
.
),cp ./artifacts/.coverage/.coverage ./
GH Workflow Job "Generate Status Report" currently fails with
Proposals
Mark files as generated? prio :nine:
Should we mark the GH-workflow files, initially generated by PTB, as generated in file
.gitattributes
? See Git docu on using this file, GH docu for marking files as generated and project-keeper containing an example for using the file.Benefits: