Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
42e1ebc
[wip] harmonising types in tuprolog.core
gciatto Oct 12, 2021
7f4c58d
[wip] harmonising types in tuprolog.core, ok up to Rules
gciatto Oct 13, 2021
a3f74f8
harmonize types in tuprolog.core
gciatto Oct 15, 2021
1d7a76e
wip improving ktmath
gciatto Oct 15, 2021
29c1212
[wip] harmonising types of kt-math
gciatto Oct 17, 2021
a474b69
efficient big integer conversion + test
gciatto Oct 18, 2021
bd769e4
add tests for kt-math
gciatto Oct 28, 2021
c2a3caf
+ problog support
gciatto Nov 5, 2021
67a9bd7
+ problog test & example
gciatto Nov 5, 2021
b50f625
improve publication process
gciatto Nov 6, 2021
a61c826
port Scope
gciatto Nov 9, 2021
54ceb5d
fix horrible bug about integers
gciatto Nov 9, 2021
9b3f10e
harmonize java.lang.Throwable
gciatto Nov 17, 2021
b78b7b7
harmonize types in :theory
gciatto Nov 17, 2021
654b8fd
harmonize types in :parser-core
gciatto Nov 17, 2021
fb315fc
harmonize types in :parser-theory
gciatto Nov 17, 2021
e879229
harmonize exception types in :core
gciatto Nov 17, 2021
983ce7c
harmonize exception types in :unify
gciatto Nov 17, 2021
6f5e9fa
+ harmonizing types refinement in :unify
gciatto Nov 17, 2021
b88a394
+ harmonizing types refinement in :theory
gciatto Nov 17, 2021
5560941
harmonize some classes in :solve
gciatto Nov 25, 2021
99b0e40
Removed recursive method invocation
DavideEva Dec 22, 2021
b2e0d63
Merge branch 'DavideEva-patch-1'
gciatto Dec 23, 2021
dffd133
address #17
gciatto Jan 2, 2022
ae56fb0
Merge pull request #18 from tuProlog/feature/pythonc-numbers
gciatto Jan 2, 2022
a44f290
Start working on 2ppy refactor
ldeluigi Mar 29, 2023
7ab50ce
Use internal, self contained JRE instead of system JRE
ldeluigi Mar 29, 2023
82fc60c
Start writing a new ci/cd
ldeluigi Apr 3, 2023
8a69f96
Add ci
ldeluigi Apr 3, 2023
29e0de3
Bump actions/upload-artifact from 2 to 3
dependabot[bot] Apr 3, 2023
0735335
Support only python 3.9 to 3.11
ldeluigi Apr 3, 2023
1051c22
Fix versions
ldeluigi Apr 3, 2023
d134ea6
Fix setup
ldeluigi Apr 3, 2023
a62ca3e
Disable fail fast in ci
ldeluigi Apr 3, 2023
82194f7
Fix maven executable name
ldeluigi Apr 3, 2023
55028e9
Fix static parse errors
ldeluigi Apr 3, 2023
722c277
Bump actions/checkout from 2 to 3
dependabot[bot] Apr 3, 2023
eafc6de
Merge pull request #2 from ldeluigi/dependabot/github_actions/actions…
ldeluigi Apr 3, 2023
a28940a
Merge pull request #1 from ldeluigi/dependabot/github_actions/actions…
ldeluigi Apr 3, 2023
09db258
Patch maven broken resolution, update library and fix tests
ldeluigi Apr 4, 2023
6e4e88b
Install wheels in ci before tests
ldeluigi Apr 4, 2023
07fe797
Fix artifacts name collision
ldeluigi Apr 4, 2023
7130c77
Fix ci default shell
ldeluigi Apr 4, 2023
5c9e9b0
Fix setup on windows
ldeluigi Apr 4, 2023
c1b7bec
Fix attempt for ci windows
ldeluigi Apr 4, 2023
fe9221b
Use absolute paths in setup
ldeluigi Apr 4, 2023
84c2aff
Revert and fix setup
ldeluigi Apr 4, 2023
bdb7507
Fix missing jre for java 16
ldeluigi Apr 4, 2023
ddc14a1
Update ci
ldeluigi Apr 4, 2023
4aa7fe1
Update pyproject.toml
ldeluigi Apr 4, 2023
e02d14d
Drop fallback and patch maven installation
ldeluigi Apr 4, 2023
6593223
Fix setup debug info
ldeluigi Apr 4, 2023
fe6c17f
Delete obsolete workflow files
ldeluigi Apr 4, 2023
b078ed0
Use -v for maven version
ldeluigi Apr 4, 2023
5c9a657
Attempt to fix the no goal error on unix systems
ldeluigi Apr 4, 2023
317604e
Use LTS java versions
ldeluigi Apr 4, 2023
c44a486
Use shell mode only for windows
ldeluigi Apr 4, 2023
7d3d4b9
Remove Java 20 as it's not available
ldeluigi Apr 4, 2023
0e107d5
Replace java 17 with 18 to fix access violations
ldeluigi Apr 4, 2023
b0d01b4
Use Java 17 anyway and java 11 for the build artifact
ldeluigi Apr 4, 2023
83bca7c
Add license to artifacts
ldeluigi Apr 5, 2023
cd9206b
Drop python < 3.9
ldeluigi Apr 5, 2023
de3c3d2
Retrieve all git history to compute version
ldeluigi Apr 5, 2023
19f929b
Bundle LICENSE with other artifacts
ldeluigi Apr 5, 2023
d4c533f
Refactor ci/cd
ldeluigi Apr 5, 2023
abe9814
Fix ci
ldeluigi Apr 5, 2023
2aa8db0
Fix ci
ldeluigi Apr 5, 2023
cb74725
Fic ci & requirements
ldeluigi Apr 5, 2023
a976d4d
Fix missing requirement for ci
ldeluigi Apr 5, 2023
3ba0d67
Add publish job to ci
ldeluigi Apr 5, 2023
7cac877
Merge remote-tracking branch 'origin/master' into develop
ldeluigi Apr 5, 2023
de7e59a
Merge master into develop and fix tests
ldeluigi Apr 5, 2023
8dece2d
Fix ci
ldeluigi Apr 5, 2023
9aec05b
Fix ci
ldeluigi Apr 5, 2023
e9460bc
Rely on default = dist
ldeluigi Apr 5, 2023
6f30c2b
Fix ci
ldeluigi Apr 5, 2023
6e0d66d
Bump install-jdk from 1.0.2 to 1.0.4
dependabot[bot] Apr 6, 2023
09e221a
Merge pull request #5 from ldeluigi/dependabot/pip/install-jdk-1.0.4
ldeluigi Apr 6, 2023
5cd7136
install java if not present on first import
ldeluigi Apr 6, 2023
aec4e5b
Fix term parser factory
ldeluigi Apr 6, 2023
d864572
Fix java installation on macos
ldeluigi Apr 6, 2023
129f317
Fix AbstractTermVisitor implementation
ldeluigi Apr 6, 2023
ee57650
Fix test
ldeluigi Apr 6, 2023
cdc5d23
Attempt to fix macos libjli.dylib location
ldeluigi Apr 6, 2023
30df99f
Fix ci
ldeluigi Apr 6, 2023
8288046
Attempt to locate libjli.dylib
ldeluigi Apr 6, 2023
805aec7
print directory tree after java installation
ldeluigi Apr 6, 2023
d78d4ee
Fix import
ldeluigi Apr 6, 2023
9b280de
Fix script
ldeluigi Apr 6, 2023
c9a4902
Fix darwin jvm location
ldeluigi Apr 6, 2023
ea3d3a8
Overwrite JAVA_HOME environment variable to always point local instal…
ldeluigi Apr 6, 2023
ccc9130
Use JAVA_HOME to find java
ldeluigi Apr 6, 2023
0d2219d
Remove pip cache
ldeluigi Apr 6, 2023
740c783
Fix main.py
ldeluigi Apr 6, 2023
fe3eb8b
Fix ci
ldeluigi Apr 6, 2023
1b51f6c
Fix typo
ldeluigi Apr 6, 2023
ff5e4d8
Re-add problog support
ldeluigi Apr 6, 2023
fb63b42
Fix ci
ldeluigi Apr 6, 2023
33d106c
Update README.md
ldeluigi Apr 7, 2023
a0fd4df
Bump pytest from 7.2.2 to 7.3.1
dependabot[bot] Apr 17, 2023
20b77a0
Bump kotlin-bom from 1.8.10 to 1.8.21
dependabot[bot] Apr 26, 2023
3b39507
Merge pull request #7 from ldeluigi/dependabot/pip/pytest-7.3.1
ldeluigi May 30, 2023
1b3d2bb
Merge pull request #8 from ldeluigi/dependabot/maven/org.jetbrains.ko…
ldeluigi May 30, 2023
1722789
Fix test warning
ldeluigi May 30, 2023
d0a899a
Bump install-jdk from 1.0.4 to 1.1.0
dependabot[bot] Jul 24, 2023
a08c139
Bump flake8 from 6.0.0 to 6.1.0
dependabot[bot] Jul 31, 2023
4b1bb66
Bump org.jetbrains.kotlin:kotlin-bom from 1.8.21 to 1.9.10
dependabot[bot] Aug 24, 2023
e85c472
Merge pull request #13 from ldeluigi/dependabot/pip/install-jdk-1.1.0
ldeluigi Oct 2, 2023
bf33261
Merge pull request #15 from ldeluigi/dependabot/pip/flake8-6.1.0
ldeluigi Oct 2, 2023
98af59e
Bump pytest from 7.3.1 to 7.4.2
dependabot[bot] Oct 2, 2023
73f388f
Rename job
ldeluigi May 30, 2023
d52098e
Add explanation comment
ldeluigi May 30, 2023
f5932e0
Merge pull request #19 from ldeluigi/dependabot/pip/pytest-7.4.2
ldeluigi Oct 2, 2023
d495ba8
Merge pull request #17 from ldeluigi/dependabot/maven/org.jetbrains.k…
ldeluigi Oct 2, 2023
771d303
Update 2p-Kt version. Fixes #3
ldeluigi Oct 2, 2023
ea59615
Add flake8 rules
ldeluigi Oct 2, 2023
2f4dead
Bump setuptools-git-versioning from 1.13.3 to 1.13.5
dependabot[bot] Oct 2, 2023
6c49ec9
Merge pull request #16 from ldeluigi/dependabot/pip/setuptools-git-ve…
ldeluigi Oct 2, 2023
8f03b08
Bump actions/checkout from 3 to 4
dependabot[bot] Oct 2, 2023
1638e9a
Merge pull request #20 from ldeluigi/dependabot/github_actions/action…
ldeluigi Oct 2, 2023
99a1f72
Add flake configuration file
ldeluigi Oct 2, 2023
4f2bb5d
Fix typo
ldeluigi Oct 2, 2023
b512417
Start Pythonic re-implementation
ldeluigi Oct 2, 2023
320be3e
Improve installation script. Adding javadoc to jars
ldeluigi Oct 3, 2023
b7cb519
Remove javadoc (not working for now)
ldeluigi Oct 3, 2023
368342c
Fix _KtObjectWithSmartPythonicAccessors and add tests
ldeluigi Oct 3, 2023
becf429
Drop jpype.beans import and re-implement it to avoid clashes
ldeluigi Oct 4, 2023
67a1c7c
Remove code that is not necessary anymore
ldeluigi Oct 4, 2023
4b72313
Update README
ldeluigi Oct 4, 2023
939c630
Chores on tuprolog.core
ldeluigi Oct 5, 2023
8d93dcf
Improve readme documentation
ldeluigi Oct 5, 2023
1960b39
Port and test unify module
ldeluigi Oct 5, 2023
1783c78
Update README.md
ldeluigi Oct 5, 2023
deeb792
Fix typos
ldeluigi Oct 6, 2023
bce9e89
Sort imports
ldeluigi Oct 9, 2023
d970009
Remove jpype pure imports
ldeluigi Oct 9, 2023
2669cfd
Refactor core, math and libs file organization
ldeluigi Oct 9, 2023
c93a8b3
Re-organize unify
ldeluigi Oct 9, 2023
0ae0c37
Reorganize theory module
ldeluigi Oct 9, 2023
1346eeb
Move unify tests to unify
ldeluigi Oct 9, 2023
9475520
Remove star import
ldeluigi Oct 9, 2023
7a0b801
Add unificator tests
ldeluigi Oct 10, 2023
da00be9
Fix all flake8 warning and make them errors
ldeluigi Oct 10, 2023
cdf8635
Update solve file organization
ldeluigi Oct 11, 2023
ad4484a
Complete overhaul of solve package
ldeluigi Oct 12, 2023
805640a
Update prolog and problog packages
ldeluigi Oct 12, 2023
960bf99
Import parsing modules
ldeluigi Oct 12, 2023
d1c2b07
Add tests
ldeluigi Oct 12, 2023
875401d
Fix flake complaints
ldeluigi Oct 13, 2023
e512d73
Fix test
ldeluigi Oct 13, 2023
3eddbec
Fix flake
ldeluigi Oct 13, 2023
60d8252
Implement prolog and problog REPL with additional features
ldeluigi Oct 14, 2023
3d270e2
Fix repl bugs
ldeluigi Oct 14, 2023
8418fcd
Update README.md
ldeluigi Oct 14, 2023
0f870d4
Update README.md
ldeluigi Oct 15, 2023
0f3d62a
Bump it.unibo.tuprolog:solve-problog-jvm from 0.31.15 to 0.31.16
dependabot[bot] Oct 16, 2023
798e9b9
Bump it.unibo.tuprolog:repl-jvm from 0.31.15 to 0.31.16
dependabot[bot] Oct 16, 2023
5a093a9
Fix and improve docs
ldeluigi Oct 16, 2023
02f66b6
Fix api and write agent test
ldeluigi Oct 16, 2023
c7175f4
Merge pull request #24 from ldeluigi/dependabot/maven/it.unibo.tuprol…
ldeluigi Oct 16, 2023
a661ee4
Merge pull request #25 from ldeluigi/dependabot/maven/it.unibo.tuprol…
ldeluigi Oct 16, 2023
0935022
Improve code by avoiding using the solver factory/builder
ldeluigi Oct 16, 2023
1916ef2
Fix style issues
ldeluigi Oct 16, 2023
f829c8e
Update deploy step
ldeluigi Oct 18, 2023
3877971
Clean code and use generators where possible
ldeluigi Oct 18, 2023
d901770
Move to jvm4py
ldeluigi Oct 18, 2023
7e6f9a8
Fix ci pattern
ldeluigi Oct 18, 2023
25df56c
Fix flake issues
ldeluigi Oct 18, 2023
2d84ed9
Document protect_iterable
ldeluigi Oct 18, 2023
688eb6c
Add coverage to CI
ldeluigi Oct 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
per-file-ignores =
__init__.py:F401, F403
__main__.py:F401, F403
max-line-length = 127
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

