Skip to content

Commit 4ac161b

Browse files
Merge pull request #160 from EasyScience/develop
New release
2 parents bfa5b0a + 0cea3ba commit 4ac161b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3166
-4572
lines changed

.github/release-drafter.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
1+
# This file is used to configure the Release Drafter GitHub Action
12
# https://github.com/marketplace/actions/release-drafter
2-
name-template: v$NEXT_PATCH_VERSION 🌈
3-
tag-template: v$NEXT_PATCH_VERSION
3+
4+
name-template: 'EasyDiffraction $RESOLVED_VERSION'
5+
tag-template: 'v$RESOLVED_VERSION'
46
categories:
5-
- title: 🚀 Features
6-
labels:
7-
- feature
8-
- enhancement
9-
- title: 🐛 Bug Fixes
10-
labels:
11-
- fix
12-
- bugfix
13-
- bug
14-
- title: 🧰 Maintenance
15-
labels:
16-
- chore
17-
- documentation
18-
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
7+
- title: 'Added'
8+
labels: # Labels to use to categorize a pull request as a feature
9+
- 'enhancement'
10+
- title: 'Fixed'
11+
labels: # Labels to use to categorize a pull request as a bug fix
12+
- 'bug'
13+
- title: 'Changed'
14+
labels: # Labels to use to categorize a pull request as a maintenance task
15+
- 'chore'
16+
- 'documentation'
17+
- 'refactor'
18+
change-template: '- $TITLE (#$NUMBER)'
19+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
1920
version-resolver:
2021
major:
2122
labels:
22-
- major
23+
- 'major'
2324
minor:
2425
labels:
25-
- minor
26+
- 'enhancement'
2627
patch:
2728
labels:
28-
- patch
29+
- 'bug'
30+
- 'chore'
31+
- 'documentation'
32+
- 'refactor'
2933
default: patch
3034
template: |
31-
## Changes
3235
$CHANGES

.github/workflows/delete-old-runs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# This workflow will delete old workflow runs based on the input parameters.
1+
# This workflow will delete old workflow runs based on the input
2+
# parameters.
23
# https://github.com/Mattraks/delete-workflow-runs
34

45
name: Delete old workflow runs

.github/workflows/ossar-analysis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Integrates a collection of open source static analysis tools with GitHub code scanning.
1+
# Integrates a collection of open source static analysis tools with
2+
# GitHub code scanning.
23
# https://github.com/github/ossar-action
34

45
name: Run security static analysis

.github/workflows/pypi-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Builds a Python package and publish it to PyPI when a new tag is created.
1+
# Builds a Python package and publish it to PyPI when a new tag is
2+
# created.
23

34
name: Upload release to PyPI
45

@@ -19,6 +20,8 @@ jobs:
1920
steps:
2021
- name: Check-out repository
2122
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: '0' # full history with tags to get the version number by versioningit
2225

2326
- name: Set up Python
2427
uses: actions/setup-python@v5

.github/workflows/release-drafter.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Drafts your next Release notes as pull requests are merged into default branch
1+
# Drafts your next Release notes as pull requests are merged into
2+
# default branch
23

34
name: Update release draft
45

@@ -14,7 +15,7 @@ jobs:
1415

1516
steps:
1617
- uses: release-drafter/release-drafter@v6
17-
id: create_release
18+
id: create-release
1819
env:
1920
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2021

@@ -31,7 +32,7 @@ jobs:
3132
env:
3233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3334
with:
34-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the create_release step above
35+
upload_url: ${{ steps.create-release.outputs.upload_url }} # This pulls from the create-release step above
3536
asset_path: ./examples.zip
3637
asset_name: examples.zip
3738
asset_content_type: application/zip

.github/workflows/test-code.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
steps:
4545
- name: Checkout repository
4646
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: '0' # full history with tags to get the version number by versioningit
4749

