Skip to content

Commit

Permalink
Merge pull request #121 from alan-turing-institute/pyyaml-install-docs
Browse files Browse the repository at this point in the history
Pyyaml install docs
  • Loading branch information
mhauru authored Jul 19, 2023
2 parents d9c95a2 + 25711f0 commit c999d98
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 12 additions & 2 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/yaml/pyyaml/issues/601>`_ 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
Expand Down

0 comments on commit c999d98

Please sign in to comment.