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

pip installable #8

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Check http://editorconfig.org for more information

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.{py, pyi}]
indent_style = space
indent_size = 4

[*.bat]
indent_style = tab
end_of_line = crlf

[Makefile]
indent_style = tab

[*.{yml, yaml}]
indent_size = 2
trim_trailing_whitespace = true

[*.md]
indent_size = 4
trim_trailing_whitespace = true

[LICENSE]
insert_final_newline = false

[*.{diff,patch}]
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: 🐛 Bug report
about: If something isn't working 🔧
title: ''
labels: bug
assignees:
---

## Bug Report

<!-- A clear and concise description of what the bug is. -->

## How To Reproduce

Steps to reproduce the behavior:

1. ...

### Code sample

<!-- If applicable, attach a minimal code sample to reproduce the decried issue. -->

### Environment

- OS: [e.g. Linux / Windows / macOS]
- Python version, get it with:

```bash
python --version
```

### Screenshots

<!-- If applicable, add screenshots to help explain your problem. -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Additional context

<!-- Add any other context about the problem here. -->
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Configuration: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository

blank_issues_enabled: false
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: 🚀 Feature request
about: Suggest an idea for this project 🏖
title: ''
labels: enhancement
assignees:
---

## Feature Request

<!-- A clear and concise description of the feature proposal. -->

## Motivation

<!-- Please describe the motivation for this proposal. -->

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: ❓ Question
about: Ask a question about this project 🎓
title: ''
labels: question
assignees:
---

## Checklist

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] I've searched the project's [`issues`](https://github.com/durrantlab/gypsum_dl/issues?q=is%3Aissue).

## Question

<!-- What is your question? -->

How can I [...]?

Is it possible to [...]?

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Description

<!-- Add a more detailed description of the changes if needed. -->

## Related Issue

<!-- If your PR refers to a related issue, link it here. -->

## Type of Change

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] 📚 Examples / docs / tutorials / dependencies update
- [ ] 🔧 Bug fix (non-breaking change which fixes an issue)
- [ ] 🥂 Improvement (non-breaking change which improves an existing feature)
- [ ] 🚀 New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)
- [ ] 🔐 Security fix

## Checklist

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] I have updated the code style using `make codestyle`.
- [ ] I have performed a self-review of my code.
- [ ] I have written tests for all new methods and classes that I created.
- [ ] New and existing unit tests pass locally with my changes.
- [ ] I have written the docstring in `NumPy` format for all the methods and classes that I used.
- [ ] I have made corresponding changes to the documentation.
28 changes: 28 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Release drafter configuration https://github.com/release-drafter/release-drafter#configuration
# Emojis were chosen to match the https://gitmoji.carloscuesta.me/

name-template: "v$NEXT_PATCH_VERSION"
tag-template: "v$NEXT_PATCH_VERSION"

categories:
- title: ":rocket: Features"
labels: [enhancement, feature]
- title: ":wrench: Fixes & Refactoring"
labels: [bug, refactoring, bugfix, fix]
- title: ":package: Build System & CI/CD"
labels: [build, ci, testing]
- title: ":boom: Breaking Changes"
labels: [breaking]
- title: ":pencil: Documentation"
labels: [documentation]
- title: ":arrow_up: Dependencies updates"
labels: [dependencies]

template: |
## What's Changed

$CHANGES

## :busts_in_silhouette: List of contributors

$CONTRIBUTORS
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

name: build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}

- name: Initialize conda environment
run: make conda-create

- name: Setup conda
run: make conda-setup

- name: Install conda dependencies
run: make from-conda-lock

- name: Poetry install
run: make install

- name: Run tests
run: make test
49 changes: 49 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

name: Codecov workflow

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
run:
name: codecov
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
# Set to the same as `PYTHON_VERSION` in `Makefile`
python-version: "3.12"

- name: Initialize conda environment
run: make conda-create

- name: Setup conda
run: make conda-setup

- name: Install conda dependencies
run: make from-conda-lock

- name: Poetry install
run: make install

- name: Run tests and coverage
run: make test

- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: OS,PYTHON
fail_ci_if_error: true
verbose: true
71 changes: 71 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

# Simple workflow for deploying static content to GitHub Pages
name: Deploy content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
name: docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: "3.12"

- name: Initialize conda environment
run: make conda-create

- name: Setup conda
run: make conda-setup

- name: Install conda dependencies
run: make from-conda-lock

- name: Poetry install
run: make install

- name: Build documentation
run: make docs-versioned

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: './docs/html/'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
Loading
Loading