Skip to content

Commit ac3fd46

Browse files
committed
feat: add a Scala wrapper and 2 more tools
1 parent de99586 commit ac3fd46

Some content is hidden

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

41 files changed

+1868
-314
lines changed

.github/img/cover.jpg

1.69 MB
Loading

.github/workflows/publish_tp53.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ env:
1010
jobs:
1111
on-main-branch-check:
1212
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: python
1316
outputs:
1417
on_main: ${{ steps.contains_tag.outputs.retval }}
1518
steps:
@@ -23,20 +26,26 @@ jobs:
2326
reference: "main"
2427
tag: "${{ github.ref_name }}"
2528

26-
tests:
27-
name: tests
29+
python-tests:
30+
name: python-tests
2831
needs: on-main-branch-check
2932
if: ${{ needs.on-main-branch-check.outputs.on_main == 'true' }}
30-
uses: "./.github/workflows/tests.yml"
33+
uses: "./.github/workflows/tests_python.yml"
34+
35+
scala-tests:
36+
name: scala-tests
37+
needs: on-main-branch-check
38+
if: ${{ needs.on-main-branch-check.outputs.on_main == 'true' }}
39+
uses: "./.github/workflows/tests_scala.yml"
3140

3241
build-wheels:
3342
name: build wheels
34-
needs: tests
43+
needs: python-tests
3544
uses: "./.github/workflows/wheels.yml"
3645

3746
build-sdist:
3847
name: build source distribution
39-
needs: tests
48+
needs: python-tests
4049
runs-on: ubuntu-latest
4150
steps:
4251
- uses: actions/checkout@v4
@@ -55,16 +64,16 @@ jobs:
5564
5665
- name: Configure poetry
5766
shell: bash
58-
run: poetry config virtualenvs.in-project true
67+
run: poetry config virtualenvs.in-project true --directory python
5968

6069
- name: Install dependencies
61-
run: poetry install --no-interaction --no-root --without=dev
70+
run: poetry install --no-interaction --no-root --without=dev --directory python
6271

6372
- name: Install project
64-
run: poetry install --no-interaction --without=dev
73+
run: poetry install --no-interaction --without=dev --directory python
6574

6675
- name: Build package
67-
run: poetry build --format=sdist
76+
run: poetry build --format=sdist --directory python
6877

6978
- uses: actions/upload-artifact@v4
7079
with:
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: unit tests
1+
name: python tests
22

33
on:
44
push:
@@ -14,6 +14,9 @@ env:
1414
jobs:
1515
Tests:
1616
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
working-directory: python
1720
strategy:
1821
matrix:
1922
PYTHON_VERSION: ["3.11", "3.12", "3.13"]

.github/workflows/tests_scala.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: scala tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
tags:
8+
- "!**"
9+
workflow_call:
10+
11+
jobs:
12+
Tests:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: scala
17+
strategy:
18+
matrix:
19+
suite: [ seshat ]
20+
java-version: [ 11, 17, 21 ]
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-java@v4
24+
with:
25+
distribution: 'temurin'
26+
java-version: ${{ matrix.java-version }}
27+
- name: Cache for Scala Dependencies
28+
uses: actions/cache@v4
29+
with:
30+
path: |
31+
~/.mill/download
32+
~/.m2/repository
33+
~/.cache/coursier
34+
key: ${{ runner.os }}-java-mill-${{ matrix.java-version }}-${{ hashFiles('**/build.sc') }}
35+
restore-keys: ${{ runner.os }}-java-mill-
36+
- name: Compile Scala Code
37+
run: |
38+
./mill --no-server clean
39+
./mill --no-server --disable-ticker ${{ matrix.suite }}.compile
40+
- name: Test Scala Code
41+
run: |
42+
./mill --no-server --disable-ticker ${{ matrix.suite }}.test
43+
- name: Create Code Coverage Report
44+
if: matrix.java-version == '11'
45+
run: |
46+
./mill --no-server --disable-ticker ${{ matrix.suite }}.scoverage.htmlReport
47+
- name: Upload Code Coverage Report
48+
uses: actions/upload-artifact@v4
49+
if: matrix.java-version == '11'
50+
with:
51+
name: code-coverage
52+
path: out/seshat/scoverage/htmlReport.dest/

