Skip to content

Commit

Permalink
Merge branch 'stable' of github.com:stonerlab/Stoner-PythonCode
Browse files Browse the repository at this point in the history
  • Loading branch information
gb119 committed Dec 24, 2023
2 parents 78ed9e0 + 2e0b041 commit 9cde41b
Show file tree
Hide file tree
Showing 378 changed files with 9,899 additions and 8,919 deletions.
50 changes: 25 additions & 25 deletions .codacy.yaml
@@ -1,25 +1,25 @@
engines:
duplication:
enabled: true
exclude_paths:
- doc/**
bandit:
enabled: true
propspector:
enabled: true
pylint:
enabled: true



exclude_paths:
- 'build/**'
- 'dist/**'
- 'recipe/**'
- 'sample-data/**'
- 'Stoner.egginfo/**'
- 'tests/**'
- 'setup.py'
- '**/conf.py'
- 'doc/modified_plot_directive.py'

engines:
duplication:
enabled: true
exclude_paths:
- doc/**
bandit:
enabled: true
propspector:
enabled: true
pylint:
enabled: true



exclude_paths:
- 'build/**'
- 'dist/**'
- 'recipe/**'
- 'sample-data/**'
- 'Stoner.egginfo/**'
- 'tests/**'
- 'setup.py'
- '**/conf.py'
- 'doc/modified_plot_directive.py'

12 changes: 10 additions & 2 deletions .github/workflows/build_conda.yaml
Expand Up @@ -13,8 +13,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: [ "3.10"]
os: [ ubuntu-latest ]
python-version: ["3.10"]

steps:
- name: Checkout
Expand All @@ -37,3 +37,11 @@ jobs:
label: auto
overwrite: true
token: ${{ secrets.ANACONDA }} # Replace with the right name of your secret
- name: Upload wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*
36 changes: 21 additions & 15 deletions .github/workflows/run-tests-action.yaml
Expand Up @@ -10,29 +10,35 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9"]
python-version: ["3.9", "3.10", "3.11"]
os: ["ubuntu-latest"]
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/checkout@v3
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
echo " - python = ${{ matrix.python-version }}" >> tests/test-env.yml
$CONDA/bin/conda env update --file tests/test-env.yml --name base
environment-file: tests/test-env.yml
extra-specs: |
python=${{ matrix.python-version }}
channels: phygbu, conda-forge
channel-priority: flexible
- name: Conda info
run: $CONDA/bin/conda info
run: ${MAMBA_EXE} info
- name: Conda list
run: $CONDA/bin/conda list
run: ${MAMBA_EXE} list
- name: install package
run: $CONDA/bin/pip install --no-deps .
- name: Run headless test
run: sudo apt-get install xvfb
run: ${MAMBA_ROOT_PREFIX}/envs/test-environment/bin/pip install --no-deps .
- name: Install headless server
run: |
sudo apt-get install xvfb
sudo apt-get install qtbase5-dev
- name: Test with xvfb
run: xvfb-run --auto-servernum $CONDA/bin/pytest --cov-report=xml:cov.xml --cov=Stoner --junitxml pytest.xml
run: xvfb-run --auto-servernum ${MAMBA_ROOT_PREFIX}/envs/test-environment/bin/pytest --cov-report=xml:cov.xml --cov=Stoner --junitxml pytest.xml
env:
TZ: Europe/London
LC_CTYPE: en_GB.UTF-8
GH_ACTION: True
- name: Cleanup X11 server
uses: bcomnes/cleanup-xvfb@v1
- name: Run Coveralls
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
@@ -1,5 +1,12 @@
.eggs
untitled*.py
.pytest_cache
.ipynb_checkpoints
.spyproject
*.py[cod]
__pycache__
*.lock
*.dirlock

# sphinx
_build
Expand Down

0 comments on commit 9cde41b

Please sign in to comment.