Skip to content

Commit

Permalink
Merge pull request #1 from i-dot-ai/EN-260/prep-fork
Browse files Browse the repository at this point in the history
Prepare forked package scaffolding
  • Loading branch information
RyanWhite25 authored Oct 14, 2024
2 parents 1a5614f + 64a7ad4 commit e982dab
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 197 deletions.
8 changes: 0 additions & 8 deletions .coveragerc

This file was deleted.

11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

81 changes: 0 additions & 81 deletions .github/workflows/docker_publish.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/docs.yml

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
name: Run tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: ["macos-latest"]
python-version: ["3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/test_pypi_publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion cruft/_logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
If you need the boilerplate, at least let cruft manage it.
Version: {__version__}
Version: {__version__} (i.AI Fork)
Copyright Timothy Edmund Crosley, Sambhav Kothari 2020 MIT License
"""
2 changes: 1 addition & 1 deletion cruft/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
# Used to automatically set version number from github actions
# as well as not break when being tested locally
try:
__version__ = metadata.version(__package__)
__version__ = metadata.version("cruft-iai")
except metadata.PackageNotFoundError: # pragma: no cover
__version__ = "0.0.0"
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[tool.poetry]
name = "cruft"
name = "cruft-iai"
version = "0.0.0"
description = "Allows you to maintain all the necessary cruft for packaging and building projects separate from the code you intentionally write. Built on-top of CookieCutter."
authors = ["Timothy Crosley <[email protected]>", "Sambhav Kothari <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{ include = "cruft" }]

[tool.poetry.dependencies]
python = ">=3.7"
Expand Down Expand Up @@ -42,7 +43,7 @@ portray = { version = ">=1.7.0", python = ">=3.7.0,<4.0"}
vulture = ">=1.0"

[tool.poetry.scripts]
cruft = "cruft._cli:app"
cruft-iai = "cruft._cli:app"

[tool.portray.mkdocs.theme]
favicon = "art/logo.png"
Expand Down
7 changes: 1 addition & 6 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#!/bin/bash
set -euxo pipefail

poetry run cruft check
poetry run cruft-iai check
poetry run mypy --ignore-missing-imports cruft/
poetry run isort --check --diff cruft/ tests/
poetry run black --check cruft/ tests/
poetry run flake8 cruft/ tests/
# Safety won't allow installations for tornado<=6.1
# but tornade 6.1 is the latest.
# Run safety checks with warnings only
poetry run safety check -i 39462 -i 40291 -i 47794 -i 50571 || true
poetry run bandit -r cruft/
12 changes: 1 addition & 11 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,17 @@ set -euxo pipefail
shopt -s nocasematch

# Declare an array (of type string).
declare -a XTRA_COV=()
declare XTRA_OPT=""

if [[ $OSTYPE =~ ^msys|^WIN ]]; then
if [[ $* == *--ci* ]]; then
XTRA_OPT="--count 5"
fi
else
XTRA_COV+=("pragma: no cov_4_nix")
fi

if [[ $* == *--ci* ]]; then
shift
fi

# Iterate the string array using for loop. The quotes ensure iteration
# over multiple words string. It's important that .coverage ends with an empty last line.
for val in "${XTRA_COV[@]}"; do
echo " $val" >> .coveragerc
done


poetry run pytest -s -n auto --cov=cruft/ --cov=tests --cov-report=term-missing ${@-} --cov-report xml --cov-report html $XTRA_OPT
poetry run pytest -s -n auto $XTRA_OPT
./scripts/lint.sh

0 comments on commit e982dab

Please sign in to comment.