Skip to content

Commit 24522e3

Browse files
committed
new version: complete changes to the APIs and implementations.
1 parent 3e42aba commit 24522e3

Some content is hidden

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

44 files changed

+8421
-713
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to fill out this bug report!
10-
10+
1111
- type: textarea
1212
id: what-happened
1313
attributes:
@@ -16,7 +16,7 @@ body:
1616
placeholder: Tell us what you see!
1717
validations:
1818
required: true
19-
19+
2020
- type: textarea
2121
id: reproduction
2222
attributes:
@@ -28,32 +28,31 @@ body:
2828
3. See error
2929
validations:
3030
required: true
31-
31+
3232
- type: textarea
3333
id: logs
3434
attributes:
3535
label: Relevant log output
3636
description: Please copy and paste any relevant log output. This will be automatically formatted into code.
3737
render: shell
38-
38+
3939
- type: input
4040
id: version
4141
attributes:
4242
label: Version
4343
description: What version of THEMAP are you running?
4444
validations:
4545
required: true
46-
46+
4747
- type: dropdown
4848
id: python-version
4949
attributes:
5050
label: Python Version
5151
description: What version of Python are you using?
5252
options:
53-
- Python 3.8
54-
- Python 3.9
5553
- Python 3.10
54+
- Python 3.11
55+
- Python 3.12
5656
- Other (specify in description)
5757
validations:
5858
required: true
59-

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to suggest a new feature!
10-
10+
1111
- type: textarea
1212
id: problem
1313
attributes:
@@ -16,23 +16,23 @@ body:
1616
placeholder: I'm always frustrated when [...]
1717
validations:
1818
required: true
19-
19+
2020
- type: textarea
2121
id: solution
2222
attributes:
2323
label: Describe the solution you'd like
2424
description: A clear and concise description of what you want to happen.
2525
validations:
2626
required: true
27-
27+
2828
- type: textarea
2929
id: alternatives
3030
attributes:
3131
label: Describe alternatives you've considered
3232
description: A clear and concise description of any alternative solutions or features you've considered.
33-
33+
3434
- type: textarea
3535
id: context
3636
attributes:
3737
label: Additional context
38-
description: Add any other context about the feature request here.
38+
description: Add any other context about the feature request here.

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ updates:
1616
open-pull-requests-limit: 10
1717
labels:
1818
- "dependencies"
19-
- "github_actions"
19+
- "github_actions"

.github/workflows/lint.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,32 @@ on:
1010
jobs:
1111
lint:
1212
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: ["3.10", "3.11", "3.12"]
17+
1318
steps:
1419
- uses: actions/checkout@v3
15-
- name: Set up Python
20+
- name: Set up Python ${{ matrix.python-version }}
1621
uses: actions/setup-python@v4
1722
with:
18-
python-version: "3.10"
23+
python-version: ${{ matrix.python-version }}
1924
cache: 'pip'
2025

2126
- name: Install dependencies
2227
run: |
2328
python -m pip install --upgrade pip
24-
pip install ruff black isort mypy
29+
pip install ruff mypy
2530
2631
- name: Lint with ruff
2732
run: |
2833
ruff check .
2934
30-
- name: Check formatting with black
31-
run: |
32-
black --check .
33-
34-
- name: Check imports with isort
35+
- name: Check formatting with ruff
3536
run: |
36-
isort --check .
37+
ruff format --check .
3738
3839
- name: Type check with mypy
3940
run: |
40-
mypy themap
41+
mypy themap

