Skip to content

Commit

Permalink
Merge pull request #19 from GeoStat-Framework/refactor_2023
Browse files Browse the repository at this point in the history
Refactor 2023
  • Loading branch information
MuellerSeb authored Apr 15, 2023
2 parents 000fcdd + 1b69da6 commit 061dc2f
Show file tree
Hide file tree
Showing 34 changed files with 285 additions and 235 deletions.
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
38 changes: 22 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,56 @@ jobs:
source_check:
name: source check
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions\setup-python@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black 'pylint<3'
pip install --editable .
pip install --editable .[check]
- name: black check
run: |
python -m black --check --diff --color .
- name: isort check
run: |
python -m isort --check --diff --color .
- name: pylint check
run: |
python -m pylint pentapy/
python -m pylint src/pentapy/
build_wheels:
name: wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: wheels for ${{ matrix.cfg.os }} / ${{ matrix.cfg.arch }}
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
cfg:
- { os: ubuntu-latest, arch: x86_64 }
- { os: ubuntu-latest, arch: i686 }
- { os: windows-latest, arch: AMD64 }
- { os: windows-latest, arch: x86 }
- { os: macos-latest, arch: x86_64 }
- { os: macos-latest, arch: arm64 }
- { os: macos-latest, arch: universal2 }

steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'

- name: Build wheels
uses: pypa/cibuildwheel@v1.11.1.post1
uses: pypa/cibuildwheel@v2.12.1
env:
CIBW_BUILD: cp36-* cp37-* cp38-* cp39-*
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND: pytest -v {project}/tests
CIBW_ARCHS: ${{ matrix.cfg.arch }}
with:
output-dir: dist

Expand All @@ -82,7 +88,7 @@ jobs:
fetch-depth: '0'

- name: Set up Python ${{ matrix.python-version }}
uses: actions\setup-python@v2
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

Expand Down
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ celerybeat-schedule
venv/
ENV/

# Spyder project settings
# IDE project settings
.spyderproject
.spyproject
.vscode

# Rope project settings
.ropeproject
Expand All @@ -113,4 +114,8 @@ info/
paper/compile

# setuptools_scm generated version files
pentapy/_version.py
src/pentapy/_version.py

# generated docs
docs/source/examples/
docs/source/api/
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
All notable changes to **pentapy** will be documented in this file.


## [1.2.0] - 2023-04