.github/workflows/wheels.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
build-wheels:
1010
name: Build wheels for ${{ matrix.python }}
1111
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: python
1215
strategy:
1316
matrix:
1417
python: ["3.11", "3.12", "3.13"]
@@ -24,11 +27,11 @@ jobs:
2427
python-version: ${{ matrix.python }}
2528

2629
- name: Build wheels
27-
run: pip wheel --no-deps -w wheelhouse .
30+
run: pip wheel --no-deps -w /tmp/wheelhouse .
2831

2932
- name: Upload wheels
3033
uses: actions/upload-artifact@v4
3134
with:
3235
name: tp53-wheels-${{ matrix.python }}
33-
path: ./wheelhouse/tp53*.whl
36+
path: /tmp/wheelhouse/tp53*.whl
3437
if-no-files-found: error

.gitignore

Lines changed: 1 addition & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -1,161 +1,4 @@
11
.DS_Store
2+
.metals/
23
.vscode/
34
testdata/
4-
5-
# Byte-compiled / optimized / DLL files
6-
__pycache__/
7-
*.py[cod]
8-
*$py.class
9-
10-
# C extensions
11-
*.so
12-
13-
# Distribution / packaging
14-
.Python
15-
build/
16-
develop-eggs/
17-
dist/
18-
downloads/
19-
eggs/
20-
.eggs/
21-
lib64/
22-
parts/
23-
sdist/
24-
var/
25-
wheels/
26-
share/python-wheels/
27-
*.egg-info/
28-
.installed.cfg
29-
*.egg
30-
MANIFEST
31-
32-
# PyInstaller
33-
# Usually these files are written by a python script from a template
34-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35-
*.manifest
36-
*.spec
37-
38-
# Installer logs
39-
pip-log.txt
40-
pip-delete-this-directory.txt
41-
42-
# Unit test / coverage reports
43-
htmlcov/
44-
.tox/
45-
.nox/
46-
.coverage
47-
.coverage.*
48-
.cache
49-
nosetests.xml
50-
coverage.xml
51-
*.cover
52-
*.py,cover
53-
.hypothesis/
54-
.pytest_cache/
55-
cover/
56-
57-
# Translations
58-
*.mo
59-
*.pot
60-
61-
# Django stuff:
62-
*.log
63-
local_settings.py
64-
db.sqlite3
65-
db.sqlite3-journal
66-
67-
# Flask stuff:
68-
instance/
69-
.webassets-cache
70-
71-
# Scrapy stuff:
72-
.scrapy
73-
74-
# Sphinx documentation
75-
docs/_build/
76-
77-
# PyBuilder
78-
.pybuilder/
79-
target/
80-
81-
# Jupyter Notebook
82-
.ipynb_checkpoints
83-
84-
# IPython
85-
profile_default/
86-
ipython_config.py
87-
88-
# pyenv
89-
# For a library or package, you might want to ignore these files since the code is
90-
# intended to run in multiple environments; otherwise, check them in:
91-
# .python-version
92-
93-
# pipenv
94-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97-
# install all needed dependencies.
98-
#Pipfile.lock
99-
100-
# poetry
101-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102-
# This is especially recommended for binary packages to ensure reproducibility, and is more
103-
# commonly ignored for libraries.
104-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105-
#poetry.lock
106-
107-
# pdm
108-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109-
#pdm.lock
110-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111-
# in version control.
112-
# https://pdm.fming.dev/#use-with-ide
113-
.pdm.toml
114-
115-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116-
__pypackages__/
117-
118-
# Celery stuff
119-
celerybeat-schedule
120-
celerybeat.pid
121-
122-
# SageMath parsed files
123-
*.sage.py
124-
125-
# Environments
126-
.env
127-
.venv
128-
venv/
129-
env.bak/
130-
venv.bak/
131-
132-
# Spyder project settings
133-
.spyderproject
134-
.spyproject
135-
136-
# Rope project settings
137-
.ropeproject
138-
139-
# mkdocs documentation
140-
/site
141-
142-
# mypy
143-
.mypy_cache/
144-
.dmypy.json
145-
dmypy.json
146-
147-
# Pyre type checker
148-
.pyre/
149-
150-
# pytype static type analyzer
151-
.pytype/
152-
153-
# Cython debug symbols
154-
cython_debug/
155-
156-
# PyCharm
157-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
158-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
159-
# and can be added to the global gitignore or merged into this file. For a more nuclear
160-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
161-
.idea/

0 commit comments

Comments
 (0)