Skip to content

Commit 03c45b5

Browse files
Merge branch 'release_0.9.0' into 46-manipulations-dot-py-rewrite
2 parents 30f8bf0 + e70bec6 commit 03c45b5

31 files changed

+95124
-161
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,22 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [macos-latest, ubuntu-latest, windows-latest]
17-
python-version: ['3.9', '3.10', '3.11']
17+
python-version: ['3.10', '3.11']
1818
fail-fast: false
1919

2020
steps:
2121

2222
- name: Obtain SasData source from git
23-
uses: actions/checkout@v1
23+
uses: actions/checkout@v4
2424

2525
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v1
26+
uses: actions/setup-python@v5
2727
with:
2828
python-version: ${{ matrix.python-version }}
29-
30-
### Caching of pip downloads and local wheel builds
31-
- name: Get pip cache dir
32-
id: pip-cache
33-
run: |
34-
echo "name={$(pip cache dir)}" >> $GITHUB_OUTPUT
35-
36-
- name: Obtain pip cache (Linux)
37-
uses: actions/cache@v2
38-
with:
39-
path: ${{ steps.pip-cache.outputs.name }}
40-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/test.yml') }}
41-
restore-keys: |
42-
${{ runner.os }}-pip-${{ matrix.python-version }}-
43-
${{ runner.os }}-pip-
29+
cache: 'pip'
30+
cache-dependency-path: |
31+
**/ci.yml
32+
**/requirements*.txt
4433
4534
### Installation of build-dependencies
4635

@@ -59,6 +48,18 @@ jobs:
5948
python setup.py build
6049
python -m pip install .
6150
51+
### Build documentation (if enabled)
52+
53+
- name: Install doc-building dependencies
54+
if: matrix.os == 'ubuntu-latest'
55+
run: |
56+
python -m pip install sphinx
57+
58+
- name: Build sasdata docs (Ubuntu only)
59+
if: matrix.os == 'ubuntu-latest'
60+
run: |
61+
make -C docs html
62+
6263
- name: Test with pytest
6364
run: |
6465
python -m pytest -v -s test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
*.so
2121
*.exe
2222

23-
/build
23+
**/generated
24+
**/build
2425
/dist
2526
.mplconfig
2627

LICENSE.TXT

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Copyright (c) 2009-2022, SasView Developers
2-
1+
Copyright (c) 2009-2024, SasView Developers
32

43
All rights reserved.
54

docs/Makefile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Minimal makefile for Sphinx documentation
2+
3+
# Environment variables
4+
SPHINXOPTS ?=
5+
SPHINXBUILD ?= sphinx-build
6+
SPHINXAPIDOC ?= sphinx-apidoc
7+
APIOPTS = -d 8 -H SasData
8+
DOCSDIR = docs
9+
SOURCEDIR = source
10+
BUILDDIR = build
11+
DEVDIR = dev
12+
LIBDIR = lib
13+
GENDIR = generated
14+
UP = ..
15+
16+
ifdef ComSpec
17+
RMDIR = rmdir /s/q
18+
MKDIR = mkdir
19+
PATHSEP = $(strip \)
20+
else
21+
RMDIR = rm -rf
22+
MKDIR = mkdir -p
23+
PATHSEP = $(strip /)
24+
endif
25+
26+
SASDATABUILD = $(UP)$(PATHSEP)$(BUILDDIR)$(PATHSEP)$(LIBDIR)
27+
DOCSSRC = $(SOURCEDIR)
28+
DEV = $(DOCSSRC)$(PATHSEP)$(DEVDIR)
29+
DEVGEN = $(DEV)$(PATHSEP)$(GENDIR)
30+
DOCSBUILD = $(DOCSSRC)$(PATHSEP)$(BUILDDIR)
31+
32+
# Put it first so that "make" without argument is like "make help".
33+
help:
34+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35+
36+
clean:
37+
-$(RMDIR) "$(DEVGEN)" "$(DOCSBUILD)"
38+
39+
dir:
40+
-$(MKDIR) "$(DEVGEN)"
41+
-$(MKDIR) "$(DOCSBUILD)"
42+
43+
.PHONY: help Makefile
44+
45+
# Generate the api docs
46+
api:
47+
$(SPHINXAPIDOC) -o "$(DEVGEN)" $(APIOPTS) "$(SASDATABUILD)"
48+
49+
html: dir api
50+
@$(SPHINXBUILD) -M $@ "$(DOCSSRC)" "$(DOCSBUILD)" $(SPHINXOPTS) $(O)
51+
52+
# Catch-all target: route all unknown targets to Sphinx using the new
53+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
54+
%: Makefile
55+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/conf.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
3+
# -- Project information ----------------------------------------------------
4+
import datetime
5+
import os
6+
7+
from sasdata import __version__ as sasdata_version
8+
9+
if os.path.exists('rst_prolog'):
10+
with open('rst_prolog') as fid:
11+
rst_prolog = fid.read()
12+
13+
# General information about the project.
14+
year = datetime.datetime.now().year
15+
16+
project = 'SasData'
17+
copyright = f'{year}, The SasView Project'
18+
author = 'SasView'
19+
release = sasdata_version
20+
21+
# -- General configuration ---------------------------------------------------
22+
23+
extensions = [
24+
'sphinx.ext.autodoc',
25+
'sphinx.ext.autosummary',
26+
]
27+
28+
templates_path = ['_templates']
29+
exclude_patterns = []
30+
31+
# -- Options for HTML output -------------------------------------------------
32+
33+
html_theme = 'default'
34+
html_static_path = ['_static']

