Skip to content

Commit

Permalink
Merge branch 'Open-MSS:develop' into update
Browse files Browse the repository at this point in the history
  • Loading branch information
Preetam-Das26 authored Feb 23, 2024
2 parents 4c3d653 + f5008ff commit dfce460
Show file tree
Hide file tree
Showing 358 changed files with 12,748 additions and 7,106 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
39 changes: 39 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
**Purpose of PR?**:

Fixes #

**Does this PR introduce a breaking change?**

**If the changes in this PR are manually verified, list down the scenarios covered:**:

**Additional information for reviewer?** :
_Mention if this PR is part of any design or a continuation of previous PRs_

**Does this PR results in some Documentation changes?**
_If yes, include the list of Documentation changes_

**Checklist:**
- [ ] Bug fix. Fixes #<issue number>
- [ ] New feature (Non-API breaking changes that adds functionality)
- [ ] PR Title follows the convention of `<type>: <subject>`
- [ ] Commit has unit tests

<!--
The PR title message must follow convention:
`<type>: <subject>`.
Where: <br />
- `type` is to define what type of PR is this.
Most common types are:
- `feat` - for new features, not a new feature for build script
- `fix` - for bug fixes or improvements, not a fix for build script
- `chore` - changes not related to production code
- `docs` - changes related to documentation
- `style` - formatting, missing semi colons, linting fix etc; no significant production code changes
- `test` - adding missing tests, refactoring tests; no production code change
- `refactor` - refactoring production code, eg. renaming a variable or function name, there should not be any significant production code changes
- `subject` is a single line brief description of the changes made in the pull request.
-->
28 changes: 28 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a bug report to help us improve
title: ''
labels: bug
assignees: ''

---

## Bug Report


**General Information**

Please describe your issue in few words here.

**How to Reproduce**

1. Instruction 1
2. Instruction 2

**Expected behavior**

A description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.
26 changes: 26 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request/Enhancement
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

## Feature Request

**Short Description**

E.g., MSS could support ensuring that cows don't take over the world and turn us all into their loyal milkmaids.

**Is your feature request related to a problem? Please describe the use case.**

A description of what the problem/use case is. E.g. Prevent the impending cow uprising and maintain human dominance on Earth.

**Describe the solution you'd like**

A description of what you want to happen. E.g., Develop a "Moofense" system that deploys an army of robotic cow herders to keep the bovine rebellion in check.

**Describe alternatives you've considered**

A description of any alternative solutions or features you've considered. E.g, Alternatively, we could offer the cows a reality TV show deal and distract them with celebrity pasture appearances, turning them into the world's first moo-dia stars.
4 changes: 2 additions & 2 deletions .github/workflows/build_docs_gallery.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build Gallery

on:
on:
pull_request:
inputs:
branch_name:
Expand All @@ -27,7 +27,7 @@ jobs:
steps:
- name: Trust My Directory
run: git config --global --add safe.directory /__w/MSS/MSS
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create gallery
timeout-minutes: 25
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/python-flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ on:
branches:
- develop
- stable
- GSOC2023-NilupulManodya
- GSOC2023-ShubhGaur
pull_request:
branches:
- develop
- stable
- GSOC2023-NilupulManodya
- GSOC2023-ShubhGaur

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"
- name: Lint with flake8
run: |
python -m pip install --upgrade pip
pip install flake8
pip install flake8 flake8-builtins
flake8 --count --statistics mslib tests
16 changes: 2 additions & 14 deletions .github/workflows/testing-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,12 @@ on:
branches:
- develop

jobs:
jobs:
test-develop:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: no
branch_name: develop
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}

test-develop-xdist:
uses:
./.github/workflows/testing.yml
with:
xdist: yes
branch_name: develop
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}

28 changes: 12 additions & 16 deletions .github/workflows/testing-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,25 @@ name: new dependency test (scheduled)

on:
schedule:
- cron: '30 5 * * 1'
- cron: '30 5 * * 1'


jobs:
test-stable-scheduled:
uses:
./.github/workflows/testing.yml
with:
xdist: no
branch_name: stable
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}
jobs:
trigger-testing-stable:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: benc-uk/[email protected]
with:
workflow: testing-stable.yml
ref: stable

