-
Notifications
You must be signed in to change notification settings - Fork 2
#705: Described how the versions of poetry and python are retrieved #716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ckunki
merged 9 commits into
main
from
doc/705-User_guide_Retrieve_versions_of_poetry_and_python
Feb 19, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bda5341
#705: Described how the versions of poetry and python are retrieved
ckunki 3af37da
Merge branch 'main' into doc/705-User_guide_Retrieve_versions_of_poet…
ckunki a8b31d1
Apply suggestions from code review
ckunki bfd7c9f
Updated user guide based on review findings
ckunki f893794
Added notes on Sonar token
ckunki 12e9631
Merge branch 'main' into doc/705-User_guide_Retrieve_versions_of_poet…
ckunki 616c23e
Apply suggestions from code review
ckunki 6639ebc
Updated user guide on overriding minimum_python_version
ckunki 24c8f35
Removed obsolete file from doc
ckunki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
doc/user_guide/features/github_workflows/configuration.rst
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
doc/user_guide/features/github_workflows/create_and_update.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| .. _update_github_workflows: | ||
|
|
||
| Creating and Updating the GitHub Workflows in Your Project | ||
| ========================================================== | ||
|
|
||
| PTB can initially generate the GitHub workflows in your project and also | ||
| update existing workflows. | ||
|
|
||
| The workflows are based on Jinja templates with variables populated by the | ||
| PTB. The PTB reads the values from various places within your project, see | ||
| :ref:`template_variables`. | ||
|
|
||
| Please note that the PTB only updates the values in the GitHub workflows when | ||
| *updating* the workflows. So, after updating the :ref:`list of Python versions | ||
| <python_versions>` in file ``noxconfig.py``, you need to :ref:`re-generate | ||
| <update_workflows>` the GitHub workflows. | ||
|
|
||
| Poetry Version | ||
| -------------- | ||
|
|
||
| PTB has a default value for the Poetry version but you can override it in file | ||
| ``noxconfig.py``, e.g. | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| PROJECT_CONFIG = Config( | ||
| dependency_manager=DependencyManager(name="poetry", version="2.3.0"), | ||
| ) | ||
|
|
||
| .. _python_versions: | ||
|
|
||
| Versions of Python and Exasol Docker DB | ||
| --------------------------------------- | ||
|
|
||
| Many workflows are using a Build-matrix to iterate over multiple versions of | ||
| Python and/or the Exasol Docker DB. This is to make sure your code is valid, | ||
| free of bugs and working correctly for each combination of these items. | ||
|
|
||
| PTB has a default for these versions, but you can override it in file | ||
| ``noxconfig.py``, e.g. | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| PROJECT_CONFIG = Config( | ||
| python_versions=("3.10", "3.12), | ||
| exasol_versions=("7.1.30", "8.29.13", "2025.1.8"), | ||
| ) | ||
|
|
||
| Some workflows are expected to not depend on a specific Python version and | ||
| will use only the lowest Python version in the list specified above. | ||
|
|
||
| .. _update_workflows: | ||
|
|
||
| Add all Workflows to Your Project | ||
| --------------------------------- | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| tbx workflow install all | ||
|
|
||
| .. warning:: | ||
| #. If you already have various workflows, you may want to run the | ||
| :code:`update` command instead of the :code:`install` command. | ||
|
|
||
| #. Some workflows depend on other workflows. Please ensure you have all | ||
| the required workflows if you do not install all of them. |
49 changes: 49 additions & 0 deletions
49
doc/user_guide/features/github_workflows/github_project_configuration.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| .. _github_project_configuration: | ||
|
|
||
| GitHub Project Configuration | ||
| ============================ | ||
|
|
||
| Branch Protection | ||
| ----------------- | ||
|
|
||
| The best and most maintainable way to have solid branch protection | ||
| (:code:`Settings/Branches/main`) is to require the workflow :code:`CI / Allow | ||
| Merge` to pass successfully. | ||
|
|
||
| .. note:: | ||
| Setting the required status checks to pass before merging is only possible | ||
| after running a CI build at **least once** on the affected branch. | ||
|
|
||
| Manual Approval | ||
| --------------- | ||
|
|
||
| If your CI workflow involves slow or expensive steps you can guard these to be | ||
| executed only after manual approval. The CI workflow will automatically create | ||
| a GitHub environment named :code:`manual-approval`. You only need to add | ||
| reviewers in (:code:`Settings/Environments/manual-approval`) and move the | ||
| steps to be guarded into the related section in job :code:`slow-checks` in | ||
| file :code:`.github/workflows/merge-gate.yml`. | ||
|
|
||
| Secrets | ||
| ------- | ||
|
|
||
| For accessing specific services in the Internet, your project often needs a | ||
| related *token* or other credentials. These credentials can be acquired by | ||
| registering on the service's website. | ||
|
|
||
| In many cases your company or organization may manage the credentials | ||
| centrally and enable the use in multiple projects. The credentials can be | ||
| managed as Secrets in GitHub and can be made accessible to GitHub projects and | ||
| used by their workflows. | ||
|
|
||
| In summary, your GitHub project may have individual secrets and/or secrets | ||
| inherited from the enclosing GitHub *Organization*. As soon as a secret is | ||
| accessible to your project, your GitHub workflows can use it and probably will | ||
| map it to *environment variables* that are used by your CI/CD automation. | ||
|
|
||
| * **PYPI_TOKEN**: This secret is required to publish your project on the | ||
| `Python Package Index <pypi_>`_ (PyPi). Most projects will use the | ||
| org-secret. | ||
| * **SONAR_TOKEN**: See :ref:`Sonar Configuration <sonar_configuration>`. | ||
|
|
||
| .. _pypi: https://pypi.org/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
doc/user_guide/features/github_workflows/template_variables.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| .. _template_variables: | ||
|
|
||
| Template Variables | ||
| ================== | ||
|
|
||
| Underlying the CLI, the PTB uses Jinja to dynamically generate project-specific | ||
| workflows. The rendering process is supported by the ``github_template_dict`` found in | ||
| your ``noxconfig.py::PROJECT_CONFIG``. This dictionary is inherited by default from | ||
| ``BaseConfig.py``, ensuring a standardized baseline that can be easily overridden, if | ||
| necessary. | ||
|
|
||
| .. literalinclude:: ../../../../exasol/toolbox/config.py | ||
| :language: python | ||
| :start-at: github_template_dict |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.