Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Anselmoo committed Feb 6, 2022
1 parent da745a2 commit 65f40a9
Show file tree
Hide file tree
Showing 18 changed files with 3,363 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Basic set up for three package managers

version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

# Maintain dependencies for npm
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
47 changes: 47 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
template: |
# 🧭 What's Changed
$CHANGES
# ⚙️ Who Contributes
$CONTRIBUTORS
categories:
- title: "🏆 Milestone"
label: "milestone"
- title: "🚀 New"
label: "enhancement"
- title: "🐛 Bug Fixes"
label: "bug"
- title: "🧰 Maintenance"
label: "maintenance"
- title: ":octocat: Github Actions"
label: "github_actions"
- title: "🗂 Documentation"
label: "documentation"
- title: "🔗 Dependency Updates"
label: "dependencies"
- title: "🔬 Testing & Coverage"
label: "testing"
- title: "👋 Welcome"
label: "good first issue"

version-resolver:
major:
labels:
- "milestone"
minor:
labels:
- "enhancement"
patch:
labels:
- "bug"
- "maintenance"
- "github_actions"
- "documentation"
- "dependencies"
- "security"
- "testing"
- "good first issue"

exclude-labels:
- "skip-changelog"
97 changes: 97 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI - Python Package

on:
push:
branches: [main, feature/*]
pull_request:
branches: [main, develop]

jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: actions/setup-python@v2
- name: Pre-commit
uses: pre-commit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: --write **/*.{js,md,json,yml,yaml}
file_pattern: "."
build_pandas:
name: >-
Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} via `pandas`
needs: [pre-commit, prettier]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest, macOS-latest]
arch: [x64]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install Pandas2Tensorboard
run: |
poetry install
poetry run pytest --diff-symbols --cov=./pandas2tensorboard -vv --cov-report=xml
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
build_modin:
name: >-
Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} via `modin`
needs: [pre-commit, prettier]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest, macOS-latest]
arch: [x64]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install Pandas2Tensorboard
run: |
poetry install --extras modin
poetry run pytest --diff-symbols --cov=./pandas2tensorboard -vv --cov-report=xml
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main

jobs:
update_release_draft:
if: github.repository == 'Anselmoo/pandas2tensorboard'
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Package Publishing
on:
release:
types:
- published

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:
PyPi-Package-Release:
if: github.repository == 'Anselmoo/pandas2tensorboard'
name: Publish on PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build and publish
run: |
poetry config pypi-token.pypi ${{ secrets.TWINE_TOKEN }}
poetry publish --build
continue-on-error: true
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# TensorBoard
runs

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -127,3 +130,31 @@ dmypy.json

# Pyre type checker
.pyre/

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-symlinks
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-ast
- id: check-merge-conflict
- id: check-added-large-files
exclude: example/
- repo: https://github.com/psf/black.git
rev: 22.1.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [black==21.12b0]
- repo: https://github.com/PyCQA/isort.git
rev: 5.10.1
hooks:
- id: isort
additional_dependencies: [toml==0.10.2]
- repo: https://github.com/PyCQA/flake8.git
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
entry: flake8 --docstring-convention google --max-doc-length 100 --max-line-length 88 --ignore E203,W503,W605
exclude: example/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
additional_dependencies:
[types-toml==0.10.1, types-PyYAML==6.0.1, types-tabulate==0.8.4]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1 # pick a git hash / tag to point to
hooks:
- id: pydocstyle
additional_dependencies: [toml==0.10.2]
Loading

0 comments on commit 65f40a9

Please sign in to comment.