Skip to content

Commit

Permalink
Merge branch 'mysql-compat' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
David Erb committed May 26, 2023
2 parents 27b88f9 + 072b5ed commit c585b37
Show file tree
Hide file tree
Showing 37 changed files with 120 additions and 204 deletions.
4 changes: 2 additions & 2 deletions .dae-devops/Makefile
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

# ---------------------------------------------------------------------
Expand Down Expand Up @@ -69,4 +69,4 @@ publish_docs:
cp -r build/html/* $(DOCS_PUBLISH_ROOT)


# dae_devops_fingerprint 17444c38bc0036a20fb9a2d8c598b25b
# dae_devops_fingerprint aa3527f5e00cc362a1553a0469ebd9c9
4 changes: 2 additions & 2 deletions .dae-devops/docs/conventions.rst
Original file line number Diff line number Diff line change
@@ -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.
.. # ********** For repository_name soakdb3
Naming conventions
Expand Down Expand Up @@ -31,4 +31,4 @@ repository
lowercase, hyphens


.. # dae_devops_fingerprint 1e0adc6d888883afb554f2a9ce26c63a
.. # dae_devops_fingerprint de902f373135c81a658a17ca32158297
7 changes: 3 additions & 4 deletions .dae-devops/docs/developing.rst
Original file line number Diff line number Diff line change
@@ -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.
.. # ********** For repository_name soakdb3
Developing
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -36,4 +35,4 @@ If you plan to modify the docs, you will need to::


.. # dae_devops_fingerprint f01a1063bf5a9d381914e10c67393683
.. # dae_devops_fingerprint ee39ac128183f0afe7cce3adcab8dd2a
15 changes: 8 additions & 7 deletions .dae-devops/docs/devops.rst
Original file line number Diff line number Diff line change
@@ -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.
.. # ********** 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.

Expand All @@ -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 643e7f13e98318c4428bcec7cbb50a96
4 changes: 2 additions & 2 deletions .dae-devops/docs/docs_structure.rst
Original file line number Diff line number Diff line change
@@ -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.
.. # ********** For repository_name soakdb3
About the documentation
Expand All @@ -21,4 +21,4 @@ improve most documentation - often immensely.

`More information on this topic. <https://documentation.divio.com>`_

.. # dae_devops_fingerprint 70cac733177dd5256bdaf910bc955cb7
.. # dae_devops_fingerprint f7cd26a8269dc852910966084289b296
9 changes: 4 additions & 5 deletions .dae-devops/docs/installing.rst
Original file line number Diff line number Diff line change
@@ -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.
.. # ********** For repository_name soakdb3
Installing
Expand All @@ -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 c122d062e225aa06bbb8e80da0553fd7
12 changes: 4 additions & 8 deletions .dae-devops/docs/testing.rst
Original file line number Diff line number Diff line change
@@ -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.
.. # ********** For repository_name soakdb3
Testing
Expand All @@ -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

Expand All @@ -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 588faee19542e87356f922601b113be3
4 changes: 2 additions & 2 deletions .dae-devops/prepare_git_dependencies.sh
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

me=${BASH_SOURCE}
Expand All @@ -13,4 +13,4 @@ function __install {
}


# dae_devops_fingerprint af7f370578b9e81ef22fb808092418e9
# dae_devops_fingerprint b5d67b78d8b53f60536200e8bfa6d4d6
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

# This file is for use as a devcontainer and a runtime container
Expand Down Expand Up @@ -40,4 +40,4 @@ ENV PATH=/venv/bin:$PATH
ENTRYPOINT ["soakdb3"]
CMD ["--version"]

# dae_devops_fingerprint 9ff8e9331ec715bc6a58b17884119f6e
# dae_devops_fingerprint b47bdd9a358105e4dd26f540f42bbf7b
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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.
// ********** For repository_name soakdb3

// For format details, see https://containers.dev/implementors/json_reference/
Expand Down Expand Up @@ -57,4 +57,4 @@
"postCreateCommand": "pip install -e .[dev]"
}

// dae_devops_fingerprint b7efe3515fabdbef051883e85a7dbc63
// dae_devops_fingerprint 9524218bef5e86a01794006032ad7fcb
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -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.
.. # ********** For repository_name soakdb3
Contributing to the project
Expand Down Expand Up @@ -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 9f9b8d29e13fc36a91cb18e92de3c255
4 changes: 2 additions & 2 deletions .github/actions/install_requirements/action.yml
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

name: Install requirements
Expand Down Expand Up @@ -61,4 +61,4 @@ runs:
shell: bash


# dae_devops_fingerprint 3711ce9b640be2b9a9910ce11917caab
# dae_devops_fingerprint 4bec23778f08376d659e5f9a364d8090
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

# To get started with Dependabot version updates, you'll need to specify which
Expand All @@ -19,4 +19,4 @@ updates:
schedule:
interval: "weekly"

# dae_devops_fingerprint 1b0b6977928285597c9445dd3bdfdc4f
# dae_devops_fingerprint 0f56118bd55142e0710b36f4ac80c196
4 changes: 2 additions & 2 deletions .github/pages/index.html
Original file line number Diff line number Diff line change
@@ -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. -->
<!-- ********** For repository_name soakdb3 -->

<!DOCTYPE html>
Expand All @@ -14,4 +14,4 @@

</html>

<!-- dae_devops_fingerprint a9b7e91437b814a6673514c65cb04fd1 -->
<!-- dae_devops_fingerprint 928af9be6608752e095084f282661a42 -->
4 changes: 2 additions & 2 deletions .github/pages/make_switcher.py
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

import json
Expand Down Expand Up @@ -102,4 +102,4 @@ def main(args=None):
if __name__ == "__main__":
main()

# dae_devops_fingerprint 3a0cb26bb487b84867ea34a995083006
# dae_devops_fingerprint ab3ccbd5659d924b435fbf16b8432c57
10 changes: 7 additions & 3 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

name: Code CI
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -212,4 +216,4 @@ jobs:
with:
password: ${{ secrets.PYPI_TOKEN }}

# dae_devops_fingerprint 9d63584e1f4dbf1aade23a343c04004c
# dae_devops_fingerprint adf2b49cc576a9c060e1d3257841b202
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

name: Docs CI
Expand Down Expand Up @@ -56,4 +56,4 @@ jobs:
publish_dir: .github/pages
keep_files: true

# dae_devops_fingerprint d09a79a9137e0fcb2c0c252f79e1b14a
# dae_devops_fingerprint b7a223c7e424fa87fa8a411a885477e5
4 changes: 2 additions & 2 deletions .github/workflows/docs_clean.yml
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

name: Docs Cleanup CI
Expand Down Expand Up @@ -46,4 +46,4 @@ jobs:
git commit -am "Removing redundant docs version $DOCS_VERSION"
git push
# dae_devops_fingerprint 53695740e43f166fa79c006dec2ce042
# dae_devops_fingerprint ea9d13b83d6931e7a1f8beb23393a10d
4 changes: 2 additions & 2 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

name: Link Check
Expand Down Expand Up @@ -27,4 +27,4 @@ jobs:
- name: Check links
run: tox -e docs build -- -b linkcheck

# dae_devops_fingerprint 3f831adefea459ca44abcabff90bae1a
# dae_devops_fingerprint 577e29e04eaace429f3b265715dd1db0
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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.
# ********** For repository_name soakdb3

variables:
Expand Down Expand Up @@ -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 7738035675008c0815875d47c0aab949
2 changes: 1 addition & 1 deletion configurations/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -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. */
/* ********** 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.
Expand All @@ -15,4 +15,4 @@
max-width: 100%;
}

/* dae_devops_fingerprint 7587ab332856ef902636e87b51f8b664 */
/* dae_devops_fingerprint 18b364be4830ff06599c595e92feab70 */
Loading

0 comments on commit c585b37

Please sign in to comment.