updates:
- directory: /
package-ecosystem: pip
schedule:
interval: daily
- directory: /
package-ecosystem: maven
schedule:
interval: daily
- directory: /
package-ecosystem: github-actions
schedule:
interval: weekly
177 changes: 177 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: CI/CD

on:
push:
branches:
- "*"
- "**"
tags:
- "*"
pull_request:

env:
project-name: 2PPy

defaults:
run:
shell: bash

jobs:
build:
name: build & test
strategy:
matrix:
os: [ubuntu, windows, macos]
python-version: ['3.9', '3.10', '3.11']
include:
- package: false
- os: ubuntu
python-version: '3.9'
package: true # only build package artifacts once
fail-fast: false
runs-on: ${{ matrix.os }}-latest
outputs:
artifact-name: ${{ steps.artifact.outputs.artifact-name }}
version: ${{ steps.artifact.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Set up Maven with Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
architecture: 'x64'
cache: maven
- name: Install build tool
run: |
python -m pip install --upgrade pip
- name: Install CI dependencies
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build
run: |
python -m build --sdist --wheel
- name: Install
run: |
pip install dist/*.whl
- name: Test
run: |
coverage run -m pytest -p no:faulthandler
- name: Coverage
run: |
coverage report -i -m
- name: Prepare artifacts
id: artifact
if: ${{ matrix.package }}
run: |
echo 'artifact-name=${{ env.project-name }}-${{ matrix.python-version }}-${{ matrix.os }}' >> "$GITHUB_OUTPUT"
VERSION=$(python -m setuptools_git_versioning)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Upload artifacts
if: ${{ matrix.package }}
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact.outputs.artifact-name }}
path: |
dist/*.whl
dist/*.tar.gz
LICENSE
- name: Upload test install script to artifact
if: ${{ matrix.package }}
uses: actions/upload-artifact@v3
with:
name: test-install-script
path: test/post_install_test.py

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with Flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --count --statistics

install:
strategy:
matrix:
os: [ubuntu, windows, macos]
python-version: ['3.9', '3.10', '3.11']
install: ['wheel', 'sdist']
fail-fast: false
runs-on: ${{ matrix.os }}-latest
needs: [build]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.build.outputs.artifact-name }}
- name: Install from wheel
if: ${{ matrix.install == 'wheel' }}
run: |
pip install dist/*.whl
- name: Install from sdist
if: ${{ matrix.install == 'sdist' }}
run: |
pip install dist/*.tar.gz
- name: Pull test file from artifacts
uses: actions/download-artifact@v3
with:
name: test-install-script
- name: Test installation
run: |
python post_install_test.py

release:
runs-on: ubuntu-latest
needs: [build, lint, install]
concurrency:
group: release
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.build.outputs.artifact-name }}
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.build.outputs.version }}
fail_on_unmatched_files: true
files: |
dist/*.whl
dist/*.tar.gz
LICENSE

publish:
runs-on: ubuntu-latest
needs: [build, release]
concurrency:
group: publish
environment: test-pypi
permissions:
id-token: write
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.build.outputs.artifact-name }}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
57 changes: 0 additions & 57 deletions .github/workflows/deploy.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/quick-check.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ VERSION
venv/
.idea/
.vscode/

*~
*.jar
tuprolog/libs/*/

### Python ###
# Byte-compiled / optimized / DLL files
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.6
3.11.1
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include VERSION
include pom.xml
include tuprolog/libs/*.jar
exclude test/*
exclude main.py
exclude main.py
Loading