Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/HEAD' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
andped10 committed Jan 17, 2024
2 parents e759eff + 71fbb17 commit 6fb6111
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: "CodeQL"

on:
push:
branches: [master, pre-release, develop]
branches: [ main, pre-release, develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
branches: [ main ]
schedule:
- cron: '0 16 * * 5'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# This is a basic workflow to help you get started with Actions
# This pipeline
# - build html documentation
# - deploy html documentation to gh-pages branch of the same repository

name: Build Documentation
name: Build and Deploy Documentation

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]

Expand All @@ -24,11 +26,11 @@ jobs:
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install EasyReflectometry and dependencies
- name: Install Pandoc, EasyReflectometry and dependencies
run: |
sudo apt install pandoc
pip install . '.[dev]'
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/ci_pip.yml → .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# This workflow will for a variety of Python versions
# - install the code base
# - lint the code base
# - test the code base
# - upload the test coverage to codecov
#
# It will also
# - build the package
# - check the package
#
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: CI using pip

on: [push, pull_request]
Expand Down Expand Up @@ -37,15 +49,15 @@ jobs:
tox
- name: Upload coverage
uses: codecov/codecov-action@v1.0.7
uses: codecov/codecov-action@v3
with:
name: Pytest coverage
env_vars: OS,PYTHON,GITHUB_ACTIONS,GITHUB_ACTION,GITHUB_REF,GITHUB_REPOSITORY,GITHUB_HEAD_REF,GITHUB_RUN_ID,GITHUB_SHA,COVERAGE_FILE
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}

test_Packaging:
Package_Testing:

runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
Expand All @@ -57,13 +69,12 @@ jobs:
with:
python-version: 3.9

- name: install pypa/build
run: python -m pip install build --user

- name: build a binary wheel and source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Install dependencies and build
run: |
pip install -e '.[dev]'
python -m build
- name: Check Build
run: |
pip install twine
python -m twine check dist/*
cd ./dist
pytest ../
16 changes: 10 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# This workflow will for a variety of Python versions
# - build a python package
# - run tests on the produced package
# - upload the package as an artifact
#
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package testing
name: Create Python Package

on:
push:
branches: [master, pre-release]
branches: [ main, pre-release ]
pull_request:
branches: [master, pre-release]
branches: [ main, pre-release ]

jobs:
build:
Expand All @@ -23,10 +27,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies and build
run: |
pip install -e '.[dev]'
pip install build --sdist --wheel --outdir dist/ .
python -m build
- name: Test with pytest
run: |
cd ./dist
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# This workflows will upload a Python Package using Twine when a release is created
# This workflow will
# - build distribution package, pure python wheel
# - deploy produced distribution package to PyIP
#
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package
name: Deploy Python Package

on:
workflow_dispatch:
push:
branches: [ master ]
branches: [main]
tags:
- 'v*'

Expand All @@ -16,20 +19,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: Gr1N/setup-poetry@v7
- name: Install dependencies
python-version: 3.9

- name: Install dependencies and build
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Build
run: |
pip install build
python -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_PASSWORD }}
2 changes: 1 addition & 1 deletion EasyReflectometry/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAJOR = 0
MINOR = 0
MICRO = 2
MICRO = 3
__version__ = f'{MAJOR:d}.{MINOR:d}.{MICRO:d}'
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

|
.. image:: https://github.com/easyScience/EasyReflectometryLib/actions/workflows/ci_pip.yml/badge.svg
:target: https://github.com/easyScience/easyReflectometryLib/actions/workflows/ci_pip.yml
.. image:: https://github.com/easyScience/EasyReflectometryLib/actions/workflows/python-ci.yml/badge.svg
:target: https://github.com/easyScience/easyReflectometryLib/actions/workflows/python-ci.yml
.. image:: https://codecov.io/gh/easyScience/EasyReflectometryLib/branch/main/graph/badge.svg?token=LcnB8AMGkw
:target: https://codecov.io/gh/easyScience/EasyReflectometryLib
.. image:: https://www.codefactor.io/repository/github/easyscience/easyreflectometrylib/badge
Expand All @@ -21,5 +21,9 @@ What is EasyReflectometry?

EasyReflectometry is a reflectometry analysis package built on the `easyScience framework`_.

This is the documentation for the EasyReflectometry Python library, but a graphical user application is also available.
Find out about that at `easyreflectometry.org`_.


.. _`easyScience framework`: https://easyscience.software
.. _`easyreflectometry.org`: https://easyreflectometry.org
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "EasyReflectometryLib"
version = "0.0.2"
version = "0.0.3"
description = "A reflectometry python package built on the EasyScience framework."
readme = "README.rst"
authors = [
Expand All @@ -25,7 +25,7 @@ classifiers = [
]
requires-python = ">=3.9,<3.12"
dependencies = [
"easyScienceCore @ git+https://github.com/easyscience/easycore.git@failed_unit_check",
"easyScienceCore>=0.3.1",
"refnx>=0.1.15",
"refl1d>=0.8.14",
"scipp>=23.12.0",
Expand All @@ -34,6 +34,7 @@ dependencies = [

[project.optional-dependencies]
dev = [
"build",
"codecov>=2.1.11",
"coverage",
"coveralls",
Expand Down Expand Up @@ -72,7 +73,7 @@ packages = ["EasyReflectometry"]
legacy_tox_ini = """
[tox]
isolated_build = True
envlist = py{38,39,310,311}
envlist = py{39,310,311}
[gh-actions]
python =
3.9: py39
Expand Down

0 comments on commit 6fb6111

Please sign in to comment.