diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 6d216b7..43a1f25 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -40,6 +40,13 @@ jobs: shell: bash if: steps.poetry-cache.outputs.cache-hit != 'true' run: | + # workaround start + # this is a pyyaml v5 vs cython v3 conflict workaround + # see https://github.com/alan-turing-institute/sqlsynthgen/issues/120 + python -m poetry run pip install "cython<3" + python -m poetry run pip install wheel + python -m poetry run pip install --no-build-isolation "pyyaml==5.4.1" + # workaround end python -m poetry install --all-extras - name: Install Pre-Commit shell: bash diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8fe7a8f..d5cc038 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,6 +46,13 @@ jobs: shell: bash if: steps.poetry-cache.outputs.cache-hit != 'true' run: | + # workaround start + # this is a pyyaml v5 vs cython v3 conflict workaround + # see https://github.com/alan-turing-institute/sqlsynthgen/issues/120 + python -m poetry run pip install "cython<3" + python -m poetry run pip install wheel + python -m poetry run pip install --no-build-isolation "pyyaml==5.4.1" + # workaround end python -m poetry install --all-extras - name: Create src database shell: bash diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 5325a0d..078c85a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,6 +14,13 @@ build: # nodejs: "19" # rust: "1.64" # golang: "1.19" + jobs: + # This pre-install job is a pyyaml v5 vs cython v3 conflict workaround + # see https://github.com/alan-turing-institute/sqlsynthgen/issues/120 + pre_install: + - pip install "cython<3" + - pip install wheel + - pip install --no-build-isolation "pyyaml==5.4.1" # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2850774..dc0deb1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,16 @@ Please install the following software on your workstation: poetry install --all-extras ``` - *If you don't need to [build the project documentation](#building-documentation-locally), run instead just `poetry install`* + If Poetry errors when installing PyYaml, you will need to manually specify the Cython version and manually install PyYaml (this is a temporary workaround for a PyYaml v5 conflict with Cython v3, see [here](https://github.com/yaml/pyyaml/issues/601) for full details): + + ```bash + poetry run pip install "cython<3" + poetry run pip install wheel + poetry run pip install --no-build-isolation "pyyaml==5.4.1" + poetry install --all-extras + ``` + + *If you don't need to [build the project documentation](#building-documentation-locally), run instead just `poetry install`.* 1. Install the git hook scripts. They will run whenever you perform a commit: diff --git a/docs/source/installation.rst b/docs/source/installation.rst index db24d24..01189ec 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -6,13 +6,23 @@ Installation End User -------- -To use sqlsynthgen, first install it: +To use SqlSynthGen, first install it: .. code-block:: console $ pip install sqlsynthgen -and check that you can view the help message with: + +If Pip errors when installing PyYaml, you will need to manually specify the Cython version and manually install PyYaml (this is a temporary workaround for a PyYaml v5 conflict with Cython v3, see `here `_ for full details): + +.. code-block:: console + + pip install "cython<3" + pip install wheel + pip install --no-build-isolation "pyyaml==5.4.1" + pip install sqlsynthgen + +Check that you can view the help message with: .. code-block:: console