Skip to content

Commit

Permalink
QE-11629 publish and launch (#525)
Browse files Browse the repository at this point in the history
- chore - prep for publish
- replace black with ruff
- remove detect-secrets to be replaced by GH repo security
- remove bandit to be replaced by GH CodeQL
- cleanup makefile
  • Loading branch information
ddl-cedricyoung authored Sep 10, 2024
1 parent 1c14e60 commit fcca71c
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 521 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ version: 2.1
workflows:
build-test-publish:
jobs:
- pre-commit
- build
- test:
name: test-chrome
browser: chrome
requires:
- pre-commit
- build
- test:
name: test-edge
browser: edge
requires:
- pre-commit
- build
- test:
name: test-firefox
browser: firefox
requires:
- pre-commit
- build

jobs:
pre-commit:
build:
docker:
- image: cimg/python:3.11.7
resource_class: medium
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ repos:
- repo: local
hooks:
- id: makefile
name: run make check
name: run make lint
entry: make
args: ["check"]
args: ["lint"]
language: system
pass_filenames: false
verbose: true
223 changes: 0 additions & 223 deletions .secrets.baseline

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project closely adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.206.0
- chore - prep for publish
- replace black with ruff
- remove detect-secrets to be replaced by GH repo security
- remove bandit to be replaced by GH CodeQL
- cleanup makefile

## 0.205.0
- change - increase information logged for failing before_scenario_hooks

Expand Down
62 changes: 25 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,62 +1,47 @@
# help menu when you run just `make`
# default target
all: help setup fix lint test build

help:
# Provided as a convience to run commands with poetry
# install - installs the necessary development dependencies.
# format - formats the code
# check - checks the code
# test - tests the code
# build - build the dist

install: src/*
# setup - installs the necessary development dependencies.
# fix - fixes code formatting
# lint - lints the code
# test - tests the code
# build - build the dist

setup: src/*
# make setup
poetry install

format:
poetry run black .
fix:
# make fix
poetry run ruff format .
poetry run cucu lint features
poetry run cucu lint --fix features

check:
# format code
poetry run black . --check
lint:
# make lint
# lint code
poetry run ruff check .
# lint .feature files
poetry run cucu lint features
# lint code for security mistakes
poetry run bandit src features data -r -c pyproject.toml -q --severity high
# check project config
poetry check
# prevent new secrets
# 🔔 to update secrets ignore list use: make update-secrets
poetry run detect-secrets-hook -n --baseline .secrets.baseline $$(git ls-files -z | xargs -0)

update-secrets:
poetry run detect-secrets scan -n --baseline .secrets.baseline
poetry run detect-secrets audit .secrets.baseline

test:
# make test
poetry run pytest tests
poetry run cucu run features --workers=4
# ℹ️ takes a while to run all cucu features
poetry run cucu run features --workers=4 --generate-report
# open HTML report at report/index.html

build:
# make build
rm -f dist/*.tar.gz
rm -f dist/*.whl
poetry build

qualify:
tox

release:
# version and commit
poetry version minor
git add pyproject.toml
git commit -m "tagged release `poetry version -s`"

# publish to test pypi
# publish to pypi
# publish to read the docs

coverage: src/* tests/*
# make coverage
rm -fr .coverage .coverage.*
# this makes it so all of the underlying `cucu` command calls are run
# with the coverage enabled even when spawned as a separate process for the
Expand All @@ -68,3 +53,6 @@ coverage: src/* tests/*
poetry run coverage xml
poetry run coverage report
echo "open HTML coverage report at htmlcov/index.html"

# disable caching for all make targets
.PHONY: all help format lint test build coverage
Loading

0 comments on commit fcca71c

Please sign in to comment.