Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Jul 11, 2023
1 parent 6c9672b commit 21ad4ce
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
"commit": "0eda714719b5141d8e570e2c751572b41fefc2d7",
"commit": "9627920059b31038e1bb8a978921806cb835fde7",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
35 changes: 17 additions & 18 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ jobs:
path: ci/combined-environment-*.yml

unit-tests:
name: unit-tests (3.10)
name: unit-tests
needs: combine-environments
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11']

steps:
- uses: actions/checkout@v3
Expand All @@ -60,14 +63,13 @@ jobs:
name: combined-environments
path: ci
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/combined-environment-ci.yml
environment-name: DEVELOP
channels: conda-forge
cache-env: true
extra-specs: |
python=3.10
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
- name: Install package
run: |
python -m pip install --no-deps -e .
Expand All @@ -87,13 +89,12 @@ jobs:
name: combined-environments
path: ci
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/combined-environment-ci.yml
environment-name: DEVELOP
channels: conda-forge
cache-env: true
extra-specs: |
cache-environment: true
create-args: >-
python=3.10
- name: Install package
run: |
Expand All @@ -114,13 +115,12 @@ jobs:
name: combined-environments
path: ci
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/combined-environment-ci.yml
environment-name: DEVELOP
channels: conda-forge
cache-env: true
extra-specs: |
cache-environment: true
create-args: >-
python=3.10
- name: Install package
run: |
Expand Down Expand Up @@ -149,13 +149,12 @@ jobs:
name: combined-environments
path: ci
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@v15
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/combined-environment${{ matrix.extra }}.yml
environment-name: DEVELOP${{ matrix.extra }}
channels: conda-forge
cache-env: true
extra-specs: |
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
- name: Install package
run: |
Expand Down
88 changes: 81 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,52 @@ ipython_config.py
# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/

### Linux ###

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# 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

### macOS Patch ###
# iCloud generated files
*.icloud

### PyCharm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
Expand Down Expand Up @@ -150,7 +196,6 @@ __pycache__/
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
Expand Down Expand Up @@ -296,6 +341,16 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml

# ruff
.ruff_cache/

# LSP config files
pyrightconfig.json

### Vim ###
# Swap
[._]*.s[a-v][a-z]
Expand All @@ -311,7 +366,6 @@ Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
Expand All @@ -337,10 +391,30 @@ tags
.history
.ionide

# Support for Project snippet scope
.vscode/*.code-snippets
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Ignore code-workspaces
*.code-workspace
# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks,vim,visualstudiocode,pycharm
# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks,vim,visualstudiocode,pycharm,emacs,linux,macos,windows
63 changes: 63 additions & 0 deletions .gitignore.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
diff a/.gitignore b/.gitignore (rejected hunks)
@@ -4,8 +4,59 @@ version.py
# Sphinx automatic generation of API
docs/_api/

-# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks,vim,visualstudiocode,pycharm
-# Edit at https://www.toptal.com/developers/gitignore?templates=python,jupyternotebooks,vim,visualstudiocode,pycharm
+# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks,vim,visualstudiocode,pycharm,emacs,linux,macos,windows
+# Edit at https://www.toptal.com/developers/gitignore?templates=python,jupyternotebooks,vim,visualstudiocode,pycharm,emacs,linux,macos,windows
+
+### Emacs ###
+# -*- mode: gitignore; -*-
+*~
+\#*\#
+/.emacs.desktop
+/.emacs.desktop.lock
+*.elc
+auto-save-list
+tramp
+.\#*
+
+# Org-mode
+.org-id-locations
+*_archive
+
+# flymake-mode
+*_flymake.*
+
+# eshell files
+/eshell/history
+/eshell/lastdir
+
+# elpa packages
+/elpa/
+
+# reftex files
+*.rel
+
+# AUCTeX auto folder
+/auto/
+
+# cask packages
+.cask/
+dist/
+
+# Flycheck
+flycheck_*.el
+
+# server auth directory
+/server/
+
+# projectiles files
+.projectile
+
+# directory configuration
+.dir-locals.el
+
+# network security
+/network-security.data
+

### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
2 changes: 1 addition & 1 deletion .pre-commit-config-cruft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/cruft/cruft
rev: 2.12.0
rev: 2.15.0
hooks:
- id: cruft
entry: cruft update -y
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ repos:
- id: debug-statements
- id: mixed-line-ending
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
hooks:
- id: blackdoc
additional_dependencies: [black==22.3.0]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.254
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.277
hooks:
- id: ruff
args: [--fix]
args: [--fix, --show-fixes]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.7.0
rev: v2.9.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes]
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering"
]
dependencies = [
Expand Down

0 comments on commit 21ad4ce

Please sign in to comment.