Skip to content

Commit

Permalink
Test on Apple silicon (#710)
Browse files Browse the repository at this point in the history
* Test on Apple silicon

* psycopg2

* install conda

* lint
  • Loading branch information
skearnes authored Feb 13, 2024
1 parent ec1ac79 commit 0827264
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 26 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ on: [ pull_request, push ]

jobs:
test_ord_schema:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-14]
runs-on: ${{ matrix.os }}
env:
PGDATA: $GITHUB_WORKSPACE/rdkit-postgres
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: 'latest'
- name: Setup PostgreSQL
shell: bash -l {0}
run: |
Expand All @@ -47,7 +52,10 @@ jobs:
- uses: codecov/codecov-action@v1

test_notebooks:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest, macos-14 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
30 changes: 15 additions & 15 deletions examples/submissions/3_Liu_Copper_OrgSyn/example_liu.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -831,9 +831,9 @@
"\n",
"outcome.analyses[\"quantitative NMR\"].type = analysis.NMR_1H\n",
"outcome.analyses[\"quantitative NMR\"].is_of_isolated_species = True\n",
"outcome.analyses[\n",
" \"quantitative NMR\"\n",
"].details = \"Quantitative NMR using 1,1,2,2-tetrachloroethane (>98%, purchased from Alfa Aesar) in CDCl3\"\n",
"outcome.analyses[\"quantitative NMR\"].details = (\n",
" \"Quantitative NMR using 1,1,2,2-tetrachloroethane (>98%, purchased from Alfa Aesar) in CDCl3\"\n",
")\n",
"\n",
"# A single product was desired and characterized\n",
"product = outcome.products.add()\n",
Expand Down Expand Up @@ -1739,15 +1739,15 @@
"\n",
"outcome.analyses[\"quantitative NMR\"].type = analysis.NMR_1H\n",
"outcome.analyses[\"quantitative NMR\"].is_of_isolated_species = True\n",
"outcome.analyses[\n",
" \"quantitative NMR\"\n",
"].details = \"Quantitative NMR using ferrocene (98%, purchased from Sigma-Aldrich, recrystallized from pentane) in CDCl3\"\n",
"outcome.analyses[\"quantitative NMR\"].details = (\n",
" \"Quantitative NMR using ferrocene (98%, purchased from Sigma-Aldrich, recrystallized from pentane) in CDCl3\"\n",
")\n",
"\n",
"outcome.analyses[\"chiral HPLC\"].type = analysis.LC\n",
"outcome.analyses[\"chiral HPLC\"].is_of_isolated_species = True\n",
"outcome.analyses[\n",
" \"chiral HPLC\"\n",
"].details = \"HPLC (Daicel Chiralpak OD-H column), eluting with 4% isopropanol in hexanes at 0.6 mL/min: 10.9 min (minor), 13.4 min (major), 98% ee for the first run and 99% ee for the second run\"\n",
"outcome.analyses[\"chiral HPLC\"].details = (\n",
" \"HPLC (Daicel Chiralpak OD-H column), eluting with 4% isopropanol in hexanes at 0.6 mL/min: 10.9 min (minor), 13.4 min (major), 98% ee for the first run and 99% ee for the second run\"\n",
")\n",
"\n",
"outcome.analyses[\"specific rotation\"].type = analysis.CD\n",
"outcome.analyses[\"specific rotation\"].is_of_isolated_species = True\n",
Expand Down Expand Up @@ -2671,15 +2671,15 @@
"\n",
"outcome.analyses[\"quantitative NMR\"].type = analysis.NMR_1H\n",
"outcome.analyses[\"quantitative NMR\"].is_of_isolated_species = True\n",
"outcome.analyses[\n",
" \"quantitative NMR\"\n",
"].details = \"Quantitative NMR using ferrocene (98%, purchased from Sigma-Aldrich, recrystallized from pentane) in CDCl3\"\n",
"outcome.analyses[\"quantitative NMR\"].details = (\n",
" \"Quantitative NMR using ferrocene (98%, purchased from Sigma-Aldrich, recrystallized from pentane) in CDCl3\"\n",
")\n",
"\n",
"outcome.analyses[\"chiral SFC\"].type = analysis.SFC\n",
"outcome.analyses[\"chiral SFC\"].is_of_isolated_species = True\n",
"outcome.analyses[\n",
" \"chiral SFC\"\n",
"].details = \"FC (Daicel Chiralpak AD-H column, heated to 40 °C), eluting with a linear gradient over 6 min from 5% to 10% isopropanol in supercritical CO2 at 2.5 mL/min.: 2.57 min (major), 2.98 min (minor), 90% ee for both runs\"\n",
"outcome.analyses[\"chiral SFC\"].details = (\n",
" \"FC (Daicel Chiralpak AD-H column, heated to 40 °C), eluting with a linear gradient over 6 min from 5% to 10% isopropanol in supercritical CO2 at 2.5 mL/min.: 2.57 min (major), 2.98 min (minor), 90% ee for both runs\"\n",
")\n",
"\n",
"outcome.analyses[\"specific rotation\"].type = analysis.CD\n",
"outcome.analyses[\"specific rotation\"].is_of_isolated_species = True\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@
"# Analyses: UPLC\n",
"# Note using LCMS because UPLC is not an option\n",
"outcome.analyses[\"UPLC analysis\"].type = reaction_pb2.Analysis.LCMS\n",
"outcome.analyses[\n",
" \"UPLC analysis\"\n",
"].details = \"UPLC using 3 µL of 0.0025 M di-tert-butylbiphenyl solution in DMSO external standard\"\n",
"outcome.analyses[\"UPLC analysis\"].details = (\n",
" \"UPLC using 3 µL of 0.0025 M di-tert-butylbiphenyl solution in DMSO external standard\"\n",
")\n",
"outcome.analyses[\"UPLC analysis\"].instrument_manufacturer = \"Waters Acquity\"\n",
"\n",
"# Define product identity\n",
Expand Down Expand Up @@ -1586,9 +1586,9 @@
"\n",
" # Analyses: UPLC/MS\n",
" outcome.analyses[\"UPLC analysis\"].type = reaction_pb2.Analysis.LCMS\n",
" outcome.analyses[\n",
" \"UPLC analysis\"\n",
" ].details = \"UPLC using 3 µL of 0.0025 M di-tert-butylbiphenyl solution in DMSO external standard\"\n",
" outcome.analyses[\"UPLC analysis\"].details = (\n",
" \"UPLC using 3 µL of 0.0025 M di-tert-butylbiphenyl solution in DMSO external standard\"\n",
" )\n",
" outcome.analyses[\"UPLC analysis\"].instrument_manufacturer = \"Waters Acquity\"\n",
"\n",
" # Define product identity\n",
Expand Down
2 changes: 1 addition & 1 deletion ord_schema/orm/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_connection_string(
database: str, username: str, password: str, host: str = "localhost", port: int = 5432
) -> str:
"""Creates an SQLAlchemy connection string."""
return f"postgresql://{username}:{password}@{host}:{port}/{database}"
return f"postgresql://{username}:{password}@{host}:{port}/{database}?client_encoding=utf-8"


def prepare_database(engine: Engine) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"openpyxl>=3.0.5",
"pandas>=1.0.4",
"protobuf==4.22.3",
"psycopg2>=2.8.5",
"psycopg2-binary>=2.8.5",
"pygithub>=1.51",
"python-dateutil>=1.10.0",
"rdkit>=2021.9.5",
Expand Down

0 comments on commit 0827264

Please sign in to comment.