diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index ed83e7da..a0f1e121 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -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: | @@ -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 diff --git a/examples/submissions/3_Liu_Copper_OrgSyn/example_liu.ipynb b/examples/submissions/3_Liu_Copper_OrgSyn/example_liu.ipynb index 6b8ae6f2..71b0c75a 100644 --- a/examples/submissions/3_Liu_Copper_OrgSyn/example_liu.ipynb +++ b/examples/submissions/3_Liu_Copper_OrgSyn/example_liu.ipynb @@ -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", @@ -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", @@ -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", diff --git a/examples/submissions/9_Ahneman_Science_CN_Coupling/example_Ahenman.ipynb b/examples/submissions/9_Ahneman_Science_CN_Coupling/example_Ahenman.ipynb index f8d72976..743658c9 100644 --- a/examples/submissions/9_Ahneman_Science_CN_Coupling/example_Ahenman.ipynb +++ b/examples/submissions/9_Ahneman_Science_CN_Coupling/example_Ahenman.ipynb @@ -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", @@ -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", diff --git a/ord_schema/orm/database.py b/ord_schema/orm/database.py index dec27259..7b382da5 100644 --- a/ord_schema/orm/database.py +++ b/ord_schema/orm/database.py @@ -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: diff --git a/setup.py b/setup.py index c93272e6..3199d15f 100644 --- a/setup.py +++ b/setup.py @@ -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",