diff --git a/CHANGELOG.md b/CHANGELOG.md index 881482e..a8428c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ # 2023-05-11 -- Initial version [ScrumLATAMComunidad] +- Initial version [macagua] diff --git a/README.rst b/README.rst index 5e55fc5..5c65754 100644 --- a/README.rst +++ b/README.rst @@ -8,6 +8,7 @@ The `Scrum Latam Comunidad `_ Website repo A new SCRUM LATAM Comunidad Website using Plone 6 and Volto technologies. + Quick start ----------- @@ -19,20 +20,83 @@ Development Setup - yarn - Docker + Install ~~~~~~~ +Install the requirements dependencies, executing the following command: + +.. code:: shell + + sudo apt install build-essential python3-dev python3-venv git tree curl + + +Download and install `Node Version Manager - NVM `_, +executing the following command: + +.. code:: shell + + curl -o- https://github.com/raw/nvm-sh/nvm/v0.39.3/install.sh | bash + + +Setting the ``nvm`` script into console environments to use it, executing the following command: + +.. code:: shell + + export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" \ + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + + +To reflect the ``nvm`` script changes in the terminal environments to use it, executing the following command: + +.. code:: shell + + source ~/.bashrc && exit + +Launch the terminal again and continues with execute the next commands. + +Install `Node 16 Version `_: + + +Download and install Node 16 Version, executing the following command: + +.. code:: shell + + nvm install 16 + +Enable the Node 16 Version to use it, executing the following command: + +.. code:: shell + + nvm use 16 + + +Install `yarn `_ tool, executing the following command: + .. code:: shell - git clone git@github.com:ScrumLATAMComunidad/slc-sitioweb.git - cd slc-sitioweb - sudo apt install make python3-venv npm install --global yarn + + +Clone and install the git repository, executing the following command: + +.. code:: shell + + git clone git@github.com:ScrumLATAMComunidad/slc-sitioweb.git slc-sitioweb && cd $_ + + +Install the dev stack, executing the following command: + +.. code:: shell + make install + Start ~~~~~ +Open two consoles to run each of the following commands in each of them: + Start the Backend (http://localhost:8080/) .. code:: shell @@ -45,6 +109,7 @@ Start the Frontend (http://localhost:3000/) make start-frontend + Help ~~~~ @@ -55,6 +120,7 @@ executing the following command: make help + Structure --------- @@ -63,19 +129,28 @@ This monorepo is composed by two distinct codebases: api and frontend. - **backend**: API (Backend) Plone installation using ``pip`` (not *buildout*). Includes a policy package named ``slc_sitioweb``. More details information at `backend/src/slc_sitioweb/README.md `_ file. + +- **devops**: Devops Deployments scripts por this monorepo. More details + information at `devops/README.md `_ file. + - **frontend**: React (Volto) package named frontend. More details information at `frontend/README.md `_ file. + Reasoning ~~~~~~~~~ - Repo contains all codebase needed to run the site (excluding existing addons for Plone and React). + - Github Workflows are triggered based on changes on each codebase (see ``.github/workflows``) + - Easier to create Docker images for each codebase + - Showcase Plone installation/setup without buildout + Linters and Formatting ---------------------- @@ -84,10 +159,11 @@ automatically format them, you can run ``make format`` -in the root folder or especifically in each backend or frontend folders. +in the root folder or specifically in each backend or frontend folders. Linters commands are available in each backend and frontend folder. + Acceptance tests ---------------- @@ -105,6 +181,7 @@ Fixture in dev mode ``test-acceptance``: Start Core Cypress Acceptance Tests in dev mode + Credits ------- diff --git a/backend/src/slc_sitioweb/CHANGES.md b/backend/src/slc_sitioweb/CHANGES.md index 9df546f..5ddbe02 100644 --- a/backend/src/slc_sitioweb/CHANGES.md +++ b/backend/src/slc_sitioweb/CHANGES.md @@ -1,7 +1,7 @@ # Changelog -## 1.0a1 (unreleased) +## 1.0.0a1 (unreleased) - Added the authomatic support via pas.plugins.authomatic addon for backend and volto-authomatic addon for frontend [macagua] diff --git a/backend/src/slc_sitioweb/src/slc_sitioweb/configure.zcml b/backend/src/slc_sitioweb/src/slc_sitioweb/configure.zcml index d6f7501..87caa7c 100644 --- a/backend/src/slc_sitioweb/src/slc_sitioweb/configure.zcml +++ b/backend/src/slc_sitioweb/src/slc_sitioweb/configure.zcml @@ -20,6 +20,8 @@ + + diff --git a/devops/README.md b/devops/README.md index 9995b4c..18489d4 100644 --- a/devops/README.md +++ b/devops/README.md @@ -20,11 +20,22 @@ Also, add a `prod.yml` file to `inventory` folder (with information about the pr ### Install Ansible -Install Python 3 virtual environment and Ansible +Access to ``devops`` directory, executing the following command: ```shell cd devops +``` + +For remove all build, test, coverage and Python artifacts, executing the following command: + +```shell make clean +``` + +For create Python 3 virtual environment and install [Ansible](https://www.ansible.com/) via ``pip`` tool, +executing the following command: + +```shell make setup ``` diff --git a/frontend/README.md b/frontend/README.md index 1410a4d..a7feacf 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,6 +1,6 @@ ## Documentation -A training on how to create your own website using Volto is available as part of the Plone training at [https://training.plone.org/5/volto/index.html](https://training.plone.org/5/volto/index.html). +A training on how to create your own website using Volto is available as part of the Plone training at [https://2022.training.plone.org/volto/index.html](https://2022.training.plone.org/volto/index.html). ## Quick Start @@ -61,7 +61,7 @@ yarn add -W mrs-developer ## Acceptance tests -In order to run localy (while developing) the project acceptance tests (Cypress), there are some `Makefile` commands in place (in the repo root). Run them in order: +In order to run locally (while developing) the project acceptance tests (Cypress), there are some `Makefile` commands in place (in the repo root). Run them in order: `start-test-acceptance-server`: Start server fixture in docker (previous build required)