4850
- name: Set up Python
4951
uses: actions/setup-python@v5
@@ -83,6 +85,8 @@ jobs:
8385
steps:
8486
- name: Checkout repository
8587
uses: actions/checkout@v4
88+
with:
89+
fetch-depth: '0' # full history with tags to get the version number by versioningit
8690

8791
- name: Set up Python ${{ matrix.python-version }}
8892
uses: actions/setup-python@v5

.github/workflows/test-ipynb.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
steps:
3535
- name: Checkout repository
3636
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: '0' # full history with tags to get the version number by versioningit
3739

3840
- name: Set up Python
3941
uses: actions/setup-python@v5
@@ -69,6 +71,8 @@ jobs:
6971
steps:
7072
- name: Check-out repository
7173
uses: actions/checkout@v4
74+
with:
75+
fetch-depth: '0' # full history with tags to get the version number by versioningit
7276

7377
- name: Set up Python environment
7478
uses: actions/setup-python@v5

.github/workflows/test-package.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
steps:
5252
- name: Checkout repository
5353
uses: actions/checkout@v4
54+
with:
55+
fetch-depth: '0' # full history with tags to get the version number by versioningit
5456

5557
- name: Set up Python ${{ matrix.python-version }}
5658
uses: actions/setup-python@v5
@@ -104,6 +106,10 @@ jobs:
104106
name: EasyDiffractionLib_py${{ matrix.python-version }}_${{ matrix.os }}_${{ runner.arch }}
105107
path: . # directory to extract downloaded zipped artifacts
106108

109+
# The local version must be higher than the PyPI version for pip to
110+
# prefer the local version. So, after a new release and a new tag,
111+
# remember to merge the master branch with the develop branch,
112+
# and then create a new feature branch from the develop branch.
107113
- name: Install Python package from previous job with 'dev' extras
108114
run: pip install 'easydiffraction[dev]' --find-links=dist
109115

@@ -117,7 +123,7 @@ jobs:
117123
shell: bash
118124
run: >
119125
pytest
120-
--nbmake examples
126+
--nbmake examples/
121127
--ignore-glob='examples/*emcee*'
122128
--nbmake-timeout=300
123129
--color=yes

.github/workflows/verify-pr-labels.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Verifies if a pull request has at least one label from a set of valid labels before it can be merged.
1+
# Verifies if a pull request has at least one label from a set of valid
2+
# labels before it can be merged.
23

34
name: Verify pull request labels
45

@@ -18,6 +19,6 @@ jobs:
1819
uses: jesusvasquez333/[email protected]
1920
with:
2021
github-token: ${{ secrets.GITHUB_TOKEN }}
21-
valid-labels: chore, fix, bugfix, bug, enhancement, feature, dependencies, documentation
22+
valid-labels: 'enhancement, bug, chore, documentation, refactor'
2223
pull-request-number: ${{ github.event.pull_request.number }}
2324
disable-reviews: false

DEVELOPMENT.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Development
22

3-
This is an example of a workflow that describes the development process.
3+
This is an example of a workflow that describes the development process.
44

55
* Clone EasyDiffractionLib repository
66
```console
@@ -27,18 +27,19 @@ This is an example of a workflow that describes the development process.
2727
```console
2828
python -m pip install --upgrade pip
2929
```
30-
* Install easydiffraction from root with `dev` extras for development
30+
* Install easydiffraction from root with `dev` extras for development
3131
```console
3232
pip install '.[dev]'
3333
```
3434
* Make changes in the code
3535
* Run Ruff - Python linter and code formatter (configuration is in pyproject.toml)
3636
```console
37-
ruff check . --fix
37+
ruff check --fix # Linting (overwriting files)
38+
ruff format # Formatting (overwriting files)
3839
```
3940
* Run python tests
4041
```console
41-
pytest tests/ --color=yes -n auto
42+
pytest tests/ --color=yes -n auto
4243
```
4344
* Clear all Jupyter notebooks output
4445
```console

0 commit comments

Comments
 (0)