docs/source/dev/dev.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. dev.rst
2+
3+
.. _dev:
4+
5+
Developer Documentation
6+
=======================
7+
8+
.. toctree::
9+
:maxdepth: 8
10+
11+
SasData <generated/sasdata>

docs/source/index.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.. sasdata documentation master file, created by
2+
sphinx-quickstart on Wed Sep 27 16:53:29 2023.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
SasData Documentation
7+
=====================
8+
9+
Contents
10+
--------
11+
12+
**SasData** is a Python library for importing and exporting reduced small-angle scattering data.
13+
14+
.. toctree::
15+
:maxdepth: 1
16+
17+
User Documentation <user/user>
18+
19+
Developer Documentation <dev/dev>
20+
21+
Release Note <user/RELEASE>
22+
23+
Indices and Search
24+
------------------
25+
26+
* :ref:`genindex`
27+
* :ref:`search`

docs/source/rst_prolog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. Set up some substitutions to make life easier...
2+
3+
.. |Ang| unicode:: U+212B
4+
.. |Ang^-1| replace:: |Ang|\ :sup:`-1`
5+
.. |delta| unicode:: U+03B4

docs/source/user/RELEASE.rst

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
.. RELEASE.rst
2+
3+
.. _Release_Notes:
4+
5+
Release Notes
6+
=============
7+
8+
.. note:: In Windows use [Alt]-[Cursor left] to return to the previous page
9+
10+
.. toctree::
11+
:maxdepth: 1
12+
13+
Features
14+
========
15+
Wheel, egg, and tar.gz files are available on `pypi <https://pypi.org/project/sasdata/>`_.
16+
17+
New in Version 0.9.0
18+
--------------------
19+
This is an enhancement release with updates to the unit conversion routines, the ability to load data from URIs, the
20+
addition of a wedge slicer and other slicer enhancements.
21+
22+
What's Changed
23+
^^^^^^^^^^^^^^
24+
25+
Feature Enhancements
26+
____________________
27+
* Refactor nxsunit by @krzywon in https://github.com/SasView/sasdata/pull/13
28+
* Enable the sector slicing to allow both sides independantly by @butlerpd in https://github.com/SasView/sasdata/pull/36
29+
* Load data from URIs by @krzywon in https://github.com/SasView/sasdata/pull/37
30+
* SasData counterpart to SasView SlicerExtension_1344 by @jack-rooks in https://github.com/SasView/sasdata/pull/61
31+
32+
Bug Fixes
33+
_________
34+
* Fixing Issue #40 (but properly this time) by @ehewins in https://github.com/SasView/sasdata/pull/42
35+
* changed xaxis label for updated SESANS nomenclature from z to delta by @caitwolf in https://github.com/SasView/sasdata/pull/60
36+
* Fix delta in sesans docs by @caitwolf in https://github.com/SasView/sasdata/pull/65
37+
38+
Documentation Changes
39+
_____________________
40+
* Rework readme by @krzywon in https://github.com/SasView/sasdata/pull/15
41+
* Building sasdata documentation by @krzywon in https://github.com/SasView/sasdata/pull/53
42+
* Generate Developer Docs by @krzywon in https://github.com/SasView/sasdata/pull/56
43+
44+
Infrastructure Changes
45+
______________________
46+
* Remove entry_point from setup.py by @krzywon in https://github.com/SasView/sasdata/pull/2
47+
* Dependency cleanup by @krzywon in https://github.com/SasView/sasdata/pull/33
48+
* Move example data to sasdata by @krzywon in https://github.com/SasView/sasdata/pull/49
49+
* CI updates by @krzywon in https://github.com/SasView/sasdata/pull/50
50+
* Restrict lxml to versions less than 5.0 by @krzywon in https://github.com/SasView/sasdata/pull/63
51+
* Update example data by @smk78 in https://github.com/SasView/sasdata/pull/58
52+
* Fix broken unit test(s) by @krzywon in https://github.com/SasView/sasdata/pull/68
53+
54+
New in Version 0.8.1
55+
--------------------
56+
This is a point release to fix a build issue. The `sasdata.data_utils` package was omitted from setup.py causing an
57+
import issue in a separate repository.
58+
59+
New in Version 0.8
60+
------------------
61+
This release brings sasdata into parity with the matching `SasView <https://github.com/SasView/sasview/>`_ data
62+
elements. With this release, the master branch will be locked and all changes will need to be made using pull requests.
63+
64+
New in Version 0.7
65+
------------------
66+
This is the first official release of the sasdata package. This is a stand-alone package with the data
67+
import/export/manipulation available through the `SasView <https://github.com/SasView/sasview/>`_ application.

0 commit comments

Comments
 (0)