From 324f0696345fcae29e32e3044410465f0d91fa92 Mon Sep 17 00:00:00 2001 From: Max Hadley <149381671+maxhrhadley@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:41:13 +0100 Subject: [PATCH] docs(quickstart): add cookiecutter installation prerequisite (#191) * Update quickstart doc: add cookiecutter installation prerequisite * fix(actions): fixes conda setup in testing workflow --------- Co-authored-by: Solomon Yu <797346+sqr00t@users.noreply.github.com> --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++-------- docs/docs/quickstart.md | 2 ++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb28a571..d59ad2a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,7 @@ jobs: os: - ubuntu-latest - macos-latest + python-version: ["3.8", "3.9", "3.10", "3.11"] runs-on: ${{ matrix.os }} name: Run pytest steps: @@ -28,15 +29,24 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: test + channels: conda-forge,nodefaults + python-version: ${{ matrix.python-version }} + - name: Install Mac dependencies if: runner.os == 'macOS' run: | brew install coreutils direnv - $CONDA/bin/python -m pip install --upgrade pip - $CONDA/bin/python -m pip install -r requirements.txt - conda config --add channels conda-forge + which python + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + conda config --remove channels defaults + conda config --add channels conda-forge + conda config --add channels nodefaults $CONDA/bin/conda init bash - name: Fix Conda permissions on macOS @@ -47,14 +57,19 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update -y && sudo apt-get install -y direnv - $CONDA/bin/python -m pip install --upgrade pip - $CONDA/bin/python -m pip install -r requirements.txt + which python + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + conda config --remove channels defaults + conda config --add channels conda-forge + conda config --add channels nodefaults $CONDA/bin/conda init bash - name: Build docs run: | cd docs - $CONDA/bin/python -m mkdocs build + which python + python -m mkdocs build - name: Git config run: | @@ -81,4 +96,5 @@ jobs: - name: Run pytest run: | - $CONDA/bin/python -m pytest -vvv + which python + python -m pytest -vvv diff --git a/docs/docs/quickstart.md b/docs/docs/quickstart.md index 990daebb..4a101d06 100644 --- a/docs/docs/quickstart.md +++ b/docs/docs/quickstart.md @@ -6,6 +6,8 @@ In this page you will learn how to set up a project using the cookiecutter. The ### Project Configurer +_**Prerequisite**: If this is your first time setting up a cookiecutter project you need to install it from https://pypi.org/project/cookiecutter. You can do this in the terminal with `brew install cookiecutter`._ + 1. **Request repository setup**: First things first, you need a repo created for you. Submit a [Create a repo in the Nesta GitHub org](https://github.com/nestauk/github_support/issues/new/choose) issue from the [github_support](https://github.com/nestauk/github_support) issue page. You will need to provide a project name, suggested repo name, whether public/private, github teams involved, team leading the project, short and long description of the project. An empty repo will be set up for you and you will receive a notification when this is done. 2. **Set up your project locally**: It is important that you _do not clone the repo yet!_ Instead, follow these steps: