Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package Setup #2

Merged
merged 4 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Continous Deployment

on:
push:
branches:
- main

jobs:
release-please:
runs-on: ubuntu-latest
steps:
-
name: Create release
id: release-please
uses: google-github-actions/release-please-action@v3
with:
release-type: python
package-name: scicon
-
name: Checkout
if: ${{ steps.release-please.outputs.release_created }}
shell: bash
run: |
echo "The release branch is ${{ steps.release-please.outputs.release_branch }}"
echo "Release Version: ${{ steps.release-please.outputs.tag_name }}"
17 changes: 17 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Documentation
on:
push:
branches:
- main

jobs:
mkdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.10
- run: pip install poetry
- run: poetry install --with=docs
- run: poetry run mkdocs gh-deploy --force
96 changes: 96 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
repos:
- hooks:
- args:
- --multi-line=3
- --trailing-comma
- --force-grid-wrap=0
- --use-parentheses
- --line-width=88
id: isort
repo: https://github.com/pycqa/isort
rev: 5.12.0
- hooks:
- args:
- --max-line-length=89
- --max-complexity=15
id: flake8
repo: https://github.com/pycqa/flake8
rev: 6.0.0
- hooks:
- args:
- --py36-plus
id: pyupgrade
repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.1.0
- hooks:
- additional_dependencies:
- types-attrs
- types-requests
- types-setuptools
- types-PyYAML
args:
- --ignore-missing-imports
- --no-implicit-optional
id: mypy
repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.0
- hooks:
- args:
- --convention=google
- --add-ignore=D104
id: pydocstyle
repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
- hooks:
- id: blacken-docs
repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
- hooks:
- exclude: ^docs/*
id: trailing-whitespace
- exclude: ^docs/*
id: end-of-file-fixer
- id: debug-statements
- id: check-case-conflict
- id: check-json
- args:
- --unsafe
id: check-yaml
- id: mixed-line-ending
- id: check-toml
- id: pretty-format-json
- id: check-docstring-first
- id: check-symlinks
- id: detect-private-key
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
- hooks:
- args:
- -iii
- -lll
id: bandit
repo: https://github.com/PyCQA/bandit
rev: 1.7.4
- hooks:
- additional_dependencies:
- radon
args:
- cc
- --min=C
- --total-average
entry: radon
id: radon
language: python
name: radon
verbose: true
repo: local
- hooks:
- id: commitizen
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: v2.41.0
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Science Containers
1 change: 1 addition & 0 deletions docs/help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Help Page
17 changes: 17 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Welcome to MkDocs

For full documentation visit [mkdocs.org](https://www.mkdocs.org).

## Commands

* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.

## Project layout

mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
86 changes: 86 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
site_name: Science Containers
site_url: https://opencadc.github.io/scicon/
site_author: CANFAR
site_description: Science Containers for CANFAR Science Platform
repo_url: https://github.com/opencadc/scicon/
repo_name: opencadc/scicon
edit_uri: blob/main/docs/
copyright: Copyright © 2023 CANFAR
remote_branch: gh-pages

theme:
name: material
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/toggle-switch
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/toggle-switch-off-outline
name: Switch to light mode
font:
text: Roboto
code: Roboto Mono
language: en
icon:
repo: fontawesome/brands/github-alt
edit: material/pencil-box
view: material/eye-outline
features:
- tabs
- instant
- content.action.edit
- offline

plugins:
- search
- mkdocstrings
- git-revision-date-localized:
type: date
fallback_to_build_date: true

# Extensions
markdown_extensions:
- markdown.extensions.admonition
- markdown.extensions.attr_list
- markdown.extensions.def_list
- markdown.extensions.footnotes
- markdown.extensions.meta
- markdown.extensions.toc:
permalink: true
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.highlight:
use_pygments: true
linenums_style: pymdownx.inline
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.magiclink:
repo_url_shorthand: true
user: squidfunk
repo: mkdocs-material
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.snippets:
check_paths: true
- pymdownx.superfences
- pymdownx.tabbed
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde

nav:
- Scicon: index.md
- Help Page: help.md
Loading