-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into sym_pyobject
- Loading branch information
Showing
303 changed files
with
9,107 additions
and
3,561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Prevent git from showing duplicate names with commands like "git shortlog" | ||
# See the manpage of git-shortlog for details. | ||
# The syntax is: | ||
# Name that should be used <email that should be used> Bad name <bad email> | ||
# | ||
# You can skip Bad name if it is the same as the one that should be used, and is unique. | ||
# | ||
# This file is up-to-date if the command git log --format="%aN <%aE>" | sort -u | ||
# gives no duplicates. | ||
Colin B. Macdonald <[email protected]> Colin Macdonald <[email protected]> | ||
Colin B. Macdonald <[email protected]> Colin B. Macdonald <[email protected]> | ||
Colin B. Macdonald <[email protected]> Colin Macdonald <[email protected]> | ||
Abhinav Tripathi <[email protected]> Abhinav <[email protected]> | ||
Abhinav Tripathi <[email protected]> <[email protected]> | ||
Carnë Draug <[email protected]> carandraug <devnull@localhost> | ||
Carnë Draug <[email protected]> <[email protected]> | ||
John W. Eaton <[email protected]> jwe <devnull@localhost> | ||
Mike Miller <[email protected]> <[email protected]> | ||
Andrés Prieto <[email protected]> maprieto <[email protected]> | ||
utkarsh <[email protected]> utkarsh <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Name: symbolic | ||
Version: 2.4.0 | ||
Date: 2016-05-24 | ||
Version: 2.5.0 | ||
Date: 2017-02-01 | ||
Author: Colin B. Macdonald <[email protected]> | ||
Maintainer: Colin B. Macdonald <[email protected]> | ||
Title: Octave Symbolic Package using SymPy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
SHELL := /bin/bash | ||
|
||
## Copyright 2016-2017 Colin B. Macdonald | ||
## | ||
## Copying and distribution of this file, with or without modification, | ||
## are permitted in any medium without royalty provided the copyright | ||
## notice and this notice are preserved. This file is offered as-is, | ||
## without any warranty. | ||
|
||
PACKAGE := $(shell grep "^Name: " DESCRIPTION | cut -f2 -d" ") | ||
VERSION := $(shell grep "^Version: " DESCRIPTION | cut -f2 -d" ") | ||
MATLAB_PACKAGE_NAME := octsympy | ||
|
||
BUILD_DIR := tmp | ||
MATLAB_PKG := ${BUILD_DIR}/${MATLAB_PACKAGE_NAME}-matlab-${VERSION} | ||
MATLAB_PKG_ZIP := ${BUILD_DIR}/${MATLAB_PACKAGE_NAME}-matlab-${VERSION}.zip | ||
OCTAVE_RELEASE := ${BUILD_DIR}/${PACKAGE}-${VERSION} | ||
OCTAVE_RELEASE_TARBALL := ${BUILD_DIR}/${PACKAGE}-${VERSION}.tar.gz | ||
|
||
INSTALLED_PACKAGE := ~/octave/${PACKAGE}-${VERSION}/packinfo/DESCRIPTION | ||
HTML_DIR := ${BUILD_DIR}/${PACKAGE}-html | ||
HTML_TARBALL := ${HTML_DIR}.tar.gz | ||
|
||
OCTAVE ?= octave | ||
MATLAB ?= matlab | ||
|
||
.PHONY: help clean install test doctest dist dist_zip html matlab_test matlab_pkg | ||
|
||
help: | ||
@echo Available rules: | ||
@echo " clean clean all temporary files" | ||
@echo " install install package in Octave" | ||
@echo " test run tests with Octave" | ||
@echo " doctest run doctests with Octave" | ||
@echo " dist create Octave package (${OCTAVE_RELEASE_TARBALL})" | ||
@echo " html create Octave Forge website" | ||
@echo | ||
@echo " matlab_test run tests with Matlab" | ||
@echo " matlab_pkg create Matlab package (${MATLAB_PKG_ZIP})" | ||
|
||
|
||
GIT_DATE := $(shell git show -s --format=\%ci) | ||
# Follows the recommendations of https://reproducible-builds.org/docs/archives | ||
define create_tarball | ||
$(shell cd $(dir $(1)) \ | ||
&& find $(notdir $(1)) -print0 \ | ||
| LC_ALL=C sort -z \ | ||
| tar c --mtime="$(GIT_DATE)" \ | ||
--owner=root --group=root --numeric-owner \ | ||
--no-recursion --null -T - -f - \ | ||
| gzip -9n > "$(2)") | ||
endef | ||
|
||
%.tar.gz: % | ||
$(call create_tarball,$<,$(notdir $@)) | ||
|
||
%.zip: % | ||
cd "$(BUILD_DIR)" ; zip -9qr - "$(notdir $<)" > "$(notdir $@)" | ||
|
||
$(OCTAVE_RELEASE): .git/index | $(BUILD_DIR) | ||
@echo "Creating package version $(VERSION) release ..." | ||
-$(RM) -r "$@" | ||
git archive --format=tar --prefix="$@/" HEAD | tar -x | ||
$(RM) "$@/README.matlab.md" \ | ||
"$@/HOWTO-release.md" \ | ||
"$@/README.bundled.md" \ | ||
"$@/TODO.md" \ | ||
"$@/.gitignore" \ | ||
"$@/.travis.yml" \ | ||
"$@/.mailmap" \ | ||
"$@/screenshot.png" \ | ||
"$@/screenshot-install.png" | ||
$(RM) -r "$@/testing" "$@/util" | ||
chmod -R a+rX,u+w,go-w "$@" | ||
|
||
$(HTML_DIR): install | $(BUILD_DIR) | ||
@echo "Generating HTML documentation. This may take a while ..." | ||
-$(RM) -r "$@" | ||
$(OCTAVE) --no-window-system --silent \ | ||
--eval "pkg load generate_html; " \ | ||
--eval "pkg load $(PACKAGE);" \ | ||
--eval "options = get_html_options ('octave-forge');" \ | ||
--eval "generate_package_html ('${PACKAGE}', '${HTML_DIR}', options)" | ||
chmod -R a+rX,u+w,go-w $@ | ||
|
||
dist: $(OCTAVE_RELEASE_TARBALL) | ||
html: $(HTML_TARBALL) | ||
|
||
${BUILD_DIR} ${MATLAB_PKG}/private ${MATLAB_PKG}/tests_matlab ${MATLAB_PKG}/@sym ${MATLAB_PKG}/@symfun ${MATLAB_PKG}/@logical ${MATLAB_PKG}/@double: | ||
mkdir -p "$@" | ||
|
||
clean: | ||
rm -rf "${BUILD_DIR}" | ||
@#rm -f fntests.log | ||
rm -f inst/octsympy_tests.log | ||
|
||
test: | ||
@echo "Testing package in GNU Octave ..." | ||
@$(OCTAVE) --no-gui --silent --path "${PWD}/inst" \ | ||
--eval "set (0, 'defaultfigurevisible', 'off'); \ | ||
anyfail = octsympy_tests; \ | ||
sympref reset; \ | ||
exit (anyfail)" | ||
@echo | ||
|
||
doctest: | ||
@# Workaround for OctSymPy issue 273, we must pre-initialize the package | ||
@# Otherwise, it will make the doctests fail | ||
@echo "Testing documentation strings ..." | ||
@$(OCTAVE) --no-gui --silent --path "${PWD}/inst" \ | ||
--eval "pkg load doctest; \ | ||
sym ('x'); \ | ||
set (0, 'defaultfigurevisible', 'off'); \ | ||
success = doctest('inst/'); \ | ||
sympref reset; \ | ||
exit (!success)" | ||
@echo | ||
|
||
|
||
## Install in Octave (locally) | ||
install: ${INSTALLED_PACKAGE} | ||
${INSTALLED_PACKAGE}: ${OCTAVE_RELEASE_TARBALL} | ||
$(OCTAVE) --silent --eval "pkg install $<" | ||
|
||
## Matlab packaging | ||
## TODO: should be written to properly use artfacts | ||
matlab_pkg: $(MATLAB_PKG_ZIP) | ||
|
||
${MATLAB_PKG}: $(BUILD_DIR) ${MATLAB_PKG}/private ml_extract_tests | ||
|
||
## Matlab: extract unit tests from Octave files, place in separate files | ||
ml_extract_tests: ${MATLAB_PKG}/tests_matlab ml_copy | ||
cp -pR misc/octassert.m ${MATLAB_PKG}/tests_matlab/ | ||
cp -pR misc/extract_tests_for_matlab.m ${MATLAB_PKG}/ | ||
cp -pR misc/octsympy_tests_matlab.m ${MATLAB_PKG}/ | ||
cd ${MATLAB_PKG}/; ${OCTAVE} -q --eval "extract_tests_for_matlab" | ||
rm -f ${MATLAB_PKG}/extract_tests_for_matlab.m | ||
rm -f ${MATLAB_PKG}/tests_matlab/tests__sympref.m # temp | ||
|
||
## Matlab: copy files | ||
ml_copy: ml_convert_comments | ||
cp -pR inst/private ${MATLAB_PKG}/ | ||
cp -pR inst/@sym/private ${MATLAB_PKG}/@sym/ | ||
cp -pR inst/@symfun/private ${MATLAB_PKG}/@symfun/ | ||
cp -pR misc/my_print_usage.m ${MATLAB_PKG}/private/print_usage.m | ||
cp -pR misc/my_print_usage.m ${MATLAB_PKG}/@sym/private/print_usage.m | ||
cp -pR misc/my_print_usage.m ${MATLAB_PKG}/@symfun/private/print_usage.m | ||
cp -fp CONTRIBUTORS ${MATLAB_PKG}/ | ||
cp -fp NEWS ${MATLAB_PKG}/ | ||
cp -fp COPYING ${MATLAB_PKG}/ | ||
cp -fp matlab_smt_differences.md ${MATLAB_PKG}/ | ||
cp -fp README.md ${MATLAB_PKG}/ | ||
cp -fp README.matlab.md ${MATLAB_PKG}/ | ||
rm -f ${MATLAB_PKG}/octsympy_tests.m | ||
|
||
## Matlab: extract and convert comments to Matlab style | ||
ml_convert_comments: ${MATLAB_PKG}/@sym ${MATLAB_PKG}/@symfun ${MATLAB_PKG}/@double ${MATLAB_PKG}/@logical | ||
$(OCTAVE) --path ${PWD}/util --silent --eval "pwd, convert_comments('inst/', '', '../${MATLAB_PKG}/')" | ||
$(OCTAVE) --path ${PWD}/util --silent --eval "pwd, convert_comments('inst/', '@symfun', '../${MATLAB_PKG}/')" | ||
$(OCTAVE) --path ${PWD}/util --silent --eval "pwd, convert_comments('inst/', '@sym', '../${MATLAB_PKG}/')" | ||
$(OCTAVE) --path ${PWD}/util --silent --eval "pwd, convert_comments('inst/', '@double', '../${MATLAB_PKG}/')" | ||
$(OCTAVE) --path ${PWD}/util --silent --eval "pwd, convert_comments('inst/', '@logical', '../${MATLAB_PKG}/')" | ||
|
||
matlab_test: | ||
${MATLAB} -nojvm -nodisplay -nosplash -r "addpath('inst'); octsympy_tests_matlab" |
Oops, something went wrong.