Skip to content

Commit

Permalink
Adding support to Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dprada committed Dec 23, 2024
1 parent 0fc1dee commit a246f11
Show file tree
Hide file tree
Showing 25 changed files with 786 additions and 120 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ jobs:
strategy:
fail-fast: false # do not cancel all in-progress jobs if any job variation fails
matrix:
#os: [macOS-latest, ubuntu-latest] # [macOS-latest, ubuntu-latest, windows-latest]
#python-version: [3.7] # [3.7, 3.8, 3.9]
cfg:
- { os: ubuntu-latest, python-version: "3.9"}
- { os: ubuntu-latest, python-version: "3.10"}
- { os: ubuntu-latest, python-version: "3.11"}
- { os: macos-latest, python-version: "3.9"}
- { os: ubuntu-latest, python-version: "3.12"}
- { os: macos-latest, python-version: "3.10"}
- { os: macos-latest, python-version: "3.11"}
#- { os: windows-latest, python-version: "3.9"}
#- { os: windows-latest, python-version: "3.10"}
- { os: macos-latest, python-version: "3.12"}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -100,7 +96,7 @@ jobs:
cat ./coverage.xml
- name: Upload coverage reports to Codecov
if: matrix.cfg.os == 'ubuntu-latest' && matrix.cfg.python-version == '3.11'
if: matrix.cfg.os == 'ubuntu-latest' && matrix.cfg.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
verbose: true
Expand All @@ -110,7 +106,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload test results to Codecov
if: matrix.cfg.os == 'ubuntu-latest' && matrix.cfg.python-version == '3.11' && ${{ !cancelled() }}
if: matrix.cfg.os == 'ubuntu-latest' && matrix.cfg.python-version == '3.12' && ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_upload_conda_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false # do not cancel all in-progress jobs if any job variation fails
matrix:
#os: ubuntu-latest #[macOS-latest, ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install_macos_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
fail-fast: false
matrix:
cfg:
- { os: macos-latest, python-version: "3.9" }
- { os: macos-latest, python-version: "3.10" }
- { os: macos-latest, python-version: "3.11" }
- { os: macos-latest, python-version: "3.12" }

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install_ubuntu_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-latest, python-version: "3.9" }
- { os: ubuntu-latest, python-version: "3.10" }
- { os: ubuntu-latest, python-version: "3.11" }
- { os: ubuntu-latest, python-version: "3.12" }

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sphinx_docs_to_gh_pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12

- name: Setup conda env
uses: mamba-org/setup-micromamba@v1
Expand All @@ -42,7 +42,7 @@ jobs:
- defaults
channel_priority: strict
create-args: >-
python=3.11
python=3.12
- name: Info conda
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
#os: [macOS-latest, ubuntu-latest] # [macOS-latest, ubuntu-latest, windows-latest]
#python-version: [3.7] # [3.7, 3.8, 3.9]
cfg:
- { os: ubuntu-latest, python-version: "3.10"}
- { os: ubuntu-latest, python-version: "3.12"}

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MolSysMT

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/137937243.svg)](https://zenodo.org/badge/latestdoi/137937243)
[![](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11-blue.svg)](https://www.python.org/downloads/)
[![](https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://www.python.org/downloads/)
[![Documentation](https://github.com/uibcdf/MolSysMT/actions/workflows/sphinx_docs_to_gh_pages.yaml/badge.svg)](https://github.com/uibcdf/MolSysMT/actions/workflows/sphinx_docs_to_gh_pages.yaml)
[![CI](https://github.com/uibcdf/MolSysMT/actions/workflows/CI.yaml/badge.svg)](https://github.com/uibcdf/MolSysMT/actions/workflows/CI.yaml)
[![codecov](https://codecov.io/github/uibcdf/MolSysMT/graph/badge.svg?token=9ZMA4YZLOR)](https://codecov.io/github/uibcdf/MolSysMT)
Expand Down
111 changes: 111 additions & 0 deletions docs/contents/user/tools/element/group/ion/get_group_db.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "d7c08bc5-fd41-4f3c-8879-0bd4adacd556",
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "607973f4-2241-40e3-86da-f704f16fd143",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c15cff678aca4bc0bd1713df93cdbe56",
"version_major": 2,
"version_minor": 0
},
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import molsysmt as msm"
]
},
{
"cell_type": "markdown",
"id": "82900f87-29f1-406f-bb90-c4fce9ed9fc4",
"metadata": {},
"source": [
"# Get group DB\n",
"\n",
"In construction."
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "f9e84e7d-787e-4198-bb22-a43587048c6e",
"metadata": {},
"outputs": [],
"source": [
"db_entry = msm.element.group.ion.get_group_db('NA')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "c71194f1-f77a-4a4c-b205-e9ad6669d952",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': '\"SODIUM ION\"',\n",
" 'three_letter_code': 'NA',\n",
" 'atom_name': ['NA', 'NA'],\n",
" 'bonds': []}"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"db_entry"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "25754eac-cc88-4e84-b502-de6b3eb4b421",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit a246f11

Please sign in to comment.