.github/workflows/publish.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,30 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.10", "3.11", "3.12"]
1114
steps:
1215
- uses: actions/checkout@v3
1316
with:
1417
fetch-depth: 0
15-
16-
- name: Set up Python
18+
19+
- name: Set up Python ${{ matrix.python-version }}
1720
uses: actions/setup-python@v4
1821
with:
19-
python-version: '3.10'
20-
22+
python-version: ${{ matrix.python-version }}
23+
2124
- name: Install dependencies
2225
run: |
2326
python -m pip install --upgrade pip
2427
pip install build twine
25-
28+
2629
- name: Build and package
2730
run: |
2831
python -m build
29-
32+
3033
- name: Publish to PyPI
3134
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
3235
uses: pypa/gh-action-pypi-publish@release/v1
3336
with:
34-
password: ${{ secrets.PYPI_API_TOKEN }}
37+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: ["3.10"]
16+
python-version: ["3.10", "3.11", "3.12"]
1717

1818
steps:
1919
- uses: actions/checkout@v3
@@ -71,4 +71,30 @@ jobs:
7171
7272
- name: Build documentation
7373
run: |
74-
mkdocs build --strict
74+
mkdocs build --strict
75+
76+
publish:
77+
runs-on: ubuntu-latest
78+
needs: [test, docs]
79+
steps:
80+
- uses: actions/checkout@v3
81+
with:
82+
fetch-depth: 0
83+
- name: Set up Python
84+
uses: actions/setup-python@v4
85+
with:
86+
python-version: "3.10"
87+
cache: 'pip'
88+
- name: Install dependencies
89+
run: |
90+
python -m pip install --upgrade pip
91+
pip install build
92+
- name: Build package
93+
run: |
94+
python -m build
95+
- name: Publish to Test PyPI
96+
if: github.event_name == 'workflow_dispatch'
97+
uses: pypa/gh-action-pypi-publish@release/v1
98+
with:
99+
repository-url: https://test.pypi.org/legacy/
100+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ cython_debug/
166166
datasets/fsmol_hardness/
167167

168168
# ignore assets folder
169-
assets/
169+
# assets/
170170

171171
# ignore dev notebook
172-
notebooks/dev.ipynb
172+
notebooks/dev.ipynb

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
[submodule "third_party/FS-Mol"]
2-
path = third_party/FS-Mol
3-
url = git@github.com:HFooladi/FS-Mol.git
4-
[submodule "third_party/otdd"]
5-
path = third_party/otdd
6-
url = git@github.com:HFooladi/otdd.git

.pre-commit-config.yaml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,42 @@
11
repos:
2-
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.11.9 # This should match your pyproject.toml version
2+
# Ruff - replaces flake8, isort, black, and more
3+
- repo: https://github.com/astral-sh/ruff-pre-commit
4+
rev: v0.12.4 # Use latest stable version
45
hooks:
5-
- id: ruff
6-
args: [--fix]
7-
- id: ruff-format
6+
- id: ruff
7+
args: [--fix] # Automatically fix what can be fixed
8+
- id: ruff-format
9+
10+
# Type checking
11+
- repo: https://github.com/pre-commit/mirrors-mypy
12+
rev: v1.17.0
13+
hooks:
14+
- id: mypy
15+
additional_dependencies: [types-requests]
16+
args: [--ignore-missing-imports]
17+
exclude: ^(scripts/|third_party/|themap/models/otdd/)
18+
19+
# Basic file checks
20+
- repo: https://github.com/pre-commit/pre-commit-hooks
21+
rev: v5.0.0
22+
hooks:
23+
- id: trailing-whitespace
24+
- id: end-of-file-fixer
25+
- id: check-yaml
26+
- id: check-toml
27+
- id: check-merge-conflict
28+
- id: check-case-conflict
29+
- id: check-added-large-files
30+
args: ['--maxkb=1000'] # Prevent large files
31+
32+
# Optional: Run tests (can be slow, consider making it optional)
33+
# Uncomment if you want tests to run on every commit
34+
# - repo: local
35+
# hooks:
36+
# - id: pytest
37+
# name: pytest
38+
# entry: pytest
39+
# language: system
40+
# types: [python]
41+
# args: [tests/, --maxfail=1, -x] # Stop on first failure
42+
# pass_filenames: false

0 commit comments

Comments
 (0)