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

Create pyDOMCFG skeleton #1

Merged
merged 15 commits into from
May 13, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage:
status:
project: false
patch: false
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- Remove check-list items that aren't relevant to your change -->

- [ ] Closes #xxxx
- [ ] Tests added
- [ ] Passes `pre-commit run --all-files`
- [ ] Changes are documented in `whats-new.rst`
- [ ] New functions/methods are listed in `api.rst`
- [ ] Project, label, and assignee tabs are populated
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
13 changes: 13 additions & 0 deletions .github/workflows/cancel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Cancel
on:
workflow_run:
workflows: ["CI"]
types:
- requested
jobs:
cancel:
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.9.0
with:
workflow_id: ${{ github.event.workflow.id }}
70 changes: 70 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on:
push:
branches: "main"
pull_request:
branches: "*"
schedule:
- cron: "0 13 * * 1"

jobs:
build:
name: Build (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: ci/environment.yml
activate-environment: pydomcfg_test
auto-update-conda: false
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
use-mamba: true

- name: Set up conda environment
shell: bash -l {0}
run: |
python -m pip install -e .
conda list

- name: Run Tests
shell: bash -l {0}
run: pytest --cov-report term --cov-report xml

- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false

upstream-dev:
name: upstream-dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: ci/upstream-dev-env.yml
activate-environment: pydomcfg_test_dev
auto-update-conda: false
miniforge-variant: Mambaforge
use-mamba: true

- name: Set up conda environment
shell: bash -l {0}
run: |
python -m pip install -e .
conda list

- name: Run Tests
shell: bash -l {0}
run: pytest --no-cov
200 changes: 200 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@

# Created by https://www.toptal.com/developers/gitignore/api/jupyternotebooks,python,fortran
# Edit at https://www.toptal.com/developers/gitignore?templates=jupyternotebooks,python,fortran

### Fortran ###
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/

.ipynb_checkpoints
*/.ipynb_checkpoints/*

# IPython
profile_default/
ipython_config.py

# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/**/generated/
docs/_build/
doc/_build/
doc/**/generated/

# PyBuilder
target/

# Jupyter Notebook

# IPython

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
#poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
# .env
.env/
.venv/
env/
venv/
ENV/
env.bak/
venv.bak/
pythonenv*

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# operating system-related files
# file properties cache/storage on macOS
*.DS_Store
# thumbnail cache on Windows
Thumbs.db

# profiling data
.prof


# End of https://www.toptal.com/developers/gitignore/api/jupyternotebooks,python,fortran
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# https://pre-commit.com/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-yaml
- id: trailing-whitespace

- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 21.5b1
hooks:
- id: black

- repo: https://github.com/keewis/blackdoc
rev: v0.3.3
hooks:
- id: blackdoc

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8

- repo: https://github.com/terrencepreilly/darglint
rev: v1.8.0
hooks:
- id: darglint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
hooks:
- id: mypy
exclude: docs

- repo: https://github.com/PyCQA/doc8
rev: 0.9.0a1
hooks:
- id: doc8
14 changes: 14 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally set the version of Python and requirements required to build your docs
conda:
environment: ci/docs.yml
1 change: 0 additions & 1 deletion README.md

This file was deleted.

18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pyDOMCFG
========

.. image:: https://img.shields.io/github/workflow/status/pyNEMO/pyDOMCFG/CI?logo=github
:target: https://github.com/pyNEMO/pyDOMCFG/actions
:alt: GitHub Workflow CI Status

.. image:: https://codecov.io/gh/pyNEMO/pyDOMCFG/branch/main/graph/badge.svg?token=BP296I59E8
:target: https://codecov.io/gh/pyNEMO/pyDOMCFG
:alt: Code Coverage

.. image:: https://readthedocs.org/projects/pydomcfg/badge/?version=latest
:target: https://pydomcfg.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://results.pre-commit.ci/badge/github/pyNEMO/pyDOMCFG/main.svg
:target: https://results.pre-commit.ci/latest/github/pyNEMO/pyDOMCFG/main
:alt: pre-commit.ci status
7 changes: 7 additions & 0 deletions ci/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: pydomcfg_docs
channels:
- conda-forge
dependencies:
- numpydoc
- sphinx
- sphinx_rtd_theme