Skip to content

Commit

Permalink
Improvements to Gitpod workspace and addition of Makefile for automat…
Browse files Browse the repository at this point in the history
…ion (#2737)

* 🆕 chore(Makefile): add Makefile to project
The Makefile was added to the project. It includes targets for testing, virtualenv management, and cleaning. The Makefile is intended to simplify the development process by providing a set of commands that can be run to perform common tasks.

* 🎉 feat(config.mak): add global Makefile configuration
Added a global Makefile configuration file that sets the default goal to 'help', exports all variables, sets the number of cores to use, sets the shell to bash, and sets the shell flags to exit on error, pipefail, and silent. Additionally, added color variables to improve the readability of the output.

* 🆕 feat(help.mak): add help command to Makefile
The help command is added to the Makefile to provide a list of available commands and their descriptions. The command uses grep and awk to parse the Makefile and display the commands in a formatted way.

* 🔍 chore(.gitignore): add .venv to ignore list
This commit adds .venv to the ignore list to prevent it from being tracked by git. This is important because virtual environments should not be committed to the repository as they can be easily recreated by running the requirements.txt file.

* 🆕 chore(.gitpod.yml): add Gitpod configuration file
This commit adds a new file `.gitpod.yml` which contains the configuration for Gitpod. The configuration specifies the Dockerfile to use for the workspace image and a task to run on workspace initialization. The task runs the `make bootstrap-dev` command to set up the development environment.

* 🔥 chore(requirements): remove requirements.dev.txt file
The requirements.dev.txt file was removed, likely because it was no longer needed or was replaced by a different file.

* 🆕 chore(python_version.config): add configuration file for Python version
A new configuration file has been added to the project to specify the version of Python to be used. The file is located at `.config/python_version.config` and contains a single line specifying the Python version as `3.10`.

* 🎉 feat(Dockerfile): add Dockerfile for Gitpod workspace
This commit adds a Dockerfile for a Gitpod workspace. The Dockerfile installs build-time dependencies, Docker, Node.js, npm, and ungit. It also creates a gitpod user with UID 33333. The Dockerfile is split into multiple stages to optimize the build process and reduce the image size.

* 🆕 chore(gitpod.mak): add Gitpod make targets for building, linting, and testing
This commit adds three new make targets for Gitpod: gitpod-build, gitpod-lint, and gitpod-tests. The gitpod-build target runs a docker build command to build a local image of the postgresql_cluster. The gitpod-lint target runs a hadolint command to lint the Dockerfile. The gitpod-tests target runs the gitpod-build and gitpod-lint targets. These targets are useful for developers who want to test their changes in a Gitpod environment.

* 🎉 feat(python.mak): add makefile for python virtual environment management
This commit adds a makefile for managing python virtual environments. It includes targets for creating, upgrading, and installing requirements for the virtual environment. It also includes targets for installing linters and running tests. This makefile will help to ensure that the python environment is consistent across different machines and will make it easier to manage dependencies.

* 🆕 chore(requirements.txt): add new development dependencies
Added new development dependencies to the requirements.txt file. These dependencies include gitpython, jsonschema, jsonpickle, mkdocs, multiprocessing_logging, pychalk, pygithub, python-gitlab, azure-devops, commentjson, pytablewriter, pytest-cov, pytest-timeout, pytest-xdist, pyyaml, regex, requests, terminaltables, webpreview, yq, importlib-metadata, mkdocs-material, pymdown-extensions, mkdocs-glightbox, mdx_truly_sane_lists, beautifulsoup4, giturlparse, json-schema-for-humans, and fastapi. These dependencies are required for the development of the project.

* 🚚 chore(Dockerfile): move dev requirements file to a more appropriate location
The dev requirements file was moved from the root directory to a more appropriate location in the .config/python/dev directory. This improves the organization of the project and makes it easier to find the dev requirements file.

* 🔧 chore(CONTRIBUTING.md): update pip install command to use new requirements file location
The pip install command has been updated to use the new location of the requirements file, which is now located in the `.config/python/dev` directory. This change was made to improve the organization of the project files.

* 🐛 fix(build-command.yml): update path to requirements.dev.txt to .config/python/dev/requirements.txt
The path to the requirements file was incorrect and has been updated to the correct path. This ensures that the correct dependencies are installed during the build process.

* 🆕 chore(gitpod.yml): add Gitpod workflow to run tests on push and pull request events
This commit adds a new Gitpod workflow to run tests on push and pull request events. The workflow runs on Ubuntu latest and sets up Python 3.10. It installs dependencies and runs Gitpod tests using the `make gitpod-tests` command. The `nick-invision/retry@v2` action is used to retry the command up to 3 times with a timeout of 10 minutes. The `TERM` environment variable is also set to `xterm` to avoid issues with the terminal.

* 🔥 chore(.dockerignore): add .venv to ignore list
The .venv directory is added to the ignore list to prevent it from being included in the Docker image. This directory contains the virtual environment and its dependencies, which are not required in the Docker image.

* 🚀 feat(Dockerfile): add markdown-table-formatter package to the Docker image
The markdown-table-formatter package is now installed in the Docker image. This package is useful for formatting markdown tables in a more readable way.

* 📝 docs(CONTRIBUTING.md): update contribution guidelines
This commit updates the contribution guidelines to provide more detailed instructions on how to contribute to the project. It adds a step-by-step guide on how to fork the repository, make changes, test the changes, and submit a pull request. It also includes instructions on how to use Gitpod for a cloud-based development environment and how to install the necessary dependencies for a desktop environment. Finally, it adds a note to consider sponsoring the maintainer via GitHub.

* 🐛 fix(.gitpod.yml): remove "-dev" from "bootstrap-dev" task name
The "-dev" suffix was removed from the "bootstrap" task name to match the updated Makefile.

* 🚀 feat(Makefile): add nodejs-bootstrap and nodejs-clean targets to Makefile
The Makefile now includes two new targets, nodejs-bootstrap and nodejs-clean, which respectively bootstrap and clean the Node.js environment. This is useful for development as it allows for the installation of Node.js dependencies and the ability to clean them up when necessary.

* 🚀 chore(package.json): add markdown-table-formatter dependency
The markdown-table-formatter package has been added as a dependency to the project. This package will be used to format tables in markdown files.

* 🔥 chore(Dockerfile): remove unnecessary whitespace
The commit removes an unnecessary whitespace in the Dockerfile.

* 🆕 chore(megalinter.mak): add megalinter-test target to run script build.sh
This commit adds a new make target called megalinter-test which runs the build.sh script. The script is run in a virtual environment specified by the .venv directory.

* 🆕 feat(nodejs.mak): add make targets for cleaning and bootstrapping Node.js dependencies
This commit adds two new make targets to the nodejs.mak file. The `nodejs-clean` target removes the node_modules directory, and the `nodejs-bootstrap` target installs the Node.js dependencies using npm. These targets make it easier to manage the Node.js dependencies of the project.

* 🐛 fix(CONTRIBUTING.md): update make command names to match their functionality
The `make` command names `reinitialization-dev` and `bootstrap-dev` were changed to `reinitialization` and `bootstrap` respectively to better reflect their functionality.

* 🔧 chore(Dockerfile): add mega-linter-runner package to Dockerfile
The Dockerfile has been updated to include the mega-linter-runner package with version 7.0.0. This package is used to run the Mega-Linter tool, which is a linter that supports multiple programming languages and formats. This change will allow the tool to be used within the Gitpod environment.

* 🔥 chore(.gitignore): add megalinter_file_names_cspell.txt to ignore list
The megalinter_file_names_cspell.txt file is now being ignored by git. This file is not needed for the project and was causing unnecessary clutter in the repository.

* 🔍 chore(.mega-linter.yml): update FILTER_REGEX_EXCLUDE to exclude new directories and files
The FILTER_REGEX_EXCLUDE has been updated to exclude the newly added directories and files. The .venv directory has been added to SPELL_MISSPELL_FILTER_REGEX_EXCLUDE to avoid spell checking virtual environment files.

* 🚀 feat(megalinter.mak): add new targets to run and test megalinter locally
The new targets added are:
- megalinter-run: runs megalinter locally using the python flavor and beta release
- megalinter-tests: runs all megalinter tests by calling megalinter-run and megalinter-build targets
- megalinter-clean: removes all megalinter reports, site and megalinter_file_names_cspell.txt files to clean up the local environment.

* 🔧 chore(Makefile): rename megalinter-test to megalinter-tests and add megalinter-clean target
The megalinter-test target was renamed to megalinter-tests to improve consistency with the naming conventions. A new target, megalinter-clean, was added to clean the megalinter environment.

* 🔨 chore(Dockerfile): update NPM_VERSION to 9.7.1
The NPM_VERSION variable has been updated to 9.7.1 to ensure that the latest version of npm is used in the Gitpod workspace.

* 🎨 style(CONTRIBUTING.md): remove unnecessary link reference
The link reference for [pulls] was removed as it was not being used in the document.

* 🔍 chore(.cspell.json): add "ungit" and "UNGIT" to the dictionary
🔍 chore(.cspell.json): add "dearmor" to the dictionary
The words "ungit" and "UNGIT" were added to the dictionary to prevent them from being flagged as spelling errors. Similarly, "dearmor" was added to the dictionary to prevent it from being flagged as a spelling error.

* 🔍 chore(.cspell.json): add "addsuffix" to the dictionary
The word "addsuffix" was added to the dictionary to prevent it from being flagged as a spelling mistake.

* 🐛 fix(nodejs.mak): add sudo to nodejs-clean target to allow deleting node_modules directory with root privileges
The node_modules directory is deleted using the 'rm' command in the nodejs-clean target. However, if the user does not have the necessary permissions, the command will fail. Adding 'sudo' to the command allows the user to delete the directory with root privileges.

* 🐛 fix(.mega-linter.yml): fix REPOSITORY_TRIVY_ARGUMENTS to skip .automation/test and .venv directories
The REPOSITORY_TRIVY_ARGUMENTS configuration was updated to skip the .automation/test directory and the .venv directory. This is to ensure that the linter does not scan the test directory and the virtual environment directory, which can cause unnecessary errors and warnings.

* 📈 chore(requirements.txt): update pymdown-extensions to version 10.0
This commit updates the pymdown-extensions package to version 10.0 in the dev requirements file. This update may include new features, bug fixes, or security patches.

* 🔧 chore(python_version.config): update Python version to 3.11
The Python version has been updated from 3.10 to 3.11 in the .config/python_version.config file. This update was done to take advantage of the new features and improvements in Python 3.11.

* 🔀 chore(gitpod.yml): change default branch name from master to main
This commit updates the Gitpod workflow file to use the new default branch name "main" instead of "master". This change is made to improve inclusivity and to avoid any references to slavery.

* 🔥 chore(.mega-linter.yml): remove unused SPELL_MISSPELL_FILTER_REGEX_EXCLUDE
The SPELL_MISSPELL_FILTER_REGEX_EXCLUDE was not being used and was removed to simplify the configuration file.

* 🐛 fix(gitpod.yml): change make bootstrap-dev to make bootstrap to match the correct target
The make target was incorrect, it should be "bootstrap" instead of "bootstrap-dev". This commit fixes the target to match the correct one.

* 🔧 chore(gitpod.yml): update Python version to 3.11
The Python version used in the Gitpod workflow has been updated from 3.10 to 3.11 to ensure that the latest version of Python is being used. This update ensures that the project is using the latest version of Python and can take advantage of any new features or improvements.

* 🆕 chore(.python-version): add Python version 3.11.4 to project
This commit adds a new file named .python-version to the project root directory. The file contains the Python version 3.11.4, which is the version of Python that will be used for this project.

* 🔥 chore(python_version.config): remove python version configuration file
The file .config/python_version.config was removed. It was no longer needed as the project has moved to a different version of Python.

* 🐛 fix(Makefile): change python version detection to use .python-version file instead of .config/python_version.config
The Makefile now uses the .python-version file to detect the python version instead of the .config/python_version.config file. This change was made to improve consistency with the naming conventions used in the project.

* 🔧 chore(Dockerfile): rename python_version.config to .python-version and update reference in Dockerfile
The file .config/python_version.config was renamed to .python-version to follow naming conventions. The reference to the file was updated in the Dockerfile to reflect the new name.

* 🐛 fix(gitpod.yml): correct typo in job name
The job name was corrected from "Run Giptod tests" to "Run Gitpod tests" to fix the typo.

* 🔧 chore(python.mak): update python_launcher version to python3.11
The python_launcher variable has been updated to python3.11 to reflect the latest version of Python. This change is necessary to ensure that the correct version of Python is used when running the application.

* 🔧 chore(CONTRIBUTING.md): update Python version to 3.11
The Python version required to run the project has been updated from 3.10 to 3.11 to ensure compatibility with the latest version of the language. This change was made to keep the project up-to-date with the latest software versions.

* 🐛 fix(CONTRIBUTING.md): update megalinter test command to match the correct target
The command to test with megalinter was incorrect and has been updated to `make megalinter-tests` to match the correct target. This will ensure that the code is properly linted and formatted before being merged into the main branch.

* 🚀 chore(gitpod.yml): change Python version setup to read from .python-version file

The Python version setup has been changed to read from a .python-version file instead of being hardcoded in the workflow file. This allows for easier management of the Python version used in the project.

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>

* 🐛 fix(workflows): use python-version-file instead of python-version to read python version from file

The python version is now read from a file named .python-version instead of being hardcoded in the workflow files. This improves consistency and makes it easier to manage the python version across different workflows.

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>

* 🔄 chore(.python-version): add newline at end of file
This commit adds a newline at the end of the .python-version file to improve consistency with the project's coding style.

* 🐛 fix(Dockerfile): add newline at end of file
The commit fixes a minor issue where there was no newline at the end of the Dockerfile.

* 🔥 chore(.dockerignore): add newline at end of file

The commit fixes a minor issue where there was no newline at the end

* 🔥 chore(gitpod.mak): add newline at end of file

The commit fixes a minor issue where there was no newline at the end

* 🔥 chore(help.mak): add newline at end of file

The commit fixes a minor issue where there was no newline at the end

* 🔥 chore(megalinter.mak): add newline at end of file

The commit fixes a minor issue where there was no newline at the end

* 🔥 chore(nodejs.mak): add newline at end of file

The commit fixes a minor issue where there was no newline at the end

* 🔥 chore(python.mak): add newline at end of file

The commit fixes a minor issue where there was no newline at the end

* 🔥 chore(Makefile): add newline at end of file

The commit fixes a minor issue where there was no newline at the end

* 🔧 chore(gitpod.mak): rename docker image tag to megalinter_gitpod:local
The docker image tag has been renamed to megalinter_gitpod:local to better reflect the purpose of the image.

* 🐛 fix(gitpod.mak): reorder gitpod-tests dependencies to fix build order
The gitpod-tests target was not building the application before running the linting command. This commit fixes the build order by moving the gitpod-build target to be a dependency of the gitpod-tests target.

* 🔧 chore(.gitignore): ignore Redis dump files and server files
Added '**/dump.rdb' and 'server/server-files/' to .gitignore to prevent accidental commit of Redis database dumps and server files. This is important to avoid exposing sensitive data and to keep the repository clean from unnecessary files.

---------

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
  • Loading branch information
ThomasSanson and echoix authored Jul 11, 2023
1 parent c04d8da commit f7df5cf
Show file tree
Hide file tree
Showing 20 changed files with 394 additions and 43 deletions.
100 changes: 100 additions & 0 deletions .config/gitpod/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
###################
# builder #
###################
# First stage: Install build-time dependencies
FROM ubuntu:jammy as builder

# hadolint ignore=DL3002
USER root

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Copy Python version config file
COPY .python-version /tmp/

# Update system and install packages
# hadolint ignore=DL3008,DL3009,DL3013
RUN PYTHON_VERSION=$(cut -d '.' -f 1,2 /tmp/.python-version) \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
bash-completion \
ca-certificates \
curl \
git \
git-lfs \
gnupg \
htop \
iproute2 \
lsb-release \
make \
nano \
python3-pip \
"python${PYTHON_VERSION}" \
"python${PYTHON_VERSION}-venv" \
sudo \
tree \
vim \
wget \
&& python3 -m pip install --no-cache-dir --upgrade pip \
&& python3 -m pip install --no-cache-dir virtualenv

############################
# docker-installer #
############################
FROM builder as docker-installer

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3008,DL3009
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt-get update \
&& apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io

###########################
# npm-installer #
###########################
FROM docker-installer as npm-installer

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Set a variable for packages version
ARG NPM_VERSION=9.7.1
ARG UNGIT_VERSION=1.5.23
ARG MEGA_LINTER_RUNNER_VERSION=7.0.0
ARG MARKDOWN_TABLE_FORMATTER_VERSION=1.4.0

# hadolint ignore=DL3008
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& npm install -g "npm@${NPM_VERSION}" \
&& npm install -g \
"ungit@${UNGIT_VERSION}" \
"mega-linter-runner@${MEGA_LINTER_RUNNER_VERSION}" \
"markdown-table-formatter@${MARKDOWN_TABLE_FORMATTER_VERSION}"

###########################
# cleanup #
###########################
FROM npm-installer as cleanup

RUN apt-get clean && rm -rf /var/lib/apt/lists/* tmp/*

###########################
# gitpod-user #
###########################
FROM cleanup as gitpod-user

# UID must be 33333.
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod

#########################
# final #
#########################
FROM ubuntu:jammy

COPY --from=gitpod-user / /

USER gitpod
34 changes: 34 additions & 0 deletions .config/make/00_config.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Makefile global config
.DEFAULT_GOAL:=help
.EXPORT_ALL_VARIABLES:
.ONESHELL:
.SILENT:
MAKEFLAGS += "-j$(NUM_CORES) -l$(NUM_CORES)"
MAKEFLAGS += --silent
SHELL:=/bin/bash
.SHELLFLAGS = -eu -o pipefail -c

# Makefile colors config
bold=$(shell tput bold)
normal=$(shell tput sgr0)
errorTitle=$(shell tput setab 1 && tput bold && echo '\n')
recommendation=$(shell tput setab 4)
underline=$(shell tput smul)
reset=$(shell tput -Txterm sgr0)
black=$(shell tput setaf 0)
red=$(shell tput setaf 1)
green=$(shell tput setaf 2)
yellow=$(shell tput setaf 3)
blue=$(shell tput setaf 4)
magenta=$(shell tput setaf 5)
cyan=$(shell tput setaf 6)
white=$(shell tput setaf 7)

define HEADER
How to use me:
make help
make bootstrap-dev
make ${cyan}<target>${reset}

endef
export HEADER
13 changes: 13 additions & 0 deletions .config/make/gitpod.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## —— Gitpod —————————————————————————————————————————————————————————————————————————————————————
.PHONY: gitpod-build
gitpod-build: ## Run docker build image in local
docker build --tag megalinter_gitpod:local --file .config/gitpod/Dockerfile .

.PHONY: gitpod-lint
gitpod-lint: ## Run hadolint command to lint Dokerfile
docker run --rm -i hadolint/hadolint < .config/gitpod/Dockerfile

.PHONY: gitpod-tests
gitpod-tests: ## Run tests for gitpod
$(MAKE) gitpod-lint
$(MAKE) gitpod-build
5 changes: 5 additions & 0 deletions .config/make/help.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## —— Help ———————————————————————————————————————————————————————————————————————————————————————
.PHONY: help
help: ## Help command
echo -e "$$HEADER"
grep -E '(^[a-zA-Z0-9_-]+:.*?## .*$$)|(^## )' $(MAKEFILE_LIST) | sed 's/^[^:]*://g' | awk 'BEGIN {FS = ":.*?## | #"} ; {printf "${cyan}%-30s${reset} ${white}%s${reset} ${green}%s${reset}\n", $$1, $$2, $$3}' | sed -e 's/\[36m##/\n[32m##/'
20 changes: 20 additions & 0 deletions .config/make/megalinter.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## —— Megalinter —————————————————————————————————————————————————————————————————————————————————————
.PHONY: megalinter-build
megalinter-build: ## Run script build.sh
source .venv/bin/activate
bash build.sh

.PHONY: megalinter-run
megalinter-run: ## Run megalinter locally
npx mega-linter-runner --flavor python --release beta

.PHONY: megalinter-tests
megalinter-tests: ## Run all megalinter tests
$(MAKE) megalinter-run
$(MAKE) megalinter-build

.PHONY: megalinter-clean
megalinter-clean: ## Clean megalinter locally
sudo rm -rf megalinter-reports
sudo rm -rf site
sudo rm -f *megalinter_file_names_cspell.txt
8 changes: 8 additions & 0 deletions .config/make/nodejs.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## —— Node.js —————————————————————————————————————————————————————————————————————————————————————
.PHONY: nodejs-clean
nodejs-clean: ## Clean nodejs files
sudo rm -rf node_modules

.PHONY: nodejs-bootstrap
nodejs-bootstrap: ## Bootstrap nodejs
npm install
75 changes: 75 additions & 0 deletions .config/make/python.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Python default launcher
python_launcher ?= python3.11
python_requirements_file ?= .config/python/dev/requirements.txt
python_requirements_dev_file ?= .config/python/dev/requirements.txt

## —— Python —————————————————————————————————————————————————————————————————————————————————————
.PHONY: python-bootstrap
python-bootstrap: ## Bootstrap python
$(MAKE) python-venv-init
$(MAKE) python-venv-upgrade
$(MAKE) python-venv-requirements

.PHONY: python-bootstrap-dev
python-bootstrap-dev: ## Bootstrap python for dev env
$(MAKE) python-venv-requirements-dev
$(MAKE) python-venv-linters-install

# ===============================================================================================
# .venv
# ===============================================================================================
.PHONY: python-venv-init
python-venv-init: ## Create venv ".venv/" if not exist
if [ ! -d .venv ] ; then
$(python_launcher) -m venv .venv
fi

.PHONY: python-venv-upgrade
python-venv-upgrade: ## Upgrade venv with pip, setuptools and wheel
source .venv/bin/activate
pip install --upgrade pip setuptools wheel

.PHONY: python-venv-requirements
python-venv-requirements: ## Install or upgrade from $(python_requirements_file)
source .venv/bin/activate
pip install --upgrade --requirement $(python_requirements_file)

.PHONY: python-venv-requirements-dev
python-venv-requirements-dev: ## Install or upgrade from $(python_requirements_dev_file)
source .venv/bin/activate
pip install --upgrade --requirement $(python_requirements_dev_file)

.PHONY: python-venv-linters-install
python-venv-linters-install: ## Install or upgrade linters
source .venv/bin/activate
pip install --upgrade flake8

.PHONY: python-venv-purge
python-venv-purge: ## Remove venv ".venv/" folder
rm -rf .venv

# ===============================================================================================
# Utils
# ===============================================================================================
.PHONY: python-purge-cache
python-purge-cache: ## Purge cache to avoid used cached files
if [ -d .venv ] ; then
source .venv/bin/activate
pip cache purge
fi

.PHONY: python-version
python-version: ## Displays the python version used for the .venv
source .venv/bin/activate
$(python_launcher) --version

.PHONY: python-flake8
python-flake8: ## Run flake8 linter for python
source .venv/bin/activate
flake8 --config .config/.flake8

.PHONY: python-pytest
python-pytest: ## Run pytest to test python scripts
source .venv/bin/activate
cd scripts/
$(python_launcher) -m pytest
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ webpreview
yq
importlib-metadata>=3.10
mkdocs-material
pymdown-extensions==9.11
pymdown-extensions==10.0
mkdocs-glightbox==0.3.2
mdx_truly_sane_lists
beautifulsoup4
Expand Down
4 changes: 4 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@
"Trivy",
"Twilio",
"Uncomparables",
"ungit",
"UNGIT",
"VARNAME",
"VBDOTNET",
"Vuillamy",
Expand All @@ -463,6 +465,7 @@
"addgroup",
"additional",
"addlinespace",
"addsuffix",
"adrienverge",
"agentkeepalive",
"agentlib",
Expand Down Expand Up @@ -621,6 +624,7 @@
"dartanalyzer",
"dateformat",
"davidjeddy",
"dearmor",
"debugent",
"debuglog",
"decamelize",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG NODE_VERSION="16"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
COPY requirements.dev.txt /tmp/pip-tmp/
COPY .config/python/dev/requirements.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.dev.txt \
&& rm -rf /tmp/pip-tmp && pip3 install --no-cache-dir mkdocs-material pymdown-extensions==9.11 mkdocs-glightbox==0.3.2 pymdown-extensions==9.11

Expand Down
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ pids
*.pid
*.seed
*.pid.lock
*.log
*.log
.venv
Loading

0 comments on commit f7df5cf

Please sign in to comment.