Skip to content

Commit a48b152

Browse files
Merge branch 'master' into release
2 parents 6a3657a + 86d6f02 commit a48b152

File tree

83 files changed

+1640
-750
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1640
-750
lines changed

.github/workflows/smalltalk-ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI matrix
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
jobs:
14+
build:
15+
strategy:
16+
matrix:
17+
os: [ macos-latest, windows-latest, ubuntu-latest]
18+
smalltalk: [ Pharo64-8.0 ]
19+
runs-on: ${{ matrix.os }}
20+
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Setup smalltalkCI
24+
uses: hpi-swa/setup-smalltalkCI@v1
25+
with:
26+
smalltalk-version: ${{ matrix.smalltalk }}
27+
- name: Load Image and Run Tests
28+
run: smalltalkci -s ${{ matrix.smalltalk }}
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
timeout-minutes: 15

.smalltalk.ston

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ SmalltalkCISpec {
99
#testing : {
1010
#coverage : {
1111
#packages : [
12-
'Math-Accuracy-ODE',
13-
'Math-ArbitraryPrecisionFloat',
14-
'Math-AutomaticDifferenciation',
12+
'Math-A*',
1513
'Math-B*',
1614
'Math-C*',
1715
'Math-D*',

.travis.yml

-14
This file was deleted.

CONTRIBUTING.md

+31-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# Contribution Guide for PolyMath
22

3-
This file is currently not complete but will be improve step by step.
3+
*This file is currently not complete but will be improve step by step.*
44

5-
# Contributing code
6-
Use last version of Pharo 7.0 in order to use Iceberg.
7-
## Fork the Pharo repository
5+
You need to download Pharo 8.0 first.
6+
7+
## Setup Iceberg
8+
You need an ssh key in order to commit on github. Open Iceberg tool, and then click on the settings. Check the box : "Use custom SSH keys".
9+
10+
## Fork the PolyMath repository
811

912
All changes you'll do will be versionned in your own fork of the [PolyMath repository](https://github.com/PolyMathOrg/PolyMath). Then, from your fork you'll be able to issue pull requests to PolyMath, where they will be reviewed, and luckily, integrated.
1013

11-
Go to PolyMath github's repository and click on the fork button on the top right. Yes, this means that you'll need a github account to contribute to PolyMath, yes.
14+
Go to PolyMath github's repository and click on the fork button on the top right. Yes, this means that you'll need a github account to contribute to PolyMath.
1215

1316
## Load last dev version of PolyMath
14-
In a fresh Pharo 7.0 image, load last development version of Polymath :
17+
In a fresh Pharo 8.0 image, load last development version of Polymath :
1518

1619
```Smalltalk
1720
Metacello new
@@ -21,12 +24,29 @@ Metacello new
2124
```
2225
where you replace XXX with your github user name.
2326

24-
## Setup Iceberg
25-
You need an ssh key in order to commit on github. Open Iceberg tool, and then click on the settings. Check the box : "Use custom SSH keys".
27+
## Add main PolyMath repository as remote
28+
29+
Open Iceberg, open PolyMath repository, click on repositories, then + button (add remote).
30+
31+
Remote name: polymath-upstream
32+
33+
Remote URL: https://github.com/PolyMathOrg/PolyMath.git
34+
35+
## Send some changes to the original PolyMath repository
36+
37+
#### From Pharo Iceberg
38+
After doing modifications in your image, open Iceberg tool, commit the changes in your PolyMath repository. Cherry-pick the modifications that you want to include in your commit. Then push your commit to your fork. It's more convenient to divide your changes in meaninfull and simple commits, which makes it easier to check for those who need to proofread it.
39+
40+
#### From Github UI
41+
In the GitHub interface, create a Pull Request from your commit.
42+
You have to give some information about what is the purpose of you pull request. Then submit it to PolyMath main repository.
43+
This will notify PolyMath core developers team that an improvement or bug fix is pending.
44+
45+
### Sync your fork with main PolyMath repo changes
46+
After a while, changes from other developers are integrated in the main PolyMath repository and your fork became out of sync.
47+
In order to do that, you need the fetch the last modifications from the main PolyMath repository, merge them in your image and then push them in your fork repository.
2648

27-
## Send the PR to github
28-
After doing the modification in your image, open Iceberg tool, commit the changes in your PolyMath repository. Cherry-pick the modifications that you want to include in your commit. In the github interface, create a Pull Request from your commit.
29-
Send the PR to PolyMath main repository.
49+
You have also the possibility to delete your fork and fork again the main PolyMath repository.
3050

3151
## Cleanups
3252
Ounce your pull request is integrated, some cleanups are required:

FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: SergeStinckwich

README.md

+25-24
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,63 @@
1-
<p align="center"><img alt="PolyMath" src="https://user-images.githubusercontent.com/327334/63360401-439db400-c366-11e9-954a-b45def952e08.png" style="width: 25%; height: 25%">
1+
<p align="center"><img alt="PolyMath" src="assets/logos/logo.png" style="width: 25%; height: 25%">
2+
<h1 align="center">[PolyMath]</h1>
23
<p align="center">
34
Scientific Computing with Pharo
45
<br>
5-
<a href="docs/"><strong>Explore the docs »</strong></a>
6+
<a href="https://github.com/PolyMathOrg/PolyMath/wiki"><strong>Explore the docs »</strong></a>
67
<br>
78
<br>
8-
<a href="https://github.com/PolyMath/PolyMath/issues/new?labels=Type%3A+Defect">Report a defect</a>
9+
<a href="https://github.com/PolyMathOrg/PolyMath/issues/new?labels=Type%3A+Defect">Report a defect</a>
910
|
10-
<a href="https://github.com/PolyMath/PolyMath/issues/new?labels=Type%3A+Feature">Request feature</a>
11+
<a href="https://github.com/PolyMathOrg/PolyMath/issues/new?labels=Type%3A+Feature">Request feature</a>
1112
</p>
1213
</p>
1314

14-
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
15+
[![Pharo version](https://img.shields.io/badge/Pharo-7.0-%23aac9ff.svg)](https://pharo.org/download)
16+
[![Pharo version](https://img.shields.io/badge/Pharo-8.0-%23aac9ff.svg)](https://pharo.org/download)
1517
[![Build Status](https://travis-ci.org/PolyMathOrg/PolyMath.svg?branch=master)](https://travis-ci.org/PolyMathOrg/PolyMath)
1618
[![Build status](https://ci.appveyor.com/api/projects/status/3tvarh2xi22max8h?svg=true)](https://ci.appveyor.com/project/SergeStinckwich/polymath-88bea)
17-
[![Coverage Status](https://coveralls.io/repos/github/PolyMathOrg/PolyMath/badge.svg?branch=development)](https://coveralls.io/github/PolyMathOrg/PolyMath?branch=development)
19+
[![Coverage Status](https://coveralls.io/repos/github/PolyMathOrg/PolyMath/badge.svg?branch=master)](https://coveralls.io/github/PolyMathOrg/PolyMath?branch=master)
1820
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/PolyMathOrg/PolyMath/master/LICENSE)
1921

2022
<img width="1675" alt="Screenshot 2019-04-24 at 11 12 57" src="https://user-images.githubusercontent.com/327334/56652094-66eb7780-6682-11e9-9753-101be18df67c.png">
2123

22-
You can load the code in a fresh Pharo 7.0 image with:
24+
25+
You can load PolyMath 1.0.2 into a fresh Pharo 8.0 image with:
26+
27+
```Smalltalk
28+
Metacello new
29+
repository: 'github://PolyMathOrg/PolyMath:v1.0.2';
30+
baseline: 'PolyMath';
31+
load
32+
```
33+
34+
and the latest development version of PolyMath:
2335

2436
```Smalltalk
2537
Metacello new
26-
repository: 'github://PolyMathOrg/PolyMath:master/src';
38+
repository: 'github://PolyMathOrg/PolyMath';
2739
baseline: 'PolyMath';
2840
load
2941
```
3042

31-
We have **806** green tests ! At the moment, all the development happens in the development branch.
43+
We have **816** green tests ! At the moment, all the development happens in the master branch (we are using [trunk-based development](https://trunkbaseddevelopment.com/)).
3244

33-
PolyMath is a Pharo project, similar to existing scientific libraries like NumPy, SciPy for Python or SciRuby for Ruby. PolyMath already provide the following basic functionalities:
45+
PolyMath is a Pharo project, similar to existing scientific libraries like NumPy, SciPy for Python or SciRuby for Ruby. PolyMath already provides the following basic functionalities:
3446
- complex and quaternions extensions,
3547
- random number generators,
3648
- fuzzy algorithms,
49+
- automatic differentiation,
3750
- KDE-trees,
3851
- Numerical methods,
3952
- Ordinary Differential Equation (ODE) solvers.
4053

41-
A book about PolyMath called "PolyMath book" is available online: https://github.com/SquareBracketAssociates/PolyMath-book
54+
The authoritative book on PolyMath is available online: https://github.com/SquareBracketAssociates/PolyMath-book
4255

43-
Some documentation (to be cleaned and reorganized) about PolyMath is available on the Wiki here:
56+
Some documentation (work in progress) is available on the Wiki:
4457
https://github.com/PolyMathOrg/PolyMath/wiki
4558

4659
Natalia wrote some explanation about benchmarking PolyMath in the Pharo For Enterprise Book: https://github.com/SquareBracketAssociates/PharoForTheEnterprise-english/blob/ae40e7ab6f7651f6e7c271869eb1efc4e531e774/ComparingSolutions/ComparingSolutions.pier
4760

48-
## Install PolyMath
49-
50-
To install PolyMath in your Pharo image you can just execute the following script:
51-
52-
```Smalltalk
53-
Metacello new
54-
githubUser: 'PolyMathOrg' project: 'PolyMath' commitish: 'master' path: 'src';
55-
baseline: 'PolyMath';
56-
load
57-
```
58-
5961
To add PolyMath to your baseline just add this:
6062

6163
```Smalltalk
@@ -64,7 +66,6 @@ To add PolyMath to your baseline just add this:
6466
with: [ spec repository: 'github://PolyMathOrg/PolyMath:master/src' ]
6567
```
6668

67-
6869
## How to contribute to PolyMath
6970

7071
We welcome submissions! A google group exists for this project at http://groups.google.com/group/polymath-project

appveyor.yml

-22
This file was deleted.

assets/logos/logo-title.png

37.1 KB
Loading

assets/logos/logo.png

15.2 KB
Loading

git-labelmaker/priority.json

-6
This file was deleted.

git-labelmaker/status.json

-12
This file was deleted.

git-labelmaker/type.json

-6
This file was deleted.

src/BaselineOfPolyMath/BaselineOfPolyMath.class.st

+12-29
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ BaselineOfPolyMath >> baseline: spec [
2020
<baseline>
2121
spec
2222
for: #common
23-
do: [ "Dependencies"
24-
self
25-
sMark: spec;
26-
xmlWriter: spec.
27-
28-
"Packages"
23+
do: [
24+
spec blessing: #baseline.
25+
spec repository: 'github://PolyMathOrg/PolyMath/src'.
26+
spec
27+
baseline: 'SMark'
28+
with: [ spec repository: 'github://smarr/SMark:v1.0.4' ];
29+
baseline: 'XMLWriter'
30+
with: [ spec
31+
repository: 'github://pharo-contributions/XML-XMLWriter:2.9.x/src' ].
2932
spec
3033
package: 'ExtendedNumberParser';
3134
package: 'Math-Accuracy-Core';
@@ -110,6 +113,8 @@ BaselineOfPolyMath >> baseline: spec [
110113
with: [ spec requires: #('Math-Complex') ];
111114
package: 'Math-Tests-Core'
112115
with: [ spec requires: #('Math-Core') ];
116+
package: 'Math-Tests-Core-Distribution'
117+
with: [ spec requires: #('Math-Core-Distribution') ];
113118
package: 'Math-Tests-Core-Process'
114119
with: [ spec requires: #('Math-Core-Process') ];
115120
package: 'Math-Tests-Numerical'
@@ -147,8 +152,6 @@ BaselineOfPolyMath >> baseline: spec [
147152
package: 'Math-Tests-TSNE'
148153
with: [ spec requires: #('Math-TSNE') ];
149154
package: 'Math-UtilsDataServer'.
150-
151-
"Groups"
152155
spec
153156
group: 'Accuracy'
154157
with: #('Math-Accuracy-ODE' 'Math-Accuracy-Core');
@@ -162,7 +165,7 @@ BaselineOfPolyMath >> baseline: spec [
162165
#('Math-Clustering' 'Math-Number-Extensions' 'Math-Chromosome' 'Math-PrincipalComponentAnalysis' 'Math-FunctionFit' 'Math-AutomaticDifferenciation' 'Math-KernelSmoothing' 'Math-Permutation' 'Math-KolmogorovSmirnov');
163166
group: 'Tests'
164167
with:
165-
#('Math-Tests-Matrix' 'Math-Tests-Clustering' 'Math-Tests-Numerical' 'Math-Tests-Complex' 'Math-Tests-Quaternion' 'Math-Tests-Random' 'Math-Tests-ODE' 'Math-Tests-KDTree' 'Math-Tests-FunctionFit' 'Math-Tests-AutomaticDifferenciation' 'Math-Tests-FastFourierTransform' 'Math-Tests-Accuracy' 'Math-Tests-ArbitraryPrecisionFloat' 'Math-Tests-KolmogorovSmirnov' 'Math-Tests-Quantile' 'Math-Tests-Polynomials' 'Math-Tests-PrincipalComponentAnalysis' 'Math-Tests-KernelSmoothing' 'Math-Tests-Number-Extensions' 'Math-Tests-Permutation' 'Math-Tests-TSNE' 'Math-Tests-Core-Process' 'Math-Tests-Core');
168+
#('Math-Tests-Matrix' 'Math-Tests-Clustering' 'Math-Tests-Numerical' 'Math-Tests-Complex' 'Math-Tests-Quaternion' 'Math-Tests-Random' 'Math-Tests-ODE' 'Math-Tests-KDTree' 'Math-Tests-FunctionFit' 'Math-Tests-AutomaticDifferenciation' 'Math-Tests-FastFourierTransform' 'Math-Tests-Accuracy' 'Math-Tests-ArbitraryPrecisionFloat' 'Math-Tests-KolmogorovSmirnov' 'Math-Tests-Quantile' 'Math-Tests-Polynomials' 'Math-Tests-PrincipalComponentAnalysis' 'Math-Tests-KernelSmoothing' 'Math-Tests-Number-Extensions' 'Math-Tests-Permutation' 'Math-Tests-TSNE' 'Math-Tests-Core-Process' 'Math-Tests-Core-Distribution' 'Math-Tests-Core');
166169
group: 'default'
167170
with: #('Core' 'Extensions' 'Tests' 'Benchmarks' 'Accuracy') ]
168171
]
@@ -173,23 +176,3 @@ BaselineOfPolyMath >> projectClass [
173176
on: NotFound
174177
do: [ super projectClass ]
175178
]
176-
177-
{ #category : #dependencies }
178-
BaselineOfPolyMath >> sMark: spec [
179-
spec
180-
project: 'SMark'
181-
with: [ spec
182-
className: #ConfigurationOfSMark;
183-
versionString: '1.0.2';
184-
repository: 'http://smalltalkhub.com/mc/StefanMarr/SMark/main' ]
185-
]
186-
187-
{ #category : #dependencies }
188-
BaselineOfPolyMath >> xmlWriter: spec [
189-
spec
190-
project: 'XMLWriter'
191-
with: [ spec
192-
className: #ConfigurationOfXMLWriter;
193-
versionString: '2.3.10';
194-
repository: 'http://smalltalkhub.com/mc/PharoExtras/XMLWriter/main' ]
195-
]

src/ExtendedNumberParser/ExtendedNumberParser.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ ExtendedNumberParser >> readNumberWithFractionPartNumberOfTrailingZeroInIntegerP
166166
fractionPart := 0.
167167
numberOfNonZeroFractionDigits := 0.
168168
numberOfTrailingZeroInFractionPart := 0]
169-
ifNotNil: [.
169+
ifNotNil: [
170170
numberOfNonZeroFractionDigits := lastNonZero.
171171
numberOfTrailingZeroInFractionPart := nDigits - lastNonZero].
172172
self readExponent

src/Math-Accuracy-Core/PMAccuracy.class.st

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Class {
1919
#classVars : [
2020
'DecimalPlaces'
2121
],
22-
#category : 'Math-Accuracy-Core'
22+
#category : #'Math-Accuracy-Core'
2323
}
2424

2525
{ #category : #accessing }
@@ -134,7 +134,7 @@ PMAccuracy >> argumentAt: aName [
134134
PMAccuracy >> asArray: aCol [
135135
^(aCol isCollection and: [ aCol isSequenceable and: [aCol isString not] ])
136136
ifTrue: [ aCol asArray ]
137-
ifFalse: [ {aCol} ]
137+
ifFalse: [ Array with: aCol ]
138138
]
139139

140140
{ #category : #private }
@@ -302,7 +302,7 @@ no isCollection ifFalse: [^1].
302302
PMAccuracy >> numberOfDifferentResultsAt: aname [
303303
|no|
304304
no := self resultsAt: aname.
305-
no isCollection ifFalse:[no:={no}].
305+
no isCollection ifFalse:[no:= Array with: no].
306306
^ no first isCollection ifTrue: [ no size ] ifFalse: [ 1 ]
307307
]
308308

@@ -426,7 +426,7 @@ PMAccuracy >> run: anArrayOfNames [
426426
<< 'Report for: ';
427427
<< self class name;
428428
cr.
429-
self ifSeveralterations: [ aStream << 'iterations: ' << iterations; cr ].
429+
self ifSeveralterations: [ aStream << 'iterations: ' << iterations asString; cr ].
430430
(self tree: dataTree removeAll type: self class name data: 'names')
431431
at: 'iterations' put: iterations;
432432
at: 'names' put: (self tree: KeyedTree new type: 'names' data: a).

src/Math-Benchmarks-ODE/PMODEBenchmark.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PMODEBenchmark class >> runAllToXML: numOfIterations [
3838
xml.
3939
writer tag: 'smark' with: [
4040
(self runAll: numOfIterations) do: [ :runner |
41-
writer tag: 'suite' attributes: { #name -> runner suite class name asString } asDictionary with: [
41+
writer tag: 'suite' attributes: (Dictionary with: #name -> runner suite class name asString) with: [
4242
runner results keysAndValuesDo: [ :key :value |
4343
writer tag: key with: ((value inject: 0 into: [ :subTotal :result |
4444
subTotal + result total ]) / value size) asFloat asString] ] ] ].

0 commit comments

Comments
 (0)