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

feat: Add initial structure for RAGO #1

Merged
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 .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# http://editorconfig.org

root = true

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

[*.py]
indent_style = space
indent_size = 4

[*.bat]
indent_style = tab
end_of_line = crlf

["LICENSE"]
insert_final_newline = true

["Makefile"]
indent_style = tab
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [opensciencelabs, osl-incubator]
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- makim version:
- Python version:
- Operating System:

### Description

Describe what you were trying to get done. Tell us what happened, what went
wrong, and what you expected to happen.

### What I Did

```
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
```
61 changes: 61 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## Pull Request description

<!-- Describe the purpose of your PR and the changes you have made. -->

<!-- Which issue this PR aims to resolve or fix? E.g.:
Solving issue #004
-->

## How to test these changes

<!-- Example:

* run `$ abc -p 1234`
* open the web browser with url localhost:1234
* ...
-->

- `...`

<!-- Modify the options to suit your project. -->

## Pull Request checklists

This PR is a:

- [ ] bug-fix
- [ ] new feature
- [ ] maintenance

About this PR:

- [ ] it includes tests.
- [ ] the tests are executed on CI.
- [ ] the tests generate log file(s) (path).
- [ ] pre-commit hooks were executed locally.
- [ ] this PR requires a project documentation update.

Author's checklist:

- [ ] I have reviewed the changes and it contains no misspelling.
- [ ] The code is well commented, especially in the parts that contain more
complexity.
- [ ] New and old tests passed locally.

## Additional information

<!-- Add any screenshot that helps to show the changes proposed -->

<!-- Add any other extra information that would help to understand the changes proposed by this PR -->

## Reviewer's checklist

Copy and paste this template for your review's note:

```
## Reviewer's Checklist

- [ ] I managed to reproduce the problem locally from the `main` branch
- [ ] I managed to test the new changes locally
- [ ] I confirm that the issues mentioned were fixed/resolved .
```
48 changes: 48 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Documentation

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
gen-docs:
runs-on: ubuntu-latest
timeout-minutes: 15

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
activate-environment: rago
auto-update-conda: true
conda-solver: libmamba
python-version: "3.9"

- name: Install deps
run: |
poetry config virtualenvs.create false
poetry install

- name: Generate documentation with changes from semantic-release
run: makim --verbose docs.build

- name: GitHub Pages action
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: peaceiris/actions-gh-pages@v3.5.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/
127 changes: 127 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: build

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check-branch:
runs-on: ubuntu-latest

timeout-minutes: 2
concurrency:
group: ci-check-branch-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' }}
with:
fetch-depth: 0

- name: Check if the PR's branch is updated
if: ${{ github.event_name == 'pull_request' }}
uses: osl-incubator/gh-check-pr-is-updated@1.0.0
with:
remote_branch: origin/main
pr_sha: ${{ github.event.pull_request.head.sha }}

tests:
strategy:
fail-fast: false
matrix:
python_version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
os:
- "ubuntu"
- "macos"

runs-on: ${{ matrix.os }}-latest
timeout-minutes: 20

defaults:
run:
shell: bash -l {0}

concurrency:
group: ci-tests-${{ matrix.os }}-${{ matrix.python_version }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
activate-environment: rago
auto-update-conda: true
conda-solver: libmamba
python-version: "${{ matrix.python_version }}"

- name: Check Poetry lock
run: poetry check

- name: Install dependencies
run: |
poetry config virtualenvs.create false
poetry install

- name: Run unit tests
run: makim tests.unit

- name: Semantic Release PR Title Check
uses: osl-incubator/semantic-release-pr-title-check@v1.4.1
if: success() || failure()
with:
convention-name: conventionalcommits

- name: Setup tmate session
if: "${{ failure() && (contains(github.event.pull_request.labels.*.name, 'ci:enable-debugging')) }}"
uses: mxschmitt/action-tmate@v3

linter:
runs-on: ubuntu-latest
timeout-minutes: 10

defaults:
run:
shell: bash -l {0}

concurrency:
group: ci-linter-docs-${{ matrix.os }}-${{ matrix.python_version }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
activate-environment: rago
auto-update-conda: true
conda-solver: libmamba
python-version: "3.9"

- name: Install dependencies
run: |
poetry config virtualenvs.create false
poetry install

- name: Run style checks
if: success() || failure()
run: |
pre-commit install
makim tests.linter

- name: Setup tmate session
if: "${{ failure() && (contains(github.event.pull_request.labels.*.name, 'ci:enable-debugging')) }}"
uses: mxschmitt/action-tmate@v3
63 changes: 63 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 15

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
environment-file: conda/release.yaml
channels: conda-forge,nodefaults
activate-environment: rago
auto-update-conda: true
conda-solver: libmamba
python-version: "3.11"

- name: Install deps
run: |
poetry config virtualenvs.create false
poetry install

- name: Run semantic release (for tests)
if: ${{ github.event_name != 'workflow_dispatch' }}
run: makim --verbose release.dry

- name: Run semantic release
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
poetry config pypi-token.pypi ${PYPI_TOKEN}
makim --verbose release.ci

- name: Generate documentation with changes from semantic-release
if: ${{ github.event_name == 'workflow_dispatch' }}
run: makim --verbose docs.build

- name: GitHub Pages action
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: peaceiris/actions-gh-pages@v3.5.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/

- name: Setup tmate session
if: "${{ failure() && (contains(github.event.pull_request.labels.*.name, 'ci:enable-debugging')) }}"
uses: mxschmitt/action-tmate@v3
Loading