test-develop-scheduled:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: no
branch_name: develop
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}



17 changes: 2 additions & 15 deletions .github/workflows/testing-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,12 @@ on:
- stable
workflow_dispatch:

jobs:
jobs:
test-stable:
uses:
uses:
./.github/workflows/testing.yml
with:
xdist: no
branch_name: stable
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}

test-stable-xdist:
uses:
./.github/workflows/testing.yml
with:
xdist: yes
branch_name: stable
event_name: ${{ github.event_name }}
secrets:
PAT: ${{ secrets.PAT }}


43 changes: 13 additions & 30 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Pytest MSS

on:
on:
workflow_call:
inputs:
xdist:
required: true
type: string
branch_name:
required: true
type: string
Expand All @@ -31,11 +28,16 @@ jobs:
container:
image: openmss/testing-${{ inputs.branch_name }}

strategy:
fail-fast: false
matrix:
order: ["normal", "reverse"]

steps:
- name: Trust My Directory
run: git config --global --add safe.directory /__w/MSS/MSS

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check for changed dependencies
run: |
Expand Down Expand Up @@ -69,7 +71,6 @@ jobs:
| sed -e "s/menuinst.*//" \
| sed -e "s/.*://" > reqs.txt \
&& cat requirements.d/development.txt >> reqs.txt \
&& echo pyvirtualdisplay >> reqs.txt \
&& cat reqs.txt \
&& mamba env remove -n mss-${{ inputs.branch_name }}-env \
&& mamba create -y -n mss-${{ inputs.branch_name }}-env --file reqs.txt
Expand All @@ -82,36 +83,18 @@ jobs:
&& mamba list
- name: Run tests
if: ${{ success() && inputs.xdist == 'no' }}
timeout-minutes: 25
run: |
cd $GITHUB_WORKSPACE \
&& source /opt/conda/etc/profile.d/conda.sh \
&& source /opt/conda/etc/profile.d/mamba.sh \
&& mamba activate mss-${{ inputs.branch_name }}-env \
&& pytest -v --durations=20 --reverse --cov=mslib tests \
|| (for i in {1..5} \
; do pytest tests -v --durations=0 --reverse --last-failed --lfnf=none \
&& break \
; done)
- name: Run tests in parallel
if: ${{ success() && inputs.xdist == 'yes' }}
timeout-minutes: 25
timeout-minutes: 10
run: |
cd $GITHUB_WORKSPACE \
&& source /opt/conda/etc/profile.d/conda.sh \
&& source /opt/conda/etc/profile.d/mamba.sh \
&& mamba activate mss-${{ inputs.branch_name }}-env \
&& pytest -vv -n 6 --dist loadfile --max-worker-restart 0 tests \
|| (for i in {1..5} \
; do pytest -vv -n 6 --dist loadfile --max-worker-restart 0 tests --last-failed --lfnf=none \
&& break \
; done)
&& xvfb-run pytest -v -n 6 --dist loadfile --max-worker-restart 4 --durations=20 --cov=mslib \
${{ (matrix.order == 'normal' && ' ') || (matrix.order == 'reverse' && '--reverse') }} tests
- name: Collect coverage
if: ${{ success() && inputs.event_name == 'push' && inputs.branch_name == 'develop' && inputs.xdist == 'no'}}
env:
if: ${{ success() && inputs.event_name == 'push' && inputs.branch_name == 'develop' && matrix.order == 'normal' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd $GITHUB_WORKSPACE \
Expand All @@ -122,7 +105,7 @@ jobs:
&& coveralls --service=github
- name: Invoke dockertesting image creation
if: ${{ always() && inputs.event_name == 'push' && env.triggerdockerbuild == 'yes' && inputs.xdist == 'no'}}
if: ${{ always() && inputs.event_name == 'push' && env.triggerdockerbuild == 'yes' && matrix.order == 'normal' }}
uses: benc-uk/[email protected]
with:
workflow: Update Image testing-${{ inputs.branch_name }}
Expand Down
Loading

0 comments on commit dfce460

Please sign in to comment.