Skip to content

Commit

Permalink
Merge branch 'master' into poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
hechth authored Jul 8, 2024
2 parents ece56c0 + 088628d commit dcae0b7
Show file tree
Hide file tree
Showing 21 changed files with 413 additions and 2,183 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Python package
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

jobs:

Expand All @@ -17,11 +17,11 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Python info
Expand All @@ -31,32 +31,32 @@ jobs:
python --version
- name: Upgrade pip and install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .[dev,publishing]
python -m pip install --upgrade pip poetry
poetry install
- name: Run unit tests
run: python -m pytest -v
run: poetry run pytest
- name: Verify that we can build the package
run: python -m build
run: poetry build

lint:
name: Linting build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11
- name: Python info
shell: bash -e {0}
run: |
which python
python --version
- name: Upgrade pip and install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .[dev,publishing]
python -m pip install --upgrade pip poetry
poetry install --with dev
- name: Check style against standards using ruff
run: ruff .
run: poetry run ruff check .
6 changes: 3 additions & 3 deletions .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: cffconvert
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

jobs:

verify:
name: "cffconvert"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out a copy of the repository

- name: Check whether the citation metadata from CITATION.cff is valid
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: documentation
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

jobs:
build-documentation:
Expand All @@ -15,22 +15,22 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11
- name: Python info
shell: bash -e {0}
run: |
which python
python --version
- name: Upgrade pip and install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .[dev,publishing]
python -m pip install --upgrade pip poetry
poetry install --with dev
- name: Install pandoc using apt
run: sudo apt install pandoc
run: sudo apt install pandoc
- name: Build documentation
run: make coverage doctest html
working-directory: docs
6 changes: 3 additions & 3 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: markdown-link-check
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

jobs:

markdown-link-check:
name: Check markdown links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: '.mlc-config.json'
13 changes: 7 additions & 6 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ name: sonarcloud
on:
push:
branches:
- main
- master
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- master

jobs:

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Python info
Expand All @@ -28,9 +28,10 @@ jobs:
which python
python --version
- name: Install dependencies
run: python -m pip install .[dev]
python -m pip install --upgrade pip poetry
poetry install
- name: Run unit tests with coverage
run: python -m pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml tests/
run: poetry run pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml tests/
- name: Correct coverage paths
run: sed -i "s+$PWD/++g" coverage.xml
- name: SonarCloud Scan
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ env
env3
venv
venv3

# poetry
poetry.lock
3 changes: 1 addition & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ authors:
family-names: Ahmad
given-names: Zargham
orcid: "https://orcid.org/0000-0000-0000-0000"
date-released: 20??-MM-DD
doi: <insert your DOI here>
date-released: 2024-06-19
version: "0.1.0"
repository-code: "https://github.com/RECETOX/rcx-tk"
keywords:
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXBUILD = poetry run sphinx-build
SPHINXPROJ = rcx_tk
SOURCEDIR = .
BUILDDIR = _build
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# -- Project information -----------------------------------------------------

project = u"rcx_tk"
copyright = u"2024, Netherlands eScience Center"
copyright = u"2024, RECETOX, Masaryk University"
author = u"Zargham Ahmad"

# The version info for the project you're documenting, acts as replacement for
Expand Down
2 changes: 1 addition & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pushd %~dp0
REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
set SPHINXBUILD=poetry run sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
Expand Down
Loading

0 comments on commit dcae0b7

Please sign in to comment.