Skip to content

Commit

Permalink
Merge branch 'mysql' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
David Erb committed May 26, 2023
2 parents 3d8afdd + 830a30e commit e76a4e8
Show file tree
Hide file tree
Showing 37 changed files with 293 additions and 231 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 dls-servbase

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


# dae_devops_fingerprint dc970803af5fac409092e34299b9fa8a
# dae_devops_fingerprint 7a40fdc6afce4991715aeda7ae70c444
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 dls-servbase
Naming conventions
Expand Down Expand Up @@ -31,4 +31,4 @@ repository
lowercase, hyphens


.. # dae_devops_fingerprint de2f9c8adee74d13de393fe798054c9a
.. # dae_devops_fingerprint cbd0a78343b6577aa4ddb9d59a242b04
5 changes: 2 additions & 3 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 dls-servbase
Developing
Expand All @@ -22,7 +22,6 @@ Make sure to have at least python version 3.9 then::
Install the package in edit mode which will also install all its dependencies::

$ cd dls-servbase
$ 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 85a9a86c29f573bd408647f7092b6fbe
.. # dae_devops_fingerprint ac891cf352ef89b3b20d2c601dd9ddc4
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 dls-servbase
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 d203976f0fb58a25033c89155e85466e
.. # dae_devops_fingerprint 84e8a32100211cbba64804a3e5c5b337
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 dls-servbase
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 4c487ab610c69b04a69e018d6726347d
.. # dae_devops_fingerprint 6ef08be920f12050c1c579cf6e9d4253
7 changes: 3 additions & 4 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 dls-servbase
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 dls-servbase

If you require a feature that is not currently released you can also install
from git::

$ python3 -m pip install git+https://gitlab.diamond.ac.uk/kbp43231/dls-servbase.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::

$ dls-servbase --version
$ dls-servbase --version-json

.. # dae_devops_fingerprint 4595ce95067039bcca5e2ff516cd03af
.. # dae_devops_fingerprint 64d7ae0dde8939e479b9c793df928d15
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 dls-servbase
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 6b049b05d346f33c50ff7c08811e9754
.. # dae_devops_fingerprint 3bd80bbd88306473a1ee98b988b17986
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 dls-servbase

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


# dae_devops_fingerprint 903ed54702867ede6f0174cc61d4b713
# dae_devops_fingerprint 663e11dbca4cdd5f84a218a64398a688
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 dls-servbase

# 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 ["dls-servbase"]
CMD ["--version"]

# dae_devops_fingerprint d98578ac4f9faec948660e9198138f35
# dae_devops_fingerprint 80986671f8602f6e4666f78f98141826
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 dls-servbase

// 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 a69fcd5d4332da3e6af3b97a7f171509
// dae_devops_fingerprint 35358278c2556f05447815a0833301dc
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 dls-servbase
Contributing to the project
Expand Down Expand Up @@ -38,4 +38,4 @@ should follow.

.. _Developer Guide: https://diamondlightsource.github.io/dls-servbase/main/developer/how-to/contribute.html

.. # dae_devops_fingerprint 65b30b94836cca6d96fc062a2f20730a
.. # dae_devops_fingerprint 0f4cbc1f77b787f03a9a4d268ed08055
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 dls-servbase

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


# dae_devops_fingerprint c59b1a1b3a2300f4ab9f3fc9274b213c
# dae_devops_fingerprint 492458ca501cde9a298a80a102ff22a4
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 dls-servbase

# 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 122e34b2a7528692f5975e2fb7cc167d
# dae_devops_fingerprint b5838c5e0d9b5041500c5cb701fb5e5b
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 dls-servbase -->

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

</html>

<!-- dae_devops_fingerprint 33224c1113136243f88379d0197f501e -->
<!-- dae_devops_fingerprint f42d18d6994629b2878c5e7336501264 -->
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 dls-servbase

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

# dae_devops_fingerprint fe647176edcb02077a904f8e42cf4367
# dae_devops_fingerprint 7a1b58b851c5198d7d380e4ab78d0b49
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 dls-servbase

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 f06ae327848fe3cd45de89312a6cfadf
# dae_devops_fingerprint 480a147d8af93a934e6ad0fd272e60e5
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 dls-servbase

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

# dae_devops_fingerprint 7eb227aeb2a5da22835482ebc7fe11dd
# dae_devops_fingerprint fb2dde86086783119d0b0b805151bf09
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 dls-servbase

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 cd9ac693f5bf252fbaf5c9585cb1dd76
# dae_devops_fingerprint d46d59a6f5197bd11b1cece615feb4df
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 dls-servbase

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 dddcd5c3991c4a5f1f8ae8a99b66fbcb
# dae_devops_fingerprint 0198bfb9fadda488379138f6b2e7f5e3
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 dls-servbase

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 e156b7559726d32f77aea7cfd628aee8
# dae_devops_fingerprint 814043c19b1379f7f1d7b188546a7734
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 dls-servbase */

/* 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 18ea0db9563c9bb76b88d1451e9cb254 */
/* dae_devops_fingerprint b94b4f0075614442e536fdd79bcf79f7 */
4 changes: 2 additions & 2 deletions docs/conf.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 dls-servbase

from pathlib import Path
Expand Down Expand Up @@ -197,4 +197,4 @@ def setup(app):
app.connect("source-read", ultimateReplace)


# dae_devops_fingerprint 9cd088d2151788486c59b6e240be074b
# dae_devops_fingerprint 529445ac120d879ddd71245754e51ecb
Loading

0 comments on commit e76a4e8

Please sign in to comment.