Skip to content

Commit 2982fef

Browse files
committed
WIP migration guide
1 parent e41d1bd commit 2982fef

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

doc/user_guide/migrating.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Migrating Legacy Projects
2+
=========================
3+
4+
Migrating old projects to a new project setup and the :code:`python-toolbox` can be tedious and annoying. This guide will try to provide some basic steps and guidance to simplify this process.
5+
6+
.. _before_you_migrate:
7+
8+
What a Project Should Have Before You Migrate
9+
+++++++++++++++++++++++++++++++++++++++++++++
10+
11+
* The project configuration should be :code:`pyproject.toml` based. **[Required]**
12+
* The project should be :code:`poetry` based. **[Required]**
13+
* Dependencies should point only to officially published dependencies on PyPI (no git references or similar) **[Required]**.
14+
* The project documentation should be :code:`sphinx` based **[Required]**.
15+
* Automated tasks within the project should be available as Python code or `Nox`_ tasks. **[Helpful]**
16+
17+
18+
Iterative Migration Guide
19+
++++++++++++++++++++++++++
20+
21+
Ensure you comply with the basic requirements for your project. Follow these steps for a smooth migration process.
22+
23+
1. Introduce Nox
24+
----------------
25+
As a first step, it is generally advisable to introduce `Nox`_ as a task runner if it is not already in use. Since the :code:`python-toolbox` uses `Nox`_ as its foundation, this simplifies the migration to the toolbox and enhances the user's understanding of `Nox`_.
26+
27+
2. Introduce Python-Toolbox Nox Tasks
28+
-------------------------------------
29+
This can be done incrementally for different checks of your project, such as linting, typing, documentation, and other tasks.
30+
31+
.. note::
32+
If test execution isn't performed in the standard way (e.g., :code:`pytest test/unit`, :code:`pytest test/integration`, :code:`pytest test`), you will need to overwrite the test-specific Nox tasks and will not be able to use the default ones.
33+
34+
3. Establish a Baseline
35+
-----------------------
36+
Configure code quality and settings in the :code:`pyproject.toml` and establish a baseline for your project. If necessary, create tickets for further improvements, especially if major parts of your code need suppression, e.g., in the mypy configuration.
37+
38+
4. Introduce GitHub Workflows
39+
-----------------------------
40+
Install the GitHub workflow provided by the :code:`python-toolbox` for futher details refer to the section :ref:`GitHub Workflows`.
41+
42+
.. attention::
43+
This is just guidance. If you have a good understanding of the standard project setup, technologies, and tools used, feel free to diverge at any point or exercise your own judgment.
44+
45+
.. _Nox: https://github.com/exasol/python-toolbox/pull/289

doc/user_guide/user_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
getting_started
1111
workflows
1212
customization
13-
13+
migrating

doc/user_guide/workflows.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _GitHub Workflows:
2+
13
GitHub Workflows
24
================
35

0 commit comments

Comments
 (0)