Skip to content

Commit

Permalink
Merge pull request #2 from letsbuilda/init
Browse files Browse the repository at this point in the history
Init project
  • Loading branch information
shenanigansd authored Jan 22, 2023
2 parents 64ed183 + 4788c8e commit 1f265b7
Show file tree
Hide file tree
Showing 22 changed files with 647 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '31 3 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
19 changes: 19 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Dependency Review'

on: [ pull_request ]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest

steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3

- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
with:
config-file: darbiadev/.github/.github/dependency-review-config.yaml@main
10 changes: 10 additions & 0 deletions .github/workflows/github-pages-python-sphinx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: GitHub Pages - Python Sphinx

on:
push:
branches:
- main

jobs:
docs:
uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@main
9 changes: 9 additions & 0 deletions .github/workflows/precommit-autoupdate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Pre-Commit autoupdate

on:
schedule:
- cron: "0 0 * * *"

jobs:
pre-commit-autoupdate:
uses: darbiadev/.github/.github/workflows/generic-precommit-autoupdate.yaml@main
27 changes: 27 additions & 0 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python CI

on:
push:
branches:
- main
pull_request:

jobs:
pre-commit:
uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@main

lint:
needs: pre-commit
uses: darbiadev/.github/.github/workflows/python-lint.yaml@main

test:
needs: lint
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]

uses: darbiadev/.github/.github/workflows/python-test.yaml@main
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
10 changes: 10 additions & 0 deletions .github/workflows/python-publish-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Python - Publish to PyPI

on:
release:
types: [released]

jobs:
publish:
uses: darbiadev/.github/.github/workflows/python-pypi-publish.yaml@main
secrets: inherit
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# JetBrains
.idea

# Packaging
*.egg-info
dist

# Cache
__pycache__

# Docs
docs/build
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: check-json
- id: trailing-whitespace
args: [ --markdown-linebreak-ext=md ]
- id: mixed-line-ending
args: [ --fix=lf ]
- id: end-of-file-fixer
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Let's build a ...

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 47 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.DEFAULT_GOAL := install-dev

.PHONY: init
init:
python -m pip install --upgrade pip wheel setuptools build

.PHONY: install
install:
python -m pip install --upgrade .

.PHONY: install-dev
install-dev:
python -m pip install --upgrade --editable .[dev,tests,docs]

.PHONY: lint
lint:
python -m isort src/
python -m black src/

.PHONY: pylint
pylint:
python -m pylint src/

.PHONY: test
test:
python -m pytest

.PHONY: build-dist
build-dist:
python -m pip install --upgrade build
python -m build

.PHONY: clean
clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '__pycache__' -exec rm -rf {} +
find . -name '.mypy_cache' -exec rm -rf {} +
rm -rf .tox
rm -f coverage.xml
rm -f coverage.json
rm -rf htmlcov
rm -rf .coverage
rm -rf .coverage.*
find . -name '.pytest_cache' -exec rm -rf {} +
rm -rf dist
rm -rf build
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# imsosorry
# I'm so sorry

Sometimes it can be necessary to call upon the ancient arts...
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
9 changes: 9 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. See docs for details on formatting your entries
https://releases.readthedocs.io/en/latest/concepts.html
Changelog
=========


- :release:`1.0.0 <21th January 2023>`
- :feature:`1` Initialize package
Loading

0 comments on commit 1f265b7

Please sign in to comment.