Skip to content

Commit

Permalink
Merge branch 'dev' into hackathon2024
Browse files Browse the repository at this point in the history
  • Loading branch information
djgroen authored Dec 4, 2024
2 parents 1e66dde + 02e0076 commit 87e6ce2
Show file tree
Hide file tree
Showing 26 changed files with 285 additions and 3,118 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@ jobs:
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py develop
pip install pytest-benchmark
python -m pip install .[tests]
- name: Benchmark with pytest
run: |
pytest tests/test_db_benchmark.py --benchmark-json output.json
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
9 changes: 4 additions & 5 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ jobs:
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install --editable .
python -m pip install flake8
python -m pip install --editable .[tests]
cd tests/cannonsim/src; make; cd ../../..
pip install pytest-cov
pip install coveralls
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Copy Dockerfile
run: |
cp tutorials/kubernetes/Dockerfile .
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install --editable .
python -m pip install setuptools
python -m pip install --editable .[docs]
cd tests/cannonsim/src; make; cd ../../..
pip install pdoc
- name: Checkout
uses: actions/checkout@v2.3.1
uses: actions/checkout@v3
- name: Build
run: |
export PDOC_ALLOW_EXEC=1
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install --editable .
python -m pip install flake8
python -m pip install --editable .[tests]
cd tests/cannonsim/src; make; cd ../../..
pip install pytest-cov
pip install coveralls
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine
- name: Build package
run: python -m build --sdist --wheel
- name: Check package
run: python -m twine check dist/*
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ pep.sh
*.csv
env/
.ipynb_checkpoints/
easyvvuq/_version.py
12 changes: 6 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ sphinx:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
python:
install:
- method: pip
path: .
extra_requirements:
- docs
14 changes: 8 additions & 6 deletions easyvvuq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
from . import analysis
from . import comparison

# First make sure python version is 3.6+
assert sys.version_info >= (3, 6), (f"Python version must be >= 3.6,"
f"found {sys.version_info}")
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version("easyvvuq")
except PackageNotFoundError:
from setuptools_scm import get_version # type: ignore[import]

__version__ = get_version(root="..", relative_to=__file__)

__copyright__ = """
Expand All @@ -36,6 +41,3 @@
"""
__license__ = "LGPL"

from . import _version
__version__ = _version.get_versions()['version']
Loading

0 comments on commit 87e6ce2

Please sign in to comment.