From c41a6eec69f1d778154a18da870edcc6f26cd94a Mon Sep 17 00:00:00 2001 From: David Erb Date: Thu, 25 May 2023 09:53:44 +0000 Subject: [PATCH 1/2] new normsql database definition compatability --- .dae-devops/Makefile | 4 +- .dae-devops/docs/conventions.rst | 4 +- .dae-devops/docs/developing.rst | 7 ++- .dae-devops/docs/devops.rst | 15 +++--- .dae-devops/docs/docs_structure.rst | 4 +- .dae-devops/docs/installing.rst | 9 ++-- .dae-devops/docs/testing.rst | 12 ++--- .dae-devops/prepare_git_dependencies.sh | 4 +- .devcontainer/Dockerfile | 4 +- .devcontainer/devcontainer.json | 4 +- .github/CONTRIBUTING.rst | 4 +- .../actions/install_requirements/action.yml | 4 +- .github/dependabot.yml | 4 +- .github/pages/index.html | 4 +- .github/pages/make_switcher.py | 4 +- .github/workflows/code.yml | 4 +- .github/workflows/docs.yml | 4 +- .github/workflows/docs_clean.yml | 4 +- .github/workflows/linkcheck.yml | 4 +- .gitlab-ci.yml | 4 +- configurations/development.yaml | 2 +- docs/_static/css/custom.css | 4 +- docs/conf.py | 8 +-- docs/user/how-to/03-starting_development.rst | 2 +- pyproject.toml | 4 +- .../databases/database_definition.py} | 49 ++++++------------- .../databases/table_definitions.py | 0 src/soakdb3_api/datafaces/datafaces.py | 4 +- .../configurations/default/configuration.yaml | 2 +- src/soakdb3_lib/databases/__init__.py | 0 .../databases/database_definition.py | 33 ------------- src/soakdb3_lib/databases/databases.py | 46 ----------------- src/soakdb3_lib/datafaces/datafaces.py | 4 +- .../datafaces/{aiosqlite.py => normsql.py} | 15 ++++-- tests/configurations/services.yaml | 2 +- tests/conftest.py | 2 +- tests/test_database.py | 34 ++++++++----- 37 files changed, 115 insertions(+), 203 deletions(-) rename src/{soakdb3_lib/databases/aiosqlite.py => soakdb3_api/databases/database_definition.py} (51%) rename src/{soakdb3_lib => soakdb3_api}/databases/table_definitions.py (100%) delete mode 100644 src/soakdb3_lib/databases/__init__.py delete mode 100644 src/soakdb3_lib/databases/database_definition.py delete mode 100644 src/soakdb3_lib/databases/databases.py rename src/soakdb3_lib/datafaces/{aiosqlite.py => normsql.py} (98%) diff --git a/.dae-devops/Makefile b/.dae-devops/Makefile index c6273b6..5f78fd2 100644 --- a/.dae-devops/Makefile +++ b/.dae-devops/Makefile @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 # --------------------------------------------------------------------- @@ -69,4 +69,4 @@ publish_docs: cp -r build/html/* $(DOCS_PUBLISH_ROOT) -# dae_devops_fingerprint 17444c38bc0036a20fb9a2d8c598b25b +# dae_devops_fingerprint 87a805e124ba86f4bd65972724e5536e diff --git a/.dae-devops/docs/conventions.rst b/.dae-devops/docs/conventions.rst index 4b9fc68..2a269de 100644 --- a/.dae-devops/docs/conventions.rst +++ b/.dae-devops/docs/conventions.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.2. +.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. .. # ********** For repository_name soakdb3 Naming conventions @@ -31,4 +31,4 @@ repository lowercase, hyphens -.. # dae_devops_fingerprint 1e0adc6d888883afb554f2a9ce26c63a +.. # dae_devops_fingerprint 6453b898fcb14e4dd9868afc1f5f1bbb diff --git a/.dae-devops/docs/developing.rst b/.dae-devops/docs/developing.rst index eeba8d5..1d726f2 100644 --- a/.dae-devops/docs/developing.rst +++ b/.dae-devops/docs/developing.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.2. +.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. .. # ********** For repository_name soakdb3 Developing @@ -9,7 +9,7 @@ If you plan to make change to the code in this repository, you can use the steps Clone the repository:: - $ git clone None/soakdb3.git + $ git clone https://github.com/DiamondLightSource/soakdb3.git It is recommended that you install into a virtual environment so this installation will not interfere with any existing Python software. @@ -22,7 +22,6 @@ Make sure to have at least python version 3.1 then:: Install the package in edit mode which will also install all its dependencies:: $ cd soakdb3 - $ export PIP_FIND_LINKS=/dls_sw/apps/bxflow/artifacts $ pip install -e .[dev] Now you may begin modifying the code. @@ -36,4 +35,4 @@ If you plan to modify the docs, you will need to:: -.. # dae_devops_fingerprint f01a1063bf5a9d381914e10c67393683 +.. # dae_devops_fingerprint 8ac24e7d475343f39a39816553773644 diff --git a/.dae-devops/docs/devops.rst b/.dae-devops/docs/devops.rst index c0b9971..ed816fa 100644 --- a/.dae-devops/docs/devops.rst +++ b/.dae-devops/docs/devops.rst @@ -1,23 +1,24 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.2. +.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. .. # ********** For repository_name soakdb3 Devops ======================================================================= -There exists a a configuration file called ``.dae-devops/project.yaml``. +In the top level of the repository there exists a configuration file called ``.dae-devops/project.yaml``. This file defines the project information needed for CI/CD. It is parsed by the ``dae_devops.force`` command which creates these files: - pyproject.toml +- .githib/* - .gitlab-ci.yml - .dae-devops/Makefile - .dae-devops/docs/* Local CI/CD execution ------------------------------------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All the CI/CD ops which are run by the git server can be run at the command line. @@ -32,15 +33,15 @@ Validation of the code:: $ make -f .dae-devops/Makefile validate_pytest $ make -f .dae-devops/Makefile validate_docs -Packaging:: +Packaging (for the Diamond intranet):: $ make -f .dae-devops/Makefile package_pip -Publishing:: +Publishing (for the Diamond intranet):: $ make -f .dae-devops/Makefile publish_pip $ make -f .dae-devops/Makefile publish_docs +The Diamond intranet commands are not used for production. The production packaging and publishing are handled in the GitHub Actions workflows mechanism. - -.. # dae_devops_fingerprint f77696d690fbd428333796c0bf2f67df +.. # dae_devops_fingerprint b8416adabeb5111a7b98ad394109a79c diff --git a/.dae-devops/docs/docs_structure.rst b/.dae-devops/docs/docs_structure.rst index 6b0bb3a..e743061 100644 --- a/.dae-devops/docs/docs_structure.rst +++ b/.dae-devops/docs/docs_structure.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.2. +.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. .. # ********** For repository_name soakdb3 About the documentation @@ -21,4 +21,4 @@ improve most documentation - often immensely. `More information on this topic. `_ -.. # dae_devops_fingerprint 70cac733177dd5256bdaf910bc955cb7 +.. # dae_devops_fingerprint 89ddc289acbc5ffa7a523b8ba73caab7 diff --git a/.dae-devops/docs/installing.rst b/.dae-devops/docs/installing.rst index 5638e57..41a7d0f 100644 --- a/.dae-devops/docs/installing.rst +++ b/.dae-devops/docs/installing.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.2. +.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. .. # ********** For repository_name soakdb3 Installing @@ -26,18 +26,17 @@ installation will not interfere with any existing Python software:: You can now use ``pip`` to install the library and its dependencies:: - $ export PIP_FIND_LINKS=/dls_sw/apps/bxflow/artifacts $ python3 -m pip install soakdb3 If you require a feature that is not currently released you can also install from git:: - $ python3 -m pip install git+None/soakdb3.git + $ python3 -m pip install git+https://github.com/DiamondLightSource/soakdb3.git -The library should now be installed and the commandline interface on your path. +The library should now be installed and the commandline should be available. You can check the version that has been installed by typing:: $ soakdb3 --version $ soakdb3 --version-json -.. # dae_devops_fingerprint d1f5270520ca9bb0a9330cba69440cef +.. # dae_devops_fingerprint 810142999a0b0ce82f84405d06045331 diff --git a/.dae-devops/docs/testing.rst b/.dae-devops/docs/testing.rst index cdcd8a6..f0bcc9d 100644 --- a/.dae-devops/docs/testing.rst +++ b/.dae-devops/docs/testing.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.2. +.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. .. # ********** For repository_name soakdb3 Testing @@ -11,17 +11,13 @@ If you want to run the tests, first get a copy of the code per the instructions Then you can run all tests by:: - $ pytest - -Or this, which is the command used by the CI runner. - - $ make -f .dae-devops/Makefile validate_pytest + $ tox -q -e pytest To run a single test you can do:: $ pytest tests/the_test_you_want.py -If you want to see more output of the test while it's running you can do: +If you want to see more output of the test while it's running you can do:: $ pytest -sv -ra --tb=line tests/the_test_you_want.py @@ -35,4 +31,4 @@ This allows peeking in there to see what's been written by the test. -.. # dae_devops_fingerprint ad42b32e9ade79a4dd31dda7541e07f0 +.. # dae_devops_fingerprint a22a065e5a05bce5ad67e9ba97231e27 diff --git a/.dae-devops/prepare_git_dependencies.sh b/.dae-devops/prepare_git_dependencies.sh index b8c40aa..6f5ccf6 100644 --- a/.dae-devops/prepare_git_dependencies.sh +++ b/.dae-devops/prepare_git_dependencies.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 me=${BASH_SOURCE} @@ -13,4 +13,4 @@ function __install { } -# dae_devops_fingerprint af7f370578b9e81ef22fb808092418e9 \ No newline at end of file +# dae_devops_fingerprint 753ce12fdda9cc021f8957ddfbdbe801 \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ed5e2f6..88d9881 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 # This file is for use as a devcontainer and a runtime container @@ -40,4 +40,4 @@ ENV PATH=/venv/bin:$PATH ENTRYPOINT ["soakdb3"] CMD ["--version"] -# dae_devops_fingerprint 9ff8e9331ec715bc6a58b17884119f6e +# dae_devops_fingerprint 39df2a406e916c32866fa828b95cedb5 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c5faed1..de85bf8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ // ********** Please don't edit this file! -// ********** It has been generated automatically by dae_devops version 0.5.2. +// ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. // ********** For repository_name soakdb3 // For format details, see https://containers.dev/implementors/json_reference/ @@ -57,4 +57,4 @@ "postCreateCommand": "pip install -e .[dev]" } -// dae_devops_fingerprint b7efe3515fabdbef051883e85a7dbc63 +// dae_devops_fingerprint 31d735cec5e9348b087931e94ad86201 diff --git a/.github/CONTRIBUTING.rst b/.github/CONTRIBUTING.rst index 0200ec4..1446114 100644 --- a/.github/CONTRIBUTING.rst +++ b/.github/CONTRIBUTING.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.2. +.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. .. # ********** For repository_name soakdb3 Contributing to the project @@ -38,4 +38,4 @@ should follow. .. _Developer Guide: https://diamondlightsource.github.io/soakdb3/main/developer/how-to/contribute.html -.. # dae_devops_fingerprint 0b06b2cb53ea0279a6a2a8c8515122a1 +.. # dae_devops_fingerprint 9ece2d6c151df46e92d82ccf45c9798d diff --git a/.github/actions/install_requirements/action.yml b/.github/actions/install_requirements/action.yml index a93778c..da70bca 100644 --- a/.github/actions/install_requirements/action.yml +++ b/.github/actions/install_requirements/action.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 name: Install requirements @@ -61,4 +61,4 @@ runs: shell: bash -# dae_devops_fingerprint 3711ce9b640be2b9a9910ce11917caab +# dae_devops_fingerprint 81c2c8158521f1250c495d4b0a6720bd diff --git a/.github/dependabot.yml b/.github/dependabot.yml index afab189..3e90320 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 # To get started with Dependabot version updates, you'll need to specify which @@ -19,4 +19,4 @@ updates: schedule: interval: "weekly" -# dae_devops_fingerprint 1b0b6977928285597c9445dd3bdfdc4f +# dae_devops_fingerprint 7e737a508027cc9682746bf87ac927c3 diff --git a/.github/pages/index.html b/.github/pages/index.html index e7048aa..65c701f 100644 --- a/.github/pages/index.html +++ b/.github/pages/index.html @@ -1,5 +1,5 @@ - + @@ -14,4 +14,4 @@ - + diff --git a/.github/pages/make_switcher.py b/.github/pages/make_switcher.py index adcf793..5475d4e 100644 --- a/.github/pages/make_switcher.py +++ b/.github/pages/make_switcher.py @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 import json @@ -102,4 +102,4 @@ def main(args=None): if __name__ == "__main__": main() -# dae_devops_fingerprint 3a0cb26bb487b84867ea34a995083006 +# dae_devops_fingerprint d20329d39ea50acd6e85c5f3ac9ab0bf diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index fb65cc1..4b21ca8 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 name: Code CI @@ -212,4 +212,4 @@ jobs: with: password: ${{ secrets.PYPI_TOKEN }} -# dae_devops_fingerprint 9d63584e1f4dbf1aade23a343c04004c +# dae_devops_fingerprint cc92d3a654008a26c7e0e9648091e4c3 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 951a3cc..4d2a42d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 name: Docs CI @@ -56,4 +56,4 @@ jobs: publish_dir: .github/pages keep_files: true -# dae_devops_fingerprint d09a79a9137e0fcb2c0c252f79e1b14a +# dae_devops_fingerprint 07e76c18742a37be1ceacc9c7959ad7a diff --git a/.github/workflows/docs_clean.yml b/.github/workflows/docs_clean.yml index c3bd845..98cf30c 100644 --- a/.github/workflows/docs_clean.yml +++ b/.github/workflows/docs_clean.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 name: Docs Cleanup CI @@ -46,4 +46,4 @@ jobs: git commit -am "Removing redundant docs version $DOCS_VERSION" git push -# dae_devops_fingerprint 53695740e43f166fa79c006dec2ce042 +# dae_devops_fingerprint 04731d9633eeadad36095a006ca507f9 diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 11a8cbc..70d999b 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 name: Link Check @@ -27,4 +27,4 @@ jobs: - name: Check links run: tox -e docs build -- -b linkcheck -# dae_devops_fingerprint 3f831adefea459ca44abcabff90bae1a +# dae_devops_fingerprint 48c9a6457376f210baf2e716179a3de1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c9dc58b..b3f7f6f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 variables: @@ -87,4 +87,4 @@ package_pip: # # The validate_docs artifacts are in the build/html folder. # - make -f .dae-devops/Makefile publish_docs -# dae_devops_fingerprint 4565f44d5a1e853692f58b6ae3a96c61 +# dae_devops_fingerprint 138dfc3a58570e6d90eb4732e7338781 diff --git a/configurations/development.yaml b/configurations/development.yaml index d5455e8..7d55721 100644 --- a/configurations/development.yaml +++ b/configurations/development.yaml @@ -33,7 +33,7 @@ dataface_specification: pattern: "^[Yy][:]" replace: "/dls/labxchem/" database: - type: "soakdb3_lib.databases.aiosqlite" + type: "dls_normsql.aiosqlite" filename: "set by code" backup_directory: "set by code" log_level: "WARNING" diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index e2933de..7fe7445 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -1,5 +1,5 @@ /* ********** Please don't edit this file! */ -/* ********** It has been generated automatically by dae_devops version 0.5.2. */ +/* ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. */ /* ********** For repository_name soakdb3 */ /* The theme normally has this, but I think it's ok to use the full width of the window in all @media sizes. @@ -15,4 +15,4 @@ max-width: 100%; } -/* dae_devops_fingerprint 7587ab332856ef902636e87b51f8b664 */ +/* dae_devops_fingerprint db7bb96ebbd13db24e39aa71932fa228 */ diff --git a/docs/conf.py b/docs/conf.py index 1f4ee20..edfcaea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 from pathlib import Path @@ -150,7 +150,7 @@ logo=dict( text=project, ), - gitlab_url="None/soakdb3", + gitlab_url="https://github.com/DiamondLightSource/soakdb3", icon_links=[], navbar_end=["theme-switcher", "icon-links"], ) @@ -187,7 +187,7 @@ def ultimateReplace(app, docname, source): ultimate_replacements = { "$" + "{repository_name}": "soakdb3", "$" + "{package_name}": "soakdb3_lib", - "$" + "{git_url}": "None", + "$" + "{git_url}": "https://github.com/DiamondLightSource", "$" + "{python_version_at_least}": "3.1", } @@ -197,4 +197,4 @@ def setup(app): app.connect("source-read", ultimateReplace) -# dae_devops_fingerprint 2b0bd1b9aacaccb81e02f6c3ba44a437 +# dae_devops_fingerprint 1436ce76b6fbb352ef4be88f7f20ddad diff --git a/docs/user/how-to/03-starting_development.rst b/docs/user/how-to/03-starting_development.rst index 2c1710b..6807686 100644 --- a/docs/user/how-to/03-starting_development.rst +++ b/docs/user/how-to/03-starting_development.rst @@ -22,7 +22,7 @@ Start the services:: You should see some lines of output including something like:: - soakdb3_lib.databases.aiosqlite.Aiosqlite database file is /dls/labxchem/data/lb19758/lb19758-64/processing/database/soakDBDataFile.sqlite revision 1 + dls_normsql.aiosqlite.Aiosqlite database file is /dls/labxchem/data/lb19758/lb19758-64/processing/database/soakDBDataFile.sqlite revision 1 You should leave the services running int he console window. You can stop them any time by typing ^C. diff --git a/pyproject.toml b/pyproject.toml index f6099f8..e81639b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.2. +# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. # ********** For repository_name soakdb3 [build-system] @@ -103,4 +103,4 @@ source = ["src", "**/site-packages/"] [tool.tox] legacy_tox_ini = "[tox]\nskipsdist=True\n\n[testenv:{pre-commit,mypy,pytest,docs}]\n# Don't create a virtualenv for the command, requires tox-direct plugin\ndirect = True\npassenv = *\nallowlist_externals = \n pytest \n pre-commit\n mypy\n sphinx-build\n sphinx-autobuild\ncommands =\n pytest: pytest {posargs}\n mypy: mypy src tests {posargs}\n pre-commit: pre-commit run --all-files {posargs}\n docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html\n" -# dae_devops_fingerprint 37d24ba8173f641fd0d795548d671f75 +# dae_devops_fingerprint acfd9f0fe647aa3a3b3fa87e1a07a9f1 diff --git a/src/soakdb3_lib/databases/aiosqlite.py b/src/soakdb3_api/databases/database_definition.py similarity index 51% rename from src/soakdb3_lib/databases/aiosqlite.py rename to src/soakdb3_api/databases/database_definition.py index b60138a..61fdfde 100644 --- a/src/soakdb3_lib/databases/aiosqlite.py +++ b/src/soakdb3_api/databases/database_definition.py @@ -1,68 +1,49 @@ import logging -# Base class for the aiosqlite database object. -from dls_normsql.aiosqlite import Aiosqlite as NormsqlAiosqlite - -from soakdb3_api.databases.constants import Tablenames - -# Base class for our database definition. -from soakdb3_lib.databases.database_definition import DatabaseDefinition +# Base class for all aiosqlite database objects. +from soakdb3_api.databases.table_definitions import BodyTable, HeadTable, VisitTable logger = logging.getLogger(__name__) # ---------------------------------------------------------------------------------------- -class Aiosqlite(DatabaseDefinition, NormsqlAiosqlite): +class DatabaseDefinition: """ - Class with coroutines for creating and querying a sqlite database. - We use dls-normsql to do the heavy lifting. + Class which defines the database tables and revision migration path. + Used in concert with the normsql class. """ # ---------------------------------------------------------------------------------------- - def __init__(self, specification): + def __init__(self): """ Construct object. Do not connect to database. """ - # Constructor for the database definition. - DatabaseDefinition.__init__(self) - - # Constructor for the database implementation. - NormsqlAiosqlite.__init__(self, specification) + self.LATEST_REVISION = 1 # ---------------------------------------------------------------------------------------- - def reinstance(self): - """ - Clone database instance. - This is needed if a process inherits an instance, but needs its own connection. - """ - - return Aiosqlite(self.__filename) - - # ---------------------------------------------------------------------------------------- - async def add_table_definitions(self): + async def add_table_definitions(self, database): """ Make all the table definitions. """ - # Add tables common in all implementations. - await NormsqlAiosqlite.add_table_definitions(self) - - # Add tables from our definition. - await DatabaseDefinition.add_table_definitions(self) + # Table schemas in our database. + database.add_table_definition(HeadTable()) + database.add_table_definition(BodyTable()) + database.add_table_definition(VisitTable()) # ---------------------------------------------------------------------------------------- - async def apply_revision(self, revision): + async def apply_revision(self, database, revision): # Let the base class add any common updates. # Usually only does anything if upgrading to revision 1 # which means we are starting with a legacy database with no revision information. - await NormsqlAiosqlite.apply_revision(self, revision) + await NormsqlAiosqlite.apply_revision(self, database, revision) # Updating to revision 1 presumably means # this is a legacy database with no revision table in it. if revision == 1: - await self.create_table(Tablenames.VISIT) + await database.create_table(Tablenames.VISIT) # if revision == 2: # await self.execute( diff --git a/src/soakdb3_lib/databases/table_definitions.py b/src/soakdb3_api/databases/table_definitions.py similarity index 100% rename from src/soakdb3_lib/databases/table_definitions.py rename to src/soakdb3_api/databases/table_definitions.py diff --git a/src/soakdb3_api/datafaces/datafaces.py b/src/soakdb3_api/datafaces/datafaces.py index 22a12b2..e4a952a 100644 --- a/src/soakdb3_api/datafaces/datafaces.py +++ b/src/soakdb3_api/datafaces/datafaces.py @@ -64,8 +64,8 @@ def lookup_class(self, class_type): return Aiohttp if class_type == DatafaceTypes.DIRECT: - from soakdb3_lib.datafaces.aiosqlite import Aiosqlite + from soakdb3_lib.datafaces.normsql import Normsql - return Aiosqlite + return Normsql raise NotFound("unable to get dataface class for type %s" % (class_type)) diff --git a/src/soakdb3_cli/configurations/default/configuration.yaml b/src/soakdb3_cli/configurations/default/configuration.yaml index 428b8e0..f7c7c0b 100644 --- a/src/soakdb3_cli/configurations/default/configuration.yaml +++ b/src/soakdb3_cli/configurations/default/configuration.yaml @@ -38,7 +38,7 @@ dataface_specification: pattern: "^[Yy][:]" replace: "/dls/labxchem/" database: - type: "soakdb3_lib.databases.aiosqlite" + type: "dls_normsql.aiosqlite" filename: "set by code" backup_directory: "set by code" log_level: "WARNING" diff --git a/src/soakdb3_lib/databases/__init__.py b/src/soakdb3_lib/databases/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/soakdb3_lib/databases/database_definition.py b/src/soakdb3_lib/databases/database_definition.py deleted file mode 100644 index 2647dba..0000000 --- a/src/soakdb3_lib/databases/database_definition.py +++ /dev/null @@ -1,33 +0,0 @@ -import logging - -# Base class for all aiosqlite database objects. -from soakdb3_lib.databases.table_definitions import BodyTable, HeadTable, VisitTable - -logger = logging.getLogger(__name__) - - -# ---------------------------------------------------------------------------------------- -class DatabaseDefinition: - """ - Class which defines the database tables and revision migration path. - Used in concert with the normsql class. - """ - - # ---------------------------------------------------------------------------------------- - def __init__(self): - """ - Construct object. Do not connect to database. - """ - - self.LATEST_REVISION = 1 - - # ---------------------------------------------------------------------------------------- - async def add_table_definitions(self): - """ - Make all the table definitions. - """ - - # Table schemas in our database. - self.add_table_definition(HeadTable()) - self.add_table_definition(BodyTable()) - self.add_table_definition(VisitTable()) diff --git a/src/soakdb3_lib/databases/databases.py b/src/soakdb3_lib/databases/databases.py deleted file mode 100644 index 43f1a39..0000000 --- a/src/soakdb3_lib/databases/databases.py +++ /dev/null @@ -1,46 +0,0 @@ -# Use standard logging in this module. -import logging - -# Class managing list of things. -from dls_utilpack.things import Things - -# Exceptions. -from soakdb3_api.exceptions import NotFound - -logger = logging.getLogger(__name__) - - -class Databases(Things): - """ - List of available databases. - """ - - # ---------------------------------------------------------------------------------------- - def __init__(self, name=None): - Things.__init__(self, name) - - # ---------------------------------------------------------------------------------------- - def build_object(self, specification): - """""" - - database_class = self.lookup_class(specification["type"]) - - try: - database_object = database_class(specification) - except Exception as exception: - raise RuntimeError( - "unable to build database object for type %s" % (database_class) - ) from exception - - return database_object - - # ---------------------------------------------------------------------------------------- - def lookup_class(self, class_type): - """""" - - if class_type == "soakdb3_lib.databases.aiosqlite": - from soakdb3_lib.databases.aiosqlite import Aiosqlite - - return Aiosqlite - - raise NotFound("unable to get database class for type %s" % (class_type)) diff --git a/src/soakdb3_lib/datafaces/datafaces.py b/src/soakdb3_lib/datafaces/datafaces.py index 680d71a..a6cf13f 100644 --- a/src/soakdb3_lib/datafaces/datafaces.py +++ b/src/soakdb3_lib/datafaces/datafaces.py @@ -47,8 +47,8 @@ def lookup_class(self, class_type): return Aiohttp elif class_type == "soakdb3_lib.datafaces.aiosqlite": - from soakdb3_lib.datafaces.aiosqlite import Aiosqlite + from soakdb3_lib.datafaces.normsql import Normsql - return Aiosqlite + return Normsql raise NotFound("unable to get dataface class for type %s" % (class_type)) diff --git a/src/soakdb3_lib/datafaces/aiosqlite.py b/src/soakdb3_lib/datafaces/normsql.py similarity index 98% rename from src/soakdb3_lib/datafaces/aiosqlite.py rename to src/soakdb3_lib/datafaces/normsql.py index aeb5634..f619808 100644 --- a/src/soakdb3_lib/datafaces/aiosqlite.py +++ b/src/soakdb3_lib/datafaces/normsql.py @@ -10,6 +10,9 @@ from dateutil.parser import ParserError, parse +# Database manager. +from dls_normsql.databases import Databases + # Utilities. from dls_utilpack.callsign import callsign from dls_utilpack.require import require @@ -19,9 +22,7 @@ # Database constants. from soakdb3_api.databases.constants import PinBarcodeErrors, Tablenames - -# Database manager. -from soakdb3_lib.databases.databases import Databases +from soakdb3_api.databases.database_definition import DatabaseDefinition # Version for health response. from soakdb3_lib.version import version as soakdb3_lib_version @@ -31,7 +32,7 @@ thing_type = "soakdb3_lib.datafaces.aiosqlite" -class Aiosqlite(Thing): +class Normsql(Thing): """ Implementation of dataface on top of underlying database API provider presumed to be sqlite. """ @@ -65,6 +66,8 @@ def __init__(self, specification=None): "visitid_mappings", ) + self.__database_definition_object = DatabaseDefinition() + # Cache of database objects we have created. self.__cache = {} self.__cache_cvs_directories = {} @@ -106,7 +109,9 @@ async def establish_database_connection(self, visitid): self.__cache_cvs_directories[visitid] = f"{visitid_path}/lab36" - database = Databases().build_object(dbspec) + database = Databases().build_object( + dbspec, self.__database_definition_object + ) await database.connect() # Cache database connections by visitid. diff --git a/tests/configurations/services.yaml b/tests/configurations/services.yaml index 8616aad..b7c478f 100644 --- a/tests/configurations/services.yaml +++ b/tests/configurations/services.yaml @@ -43,7 +43,7 @@ soakdb3_dataface_specification: pattern: "//dc/dls/labxchem/" replace: "/dls/labxchem/" database: - type: "soakdb3_lib.databases.aiosqlite" + type: "dls_normsql.aiosqlite" filename: "set by code" backup_directory: "set by code" log_level: "WARNING" diff --git a/tests/conftest.py b/tests/conftest.py index 198d88a..513059b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -45,7 +45,7 @@ def logging_setup(): logging.getLogger("soakdb3_lib.base_aiohttp").setLevel("INFO") # All xchem_be database sql commands. - # logging.getLogger("soakdb3_lib.databases.aiosqlite").setLevel("INFO") + # logging.getLogger("dls_normsql.aiosqlite").setLevel("INFO") logging.getLogger("soakdb3_lib.contexts.classic").setLevel("INFO") logging.getLogger("soakdb3_lib.datafaces.context").setLevel("INFO") diff --git a/tests/test_database.py b/tests/test_database.py index 54f1942..8771a46 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -3,9 +3,11 @@ import multiprocessing import pytest +from dls_normsql.constants import ClassTypes +from dls_normsql.databases import Databases from soakdb3_api.databases.constants import BodyFieldnames, HeadFieldnames, Tablenames -from soakdb3_lib.databases.databases import Databases +from soakdb3_api.databases.database_definition import DatabaseDefinition logger = logging.getLogger(__name__) @@ -18,8 +20,8 @@ def test(self, constants, logging_setup, output_directory): """ database_specification = { - "type": "soakdb3_lib.databases.aiosqlite", - "filename": "%s/soakdb3.sqlite" % (output_directory), + "type": ClassTypes.AIOSQLITE, + "filename": "%s/soakdb3_pytest.sqlite" % (output_directory), } # Test direct SQL access to the database. @@ -38,7 +40,7 @@ def test(self, constants, logging_setup, output_directory): """ database_specification = { - "type": "soakdb3_lib.databases.aiosqlite", + "type": "dls_normsql.aiosqlite", "filename": "%s/soakdb3.sqlite" % (output_directory), } @@ -58,7 +60,7 @@ def test(self, constants, logging_setup, output_directory): """ database_specification = { - "type": "soakdb3_lib.databases.aiosqlite", + "type": "dls_normsql.aiosqlite", "filename": "%s/soakdb3.sqlite" % (output_directory), } @@ -112,10 +114,13 @@ async def _main_coroutine( """ """ databases = Databases() - database = databases.build_object(database_specification) + database = databases.build_object( + database_specification, + DatabaseDefinition(), + ) # Connect to database. - await database.connect() + await database.connect(should_drop_database=True) try: # Write one record. @@ -142,13 +147,15 @@ async def _main_coroutine( self, constants, database_specification, output_directory ): """ """ - databases = Databases() - database = databases.build_object(database_specification) + database = databases.build_object( + database_specification, + DatabaseDefinition(), + ) try: # Connect to database. - await database.connect() + await database.connect(should_drop_database=True) uuid1 = 1000 uuid2 = 2000 @@ -209,10 +216,13 @@ async def _main_coroutine( """ """ databases = Databases() - database = databases.build_object(database_specification) + database = databases.build_object( + database_specification, + DatabaseDefinition(), + ) # Connect to database. - await database.connect() + await database.connect(should_drop_database=True) try: uuid1 = 1000 From 072b5eda3267cb5b60415261a446c57eb72ba9ff Mon Sep 17 00:00:00 2001 From: David Erb Date: Fri, 26 May 2023 08:16:27 +0100 Subject: [PATCH 2/2] devops 5.3 --- .dae-devops/Makefile | 4 ++-- .dae-devops/docs/conventions.rst | 4 ++-- .dae-devops/docs/developing.rst | 4 ++-- .dae-devops/docs/devops.rst | 4 ++-- .dae-devops/docs/docs_structure.rst | 4 ++-- .dae-devops/docs/installing.rst | 4 ++-- .dae-devops/docs/testing.rst | 4 ++-- .dae-devops/prepare_git_dependencies.sh | 4 ++-- .devcontainer/Dockerfile | 4 ++-- .devcontainer/devcontainer.json | 4 ++-- .github/CONTRIBUTING.rst | 4 ++-- .github/actions/install_requirements/action.yml | 4 ++-- .github/dependabot.yml | 4 ++-- .github/pages/index.html | 4 ++-- .github/pages/make_switcher.py | 4 ++-- .github/workflows/code.yml | 10 +++++++--- .github/workflows/docs.yml | 4 ++-- .github/workflows/docs_clean.yml | 4 ++-- .github/workflows/linkcheck.yml | 4 ++-- .gitlab-ci.yml | 4 ++-- docs/_static/css/custom.css | 4 ++-- docs/conf.py | 4 ++-- pyproject.toml | 4 ++-- 23 files changed, 51 insertions(+), 47 deletions(-) diff --git a/.dae-devops/Makefile b/.dae-devops/Makefile index 5f78fd2..67f14d9 100644 --- a/.dae-devops/Makefile +++ b/.dae-devops/Makefile @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 # --------------------------------------------------------------------- @@ -69,4 +69,4 @@ publish_docs: cp -r build/html/* $(DOCS_PUBLISH_ROOT) -# dae_devops_fingerprint 87a805e124ba86f4bd65972724e5536e +# dae_devops_fingerprint aa3527f5e00cc362a1553a0469ebd9c9 diff --git a/.dae-devops/docs/conventions.rst b/.dae-devops/docs/conventions.rst index 2a269de..c848a30 100644 --- a/.dae-devops/docs/conventions.rst +++ b/.dae-devops/docs/conventions.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +.. # ********** It has been generated automatically by dae_devops version 0.5.3. .. # ********** For repository_name soakdb3 Naming conventions @@ -31,4 +31,4 @@ repository lowercase, hyphens -.. # dae_devops_fingerprint 6453b898fcb14e4dd9868afc1f5f1bbb +.. # dae_devops_fingerprint de902f373135c81a658a17ca32158297 diff --git a/.dae-devops/docs/developing.rst b/.dae-devops/docs/developing.rst index 1d726f2..b117336 100644 --- a/.dae-devops/docs/developing.rst +++ b/.dae-devops/docs/developing.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +.. # ********** It has been generated automatically by dae_devops version 0.5.3. .. # ********** For repository_name soakdb3 Developing @@ -35,4 +35,4 @@ If you plan to modify the docs, you will need to:: -.. # dae_devops_fingerprint 8ac24e7d475343f39a39816553773644 +.. # dae_devops_fingerprint ee39ac128183f0afe7cce3adcab8dd2a diff --git a/.dae-devops/docs/devops.rst b/.dae-devops/docs/devops.rst index ed816fa..7544c6f 100644 --- a/.dae-devops/docs/devops.rst +++ b/.dae-devops/docs/devops.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +.. # ********** It has been generated automatically by dae_devops version 0.5.3. .. # ********** For repository_name soakdb3 Devops @@ -44,4 +44,4 @@ Publishing (for the Diamond intranet):: The Diamond intranet commands are not used for production. The production packaging and publishing are handled in the GitHub Actions workflows mechanism. -.. # dae_devops_fingerprint b8416adabeb5111a7b98ad394109a79c +.. # dae_devops_fingerprint 643e7f13e98318c4428bcec7cbb50a96 diff --git a/.dae-devops/docs/docs_structure.rst b/.dae-devops/docs/docs_structure.rst index e743061..f373c99 100644 --- a/.dae-devops/docs/docs_structure.rst +++ b/.dae-devops/docs/docs_structure.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +.. # ********** It has been generated automatically by dae_devops version 0.5.3. .. # ********** For repository_name soakdb3 About the documentation @@ -21,4 +21,4 @@ improve most documentation - often immensely. `More information on this topic. `_ -.. # dae_devops_fingerprint 89ddc289acbc5ffa7a523b8ba73caab7 +.. # dae_devops_fingerprint f7cd26a8269dc852910966084289b296 diff --git a/.dae-devops/docs/installing.rst b/.dae-devops/docs/installing.rst index 41a7d0f..738ba94 100644 --- a/.dae-devops/docs/installing.rst +++ b/.dae-devops/docs/installing.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +.. # ********** It has been generated automatically by dae_devops version 0.5.3. .. # ********** For repository_name soakdb3 Installing @@ -39,4 +39,4 @@ You can check the version that has been installed by typing:: $ soakdb3 --version $ soakdb3 --version-json -.. # dae_devops_fingerprint 810142999a0b0ce82f84405d06045331 +.. # dae_devops_fingerprint c122d062e225aa06bbb8e80da0553fd7 diff --git a/.dae-devops/docs/testing.rst b/.dae-devops/docs/testing.rst index f0bcc9d..ab3b5f2 100644 --- a/.dae-devops/docs/testing.rst +++ b/.dae-devops/docs/testing.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +.. # ********** It has been generated automatically by dae_devops version 0.5.3. .. # ********** For repository_name soakdb3 Testing @@ -31,4 +31,4 @@ This allows peeking in there to see what's been written by the test. -.. # dae_devops_fingerprint a22a065e5a05bce5ad67e9ba97231e27 +.. # dae_devops_fingerprint 588faee19542e87356f922601b113be3 diff --git a/.dae-devops/prepare_git_dependencies.sh b/.dae-devops/prepare_git_dependencies.sh index 6f5ccf6..55a00d5 100644 --- a/.dae-devops/prepare_git_dependencies.sh +++ b/.dae-devops/prepare_git_dependencies.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 me=${BASH_SOURCE} @@ -13,4 +13,4 @@ function __install { } -# dae_devops_fingerprint 753ce12fdda9cc021f8957ddfbdbe801 \ No newline at end of file +# dae_devops_fingerprint b5d67b78d8b53f60536200e8bfa6d4d6 \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 88d9881..26396cf 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 # This file is for use as a devcontainer and a runtime container @@ -40,4 +40,4 @@ ENV PATH=/venv/bin:$PATH ENTRYPOINT ["soakdb3"] CMD ["--version"] -# dae_devops_fingerprint 39df2a406e916c32866fa828b95cedb5 +# dae_devops_fingerprint b47bdd9a358105e4dd26f540f42bbf7b diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index de85bf8..ea22e55 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ // ********** Please don't edit this file! -// ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +// ********** It has been generated automatically by dae_devops version 0.5.3. // ********** For repository_name soakdb3 // For format details, see https://containers.dev/implementors/json_reference/ @@ -57,4 +57,4 @@ "postCreateCommand": "pip install -e .[dev]" } -// dae_devops_fingerprint 31d735cec5e9348b087931e94ad86201 +// dae_devops_fingerprint 9524218bef5e86a01794006032ad7fcb diff --git a/.github/CONTRIBUTING.rst b/.github/CONTRIBUTING.rst index 1446114..699d1a8 100644 --- a/.github/CONTRIBUTING.rst +++ b/.github/CONTRIBUTING.rst @@ -1,5 +1,5 @@ .. # ********** Please don't edit this file! -.. # ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +.. # ********** It has been generated automatically by dae_devops version 0.5.3. .. # ********** For repository_name soakdb3 Contributing to the project @@ -38,4 +38,4 @@ should follow. .. _Developer Guide: https://diamondlightsource.github.io/soakdb3/main/developer/how-to/contribute.html -.. # dae_devops_fingerprint 9ece2d6c151df46e92d82ccf45c9798d +.. # dae_devops_fingerprint 9f9b8d29e13fc36a91cb18e92de3c255 diff --git a/.github/actions/install_requirements/action.yml b/.github/actions/install_requirements/action.yml index da70bca..8c5af7c 100644 --- a/.github/actions/install_requirements/action.yml +++ b/.github/actions/install_requirements/action.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 name: Install requirements @@ -61,4 +61,4 @@ runs: shell: bash -# dae_devops_fingerprint 81c2c8158521f1250c495d4b0a6720bd +# dae_devops_fingerprint 4bec23778f08376d659e5f9a364d8090 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3e90320..b479e5e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 # To get started with Dependabot version updates, you'll need to specify which @@ -19,4 +19,4 @@ updates: schedule: interval: "weekly" -# dae_devops_fingerprint 7e737a508027cc9682746bf87ac927c3 +# dae_devops_fingerprint 0f56118bd55142e0710b36f4ac80c196 diff --git a/.github/pages/index.html b/.github/pages/index.html index 65c701f..e2a6dd7 100644 --- a/.github/pages/index.html +++ b/.github/pages/index.html @@ -1,5 +1,5 @@ - + @@ -14,4 +14,4 @@ - + diff --git a/.github/pages/make_switcher.py b/.github/pages/make_switcher.py index 5475d4e..6ffdd61 100644 --- a/.github/pages/make_switcher.py +++ b/.github/pages/make_switcher.py @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 import json @@ -102,4 +102,4 @@ def main(args=None): if __name__ == "__main__": main() -# dae_devops_fingerprint d20329d39ea50acd6e85c5f3ac9ab0bf +# dae_devops_fingerprint ab3ccbd5659d924b435fbf16b8432c57 diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 4b21ca8..a0d5c09 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 name: Code CI @@ -39,7 +39,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] # can add windows-latest, macos-latest - python: ["3.10", "3.11"] + python: ["3.10"] install: ["-e .[dev,docs]"] # Make one version be non-editable to test both paths of version code include: @@ -69,6 +69,10 @@ jobs: - name: List dependency tree run: pipdeptree + # TODO: Make startup of MySQL able to be configured. + - name: Start up the MySQL that comes with Unbuntu + run: sudo /etc/init.d/mysql start + - name: Run tests run: | sudo apt install environment-modules @@ -212,4 +216,4 @@ jobs: with: password: ${{ secrets.PYPI_TOKEN }} -# dae_devops_fingerprint cc92d3a654008a26c7e0e9648091e4c3 +# dae_devops_fingerprint adf2b49cc576a9c060e1d3257841b202 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4d2a42d..e17682e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 name: Docs CI @@ -56,4 +56,4 @@ jobs: publish_dir: .github/pages keep_files: true -# dae_devops_fingerprint 07e76c18742a37be1ceacc9c7959ad7a +# dae_devops_fingerprint b7a223c7e424fa87fa8a411a885477e5 diff --git a/.github/workflows/docs_clean.yml b/.github/workflows/docs_clean.yml index 98cf30c..134f7a5 100644 --- a/.github/workflows/docs_clean.yml +++ b/.github/workflows/docs_clean.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 name: Docs Cleanup CI @@ -46,4 +46,4 @@ jobs: git commit -am "Removing redundant docs version $DOCS_VERSION" git push -# dae_devops_fingerprint 04731d9633eeadad36095a006ca507f9 +# dae_devops_fingerprint ea9d13b83d6931e7a1f8beb23393a10d diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 70d999b..98cd734 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 name: Link Check @@ -27,4 +27,4 @@ jobs: - name: Check links run: tox -e docs build -- -b linkcheck -# dae_devops_fingerprint 48c9a6457376f210baf2e716179a3de1 +# dae_devops_fingerprint 577e29e04eaace429f3b265715dd1db0 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3f7f6f..0b850cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 variables: @@ -87,4 +87,4 @@ package_pip: # # The validate_docs artifacts are in the build/html folder. # - make -f .dae-devops/Makefile publish_docs -# dae_devops_fingerprint 138dfc3a58570e6d90eb4732e7338781 +# dae_devops_fingerprint 7738035675008c0815875d47c0aab949 diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 7fe7445..ca742ac 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -1,5 +1,5 @@ /* ********** Please don't edit this file! */ -/* ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. */ +/* ********** It has been generated automatically by dae_devops version 0.5.3. */ /* ********** For repository_name soakdb3 */ /* The theme normally has this, but I think it's ok to use the full width of the window in all @media sizes. @@ -15,4 +15,4 @@ max-width: 100%; } -/* dae_devops_fingerprint db7bb96ebbd13db24e39aa71932fa228 */ +/* dae_devops_fingerprint 18b364be4830ff06599c595e92feab70 */ diff --git a/docs/conf.py b/docs/conf.py index edfcaea..f2ecbde 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 from pathlib import Path @@ -197,4 +197,4 @@ def setup(app): app.connect("source-read", ultimateReplace) -# dae_devops_fingerprint 1436ce76b6fbb352ef4be88f7f20ddad +# dae_devops_fingerprint 1dd14a8b44868cb503a53c4871d7fcaf diff --git a/pyproject.toml b/pyproject.toml index e81639b..04ac2f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ # ********** Please don't edit this file! -# ********** It has been generated automatically by dae_devops version 0.5.3.dev1+g36e9e1c.d20230523. +# ********** It has been generated automatically by dae_devops version 0.5.3. # ********** For repository_name soakdb3 [build-system] @@ -103,4 +103,4 @@ source = ["src", "**/site-packages/"] [tool.tox] legacy_tox_ini = "[tox]\nskipsdist=True\n\n[testenv:{pre-commit,mypy,pytest,docs}]\n# Don't create a virtualenv for the command, requires tox-direct plugin\ndirect = True\npassenv = *\nallowlist_externals = \n pytest \n pre-commit\n mypy\n sphinx-build\n sphinx-autobuild\ncommands =\n pytest: pytest {posargs}\n mypy: mypy src tests {posargs}\n pre-commit: pre-commit run --all-files {posargs}\n docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html\n" -# dae_devops_fingerprint acfd9f0fe647aa3a3b3fa87e1a07a9f1 +# dae_devops_fingerprint b2c1b99fc8739454fdb7b59260854e73