See [#19](https://github.com/GeoStat-Framework/pentapy/pull/19)

### Enhancements
- added support for python 3.10 and 3.11
- add wheels for arm64 systems
- created `solver.pxd` file to be able to cimport the solver module
- added a `CITATION.bib` file

### Changes
- move to `src/` based package structure
- dropped python 3.7 support
- move meta-data to pyproject.toml
- simplified documentation

### Bugfixes
- determine correct version when installing from archive

## [1.1.2] - 2021-07

### Changes
Expand Down Expand Up @@ -65,6 +84,7 @@ This is the first release of pentapy, a python toolbox for solving pentadiagonal
The solver is implemented in cython, which makes it really fast.


[1.2.0]: https://github.com/GeoStat-Framework/pentapy/compare/v1.1.2...v1.2.0
[1.1.2]: https://github.com/GeoStat-Framework/pentapy/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/GeoStat-Framework/pentapy/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/GeoStat-Framework/pentapy/compare/v1.0.3...v1.1.0
Expand Down
13 changes: 13 additions & 0 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@Article{muller_pentapy_2019,
AUTHOR = {M\"uller, Sebastian},
TITLE = {pentapy: {A} {Python} toolbox for pentadiagonal linear systems},
SHORTTITLE = {pentapy},
JOURNAL = {Journal of Open Source Software},
VOLUME = {4},
YEAR = {2019},
NUMBER = {42},
PAGES = {1759},
URL = {https://joss.theoj.org/papers/10.21105/joss.01759},
DOI = {10.21105/joss.01759},
ISSN = {2475-9066},
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Sebastian Müller
Copyright (c) 2023 Sebastian Müller

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 4 additions & 7 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
prune *
graft tests
recursive-include pentapy *.py *.pyx
recursive-exclude pentapy *.c *.cpp
include LICENSE README.md pyproject.toml setup.py setup.cfg
exclude CHANGELOG.md CONTRIBUTING.md
global-exclude __pycache__ *.py[cod] .*
prune **
recursive-include tests *.py
recursive-include src/pentapy *.py *.pyx *.pxd
include LICENSE README.md pyproject.toml setup.py
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ On Windows you can install [WinPython][winpy_link] to get Python and pip running

pip install pentapy

There are pre-built wheels for Linux, MacOS and Windows for most Python versions (2.7, 3.4-3.7).

If your system is not supported and you want to have the Cython routines of
pentapy installed, you have to provide a c-compiler and run:

pip install numpy cython
pip install pentapy
There are pre-built wheels for Linux, MacOS and Windows for most Python versions.

To get the scipy solvers running, you have to install scipy or you can use the
following extra argument:
Expand Down Expand Up @@ -127,7 +121,7 @@ You can contact us via <[email protected]>.

## License

[MIT][licence_link] © 2019 - 2021
[MIT][licence_link] © 2019 - 2023

[ref_link]: http://dx.doi.org/10.1155/2015/232456
[pip_link]: https://pypi.org/project/pentapy
Expand Down
3 changes: 3 additions & 0 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dl.py.property {
display: block !important;
}
13 changes: 13 additions & 0 deletions docs/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:undoc-members:
:inherited-members:
:show-inheritance:

.. raw:: latex

\clearpage
9 changes: 9 additions & 0 deletions docs/source/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ fullname }}

.. automodule:: {{ fullname }}

.. raw:: latex

\clearpage
42 changes: 24 additions & 18 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
{% extends "!layout.html" %}
{% block menu %}
<p class="link caption"><span class="link caption-text">Documentation</span></p>
{{ super() }}
<br />
<p class="link caption"><span class="link caption-text">pentapy Links</span></p>
<a href="https://github.com/GeoStat-Framework/pentapy">pentapy GitHub</a>
<a href="https://zenodo.org/record/2587215">pentapy Zenodo DOI</a>
<a href="https://pypi.org/project/pentapy/">pentapy PyPI</a>
<br />
<p class="link caption"><span class="link caption-text">GeoStat Framework</span></p>
<a href="https://geostat-framework.org">GeoStat Website</a>
<a href="https://github.com/GeoStat-Framework">GeoStat Github</a>
<a href="https://github.com/GeoStat-Examples">GeoStat Examples</a>
<a href="https://geostat-framework.readthedocs.io">GeoStat ReadTheDocs</a>
<a href="https://pypi.org/user/geostatframework/">GeoStat PyPI</a>
<br />
<br />
<a href="genindex.html">Index</a>
<a href="contents.html">Sitemap</a>
<p class="link caption"><span class="link caption-text">Documentation</span></p>
{{ super() }}
<br />
<p class="link caption"><span class="link caption-text">pentapy Links</span></p>
<ul>
<Li><a href="https://github.com/GeoStat-Framework/pentapy">pentapy GitHub</a></Li>
<a href="https://zenodo.org/record/2587215">pentapy Zenodo DOI</a></Li>
<a href="https://pypi.org/project/pentapy/">pentapy PyPI</a></Li>
</ul>
<br />
<p class="link caption"><span class="link caption-text">GeoStat Framework</span></p>
<ul>
<Li><a href="https://geostat-framework.org">GeoStat Website</a></Li>
<Li><a href="https://github.com/GeoStat-Framework">GeoStat Github</a></Li>
<Li><a href="https://github.com/GeoStat-Examples">GeoStat Examples</a></Li>
<Li><a href="https://geostat-framework.readthedocs.io">GeoStat ReadTheDocs</a></Li>
<Li><a href="https://pypi.org/user/geostatframework/">GeoStat PyPI</a></Li>
</ul>
<br />
<br />
<ul>
<Li><a href="{{ pathto('genindex') }}">Index</a></Li>
<Li><a href="{{ pathto(master_doc) }}">Sitemap</a></Li>
</ul>
{% endblock %}
6 changes: 0 additions & 6 deletions docs/source/package.rst → docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,3 @@ pentapy API
.. raw:: latex

\clearpage

.. toctree::
:hidden:

core.rst
tools.rst
21 changes: 12 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# GeoStatTools documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 5 14:20:43 2018.
#
Expand Down Expand Up @@ -56,7 +53,7 @@ def setup(app):
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.imgmath",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
Expand All @@ -77,7 +74,10 @@ def setup(app):
# Notes in boxes
napoleon_use_admonition_for_notes = True
# Attributes like parameters
# napoleon_use_ivar = True
napoleon_use_ivar = True
# keep "Other Parameters" section
# https://github.com/sphinx-doc/sphinx/issues/10330
napoleon_use_param = False
# this is a nice class-doc layout
numpydoc_show_class_members = True
# class members have no separate file, so they are not in a toctree
Expand Down Expand Up @@ -118,7 +118,7 @@ def setup(app):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -150,14 +150,18 @@ def setup(app):
# Toc options
"collapse_navigation": False,
"sticky_navigation": True,
"navigation_depth": 4,
"navigation_depth": 6,
"includehidden": True,
"titles_only": False,
}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
html_static_path = ["_static"]

# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
html_css_files = ["custom.css"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -243,7 +247,6 @@ def setup(app):

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"Python 3.6": ("https://docs.python.org/3.6", None),
"Python": ("https://docs.python.org/", None),
"NumPy": ("http://docs.scipy.org/doc/numpy/", None),
"Sphinx": ("http://www.sphinx-doc.org/en/stable/", None),
Expand Down
4 changes: 2 additions & 2 deletions docs/source/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Contents

.. toctree::
:includehidden:
:maxdepth: 3
:maxdepth: 6

index
examples/index
package
api
changelog
10 changes: 0 additions & 10 deletions docs/source/core.rst

This file was deleted.

10 changes: 1 addition & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,7 @@ Python and pip running.
pip install pentapy
There are pre-built wheels for Linux, MacOS and Windows for most Python versions (2.7, 3.4-3.7).

If your system is not supported and you want to have the Cython routines of
pentapy installed, you have to provide a c-compiler and run:

.. code-block:: none
pip install numpy cython
pip install pentapy
There are pre-built wheels for Linux, MacOS and Windows for most Python versions.

To get the scipy solvers running, you have to install scipy or you can use the
extra argument:
Expand Down
Loading

0 comments on commit 061dc2f

Please sign in to comment.