Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/master/sphinx-gallery-0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPdeS authored Dec 10, 2024
2 parents cea772b + 1960638 commit 490f422
Show file tree
Hide file tree
Showing 50 changed files with 2,610 additions and 1,742 deletions.
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
max-line-length = 300
exclude =
.git
docs/build
docs/source/gallery
development

count = true
per-file-ignores =
__init__.py: F403, F401
20 changes: 20 additions & 0 deletions .github/workflows/deploy_PyPi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy to PyPi

on:
push:
branches: [ "master" ]
tags:
- '*'
pull_request:
branches: [ "master" ]

permissions:
contents: write

jobs:
ManyLinux_x86_64:
uses: MartinPdeS/MPSActions/.github/workflows/publish_compiled_package_to_PyPi.yml@master
with:
python-version: "3.11"
secrets:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/deploy_anaconda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy Conda Packages

on:
push:
branches: [ "master" ]
tags:
- '*'
pull_request:
branches: [ "master" ]

permissions:
contents: write

jobs:
ManyLinux_x86_64:
uses: MartinPdeS/MPSActions/.github/workflows/publish_compiled_package_to_anaconda.yml@master
with:
python-versions: '["3.11", "3.12"]'
secrets:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}

55 changes: 14 additions & 41 deletions .github/workflows/deploy_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# .github/workflows/coverage.yml
name: Coverage
# Simple workflow for deploying static content to GitHub Pages
name: Deploy coverage

on:
push:
Expand All @@ -9,44 +9,17 @@ on:
pull_request:
branches: [ "master" ]

jobs:
coverage:
name: Run test and generate coverage data
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write

steps:
- name: "Set-up: Python ${{ env.cp_python_version }}"
uses: actions/setup-python@v4
id: cp310
with:
python-version: "3.10"


- name: "Install: Dependencies for headless server"
shell: bash
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-glx xvfb
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

- name: "Checkout requirements and files for testing"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Install everything, run the tests, produce the .coverage file
run: |
python -m pip install wheel build
python -m build --wheel
python -m pip install .[testing]
pytest
- name: Coverage comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MINIMUM_GREEN: 90
MINIMUM_ORANGE: 50
jobs:
ManyLinux_x86_64:
uses: MartinPdeS/MPSActions/.github/workflows/publish_coverage.yml@master
with:
python-version: "3.11"
secrets:
_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61 changes: 12 additions & 49 deletions .github/workflows/deploy_documentation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# .github/workflows/deploy_documentation.yml
name: Documentation
# Simple workflow for deploying static content to GitHub Pages
name: Deploy documentation to github page

on:
push:
Expand All @@ -9,52 +9,15 @@ on:
pull_request:
branches: [ "master" ]

jobs:
documentation:
name: Run the documentation building tools
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write

steps:
- name: "Set-up: Python 3.10"
uses: actions/setup-python@v4
id: cp310
with:
python-version: "3.10"

- name: "Install: Dependencies for headless server"
shell: bash
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-glx xvfb
- name: "Checkout requirements and files for testing"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Install everything, run the tests, produce the .coverage file
run: |
python -m pip install wheel build
python -m build --wheel
python -m pip install .[documentation]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
sphinx-build docs/source _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
jobs:
ManyLinux_x86_64:
uses: MartinPdeS/MPSActions/.github/workflows/publish_documentation.yml@master
with:
python-version: "3.11"
42 changes: 0 additions & 42 deletions .github/workflows/deploy_workflow.yml

This file was deleted.

36 changes: 18 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# General patterns
*.DS_store
*.ipynb_checkpoints*
*__pycache__*
*.so
*.a
*.pdf
*.pickle


.tox
.coverage.*
coverage.json
htmlcov
.coverage*
*.pytest_cache
SuPyMode/user_data/*
!SuPyMode/user_data/__init__.py

htmlcov
dist
build
*.egg*
*.whl
.pdf
perso/

docs/source/gallery
docs/source/api

CMakeCache.txt
CMakeFiles
install_manifest.txt
cmake_install.cmake
.coverage
wheelhouse

# Docs-specific patterns
docs/source/gallery/*
!docs/source/gallery/index.rst
PyOptik/data/**/test*
PyOptik/data/**/example*

# Override for documentation_build
!documentation_build
!documentation_build/**


# Package specifics
SuPyMode/user_data/*
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "extern/eigen"]
path = extern/eigen
url = https://github.com/libigl/eigen.git
url = https://gitlab.com/libeigen/eigen.git
ignore = dirty
[submodule "extern/spectra"]
path = extern/spectra
Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ include_directories("${CMAKE_SOURCE_DIR}/SuPyMode/cpp/headers")
include_directories("${CMAKE_SOURCE_DIR}/extern/eigen/Eigen")
include_directories("${CMAKE_SOURCE_DIR}/extern/spectra")

add_compile_options("-w" "-Wdeprecated-declarations")

# Platform-specific settings for static linking
if (WIN32)
message("Windows OS detected")
Expand All @@ -42,7 +40,7 @@ message(STATUS "Binary will be installed in location: " ${SUPYMODE_BIN_DIR})
#Building EigenSolver----------------------------------------------
pybind11_add_module(EigenSolver MODULE "${SUPYMODE_CXX_DIR}/eigensolver_interface.cpp")
set_target_properties(EigenSolver PROPERTIES OUTPUT_NAME "CppSolver")
target_link_libraries(EigenSolver PRIVATE "${Eigen_LIBRARIES}")
target_include_directories(EigenSolver PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/extern/eigen")
target_link_options(EigenSolver PUBLIC ${STATIC_LINK_OPTIONS})
target_include_directories(EigenSolver PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/extern/eigen")
target_include_directories(EigenSolver PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/extern/spectra/include")
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ Email:`[email protected] <mailto:martin.poinsinet-de-sivry@po
:target: https://pypistats.org/packages/supymode

.. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/MartinPdeS/SuPyMode/blob/master/SuPyModes.ipynb
:target: https://colab.research.google.com/github/MartinPdeS/SuPyMode/blob/master/notebook.ipynb
4 changes: 2 additions & 2 deletions SuPyMode/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = version = '2.0.0.post2'
__version_tuple__ = version_tuple = (2, 0, 0)
__version__ = version = '2.0.3.0'
__version_tuple__ = version_tuple = (2, 0, 3, 0)
1 change: 0 additions & 1 deletion SuPyMode/directories.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'root_path',
'project_path',
'test_path',
'instance_directory',
'version_path',
'validation_data_path',
'doc_path',
Expand Down
Loading

0 comments on commit 490f422

Please sign in to comment.