Skip to content

Commit 27e5c3c

Browse files
author
David Erb
committed
Merge branch 'removes-contexts' into main
2 parents cbc835d + 1bc65eb commit 27e5c3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+338
-438
lines changed

.dae-devops/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ********** Please don't edit this file!
2-
# ********** It has been generated automatically by dae_devops version 0.5.2.
2+
# ********** It has been generated automatically by dae_devops version 0.5.3.
33
# ********** For repository_name chimpflow
44

55
# ---------------------------------------------------------------------
@@ -69,4 +69,4 @@ publish_docs:
6969
cp -r build/html/* $(DOCS_PUBLISH_ROOT)
7070

7171

72-
# dae_devops_fingerprint e7dd1051580ffa0ed1b6a5a9ce3e6290
72+
# dae_devops_fingerprint 2cf2414f1b8c1b09c1141588f1f4e6ca

.dae-devops/docs/conventions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. # ********** Please don't edit this file!
2-
.. # ********** It has been generated automatically by dae_devops version 0.5.2.
2+
.. # ********** It has been generated automatically by dae_devops version 0.5.3.
33
.. # ********** For repository_name chimpflow
44
55
Naming conventions
@@ -31,4 +31,4 @@ repository
3131
lowercase, hyphens
3232

3333

34-
.. # dae_devops_fingerprint 1584b2ca3962a352d751931fba1af516
34+
.. # dae_devops_fingerprint 0b606baa538d6630ee8110b0ceb8ddde

.dae-devops/docs/developing.rst

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. # ********** Please don't edit this file!
2-
.. # ********** It has been generated automatically by dae_devops version 0.5.2.
2+
.. # ********** It has been generated automatically by dae_devops version 0.5.3.
33
.. # ********** For repository_name chimpflow
44
55
Developing
@@ -9,11 +9,12 @@ If you plan to make change to the code in this repository, you can use the steps
99

1010
Clone the repository::
1111

12+
$ cd <your development area>
1213
$ git clone https://github.com/diamondlightsource/chimpflow/chimpflow.git
1314

1415
It is recommended that you install into a virtual environment so this
1516
installation will not interfere with any existing Python software.
16-
Make sure to have at least python version 3.9 then::
17+
Make sure to have at least python version 3.10 then::
1718

1819
$ python3 -m venv /scratch/$USER/myvenv
1920
$ source /scratch/$USER/myvenv/bin/activate
@@ -22,18 +23,9 @@ Make sure to have at least python version 3.9 then::
2223
Install the package in edit mode which will also install all its dependencies::
2324

2425
$ cd chimpflow
25-
$ export PIP_FIND_LINKS=/dls_sw/apps/bxflow/artifacts
26-
$ pip install -e .[dev]
26+
$ pip install -e .[dev,docs]
2727

2828
Now you may begin modifying the code.
2929

30-
|
3130

32-
If you plan to modify the docs, you will need to::
33-
34-
$ pip install -e .[docs]
35-
36-
37-
38-
39-
.. # dae_devops_fingerprint 2778ced07515a8064c66e3978215aae0
31+
.. # dae_devops_fingerprint 3ea76cf4de6fcad3d4fac02d87b790e7

.dae-devops/docs/devops.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
.. # ********** Please don't edit this file!
2-
.. # ********** It has been generated automatically by dae_devops version 0.5.2.
2+
.. # ********** It has been generated automatically by dae_devops version 0.5.3.
33
.. # ********** For repository_name chimpflow
44
55
Devops
66
=======================================================================
77

8-
There exists a a configuration file called ``.dae-devops/project.yaml``.
8+
In the top level of the repository there exists a configuration file called ``.dae-devops/project.yaml``.
99

1010
This file defines the project information needed for CI/CD.
1111

1212
It is parsed by the ``dae_devops.force`` command which creates these files:
1313

1414
- pyproject.toml
15+
- .githib/*
1516
- .gitlab-ci.yml
1617
- .dae-devops/Makefile
1718
- .dae-devops/docs/*
1819

1920
Local CI/CD execution
20-
-----------------------------------------------------------------------
21+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2122

2223
All the CI/CD ops which are run by the git server can be run at the command line.
2324

@@ -32,15 +33,15 @@ Validation of the code::
3233
$ make -f .dae-devops/Makefile validate_pytest
3334
$ make -f .dae-devops/Makefile validate_docs
3435

35-
Packaging::
36+
Packaging (for the Diamond intranet)::
3637

3738
$ make -f .dae-devops/Makefile package_pip
3839

39-
Publishing::
40+
Publishing (for the Diamond intranet)::
4041

4142
$ make -f .dae-devops/Makefile publish_pip
4243
$ make -f .dae-devops/Makefile publish_docs
4344
45+
The Diamond intranet commands are not used for production. The production packaging and publishing are handled in the GitHub Actions workflows mechanism.
4446

45-
46-
.. # dae_devops_fingerprint d1782f75b785c0194b6666f894b338a6
47+
.. # dae_devops_fingerprint 0de9a3921a83123a68bb4be3333f3f18

.dae-devops/docs/docs_structure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. # ********** Please don't edit this file!
2-
.. # ********** It has been generated automatically by dae_devops version 0.5.2.
2+
.. # ********** It has been generated automatically by dae_devops version 0.5.3.
33
.. # ********** For repository_name chimpflow
44
55
About the documentation
@@ -21,4 +21,4 @@ improve most documentation - often immensely.
2121

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

24-
.. # dae_devops_fingerprint b2ecceb2057aa129a1ee55c76c58e867
24+
.. # dae_devops_fingerprint 5459e53455f7e8e1536898e915c8a69f

.dae-devops/docs/documenting.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. # ********** Please don't edit this file!
2+
.. # ********** It has been generated automatically by dae_devops version 0.5.3.
3+
.. # ********** For repository_name chimpflow
4+
5+
Documenting
6+
=======================================================================
7+
8+
If you plan to make update the documentation in this repository, you can use the steps below.
9+
10+
First, follow the steps in the Developing section to get a copy of the source code and install its dependencies.
11+
12+
If you didn't do this already, make sure you have the documentation tools::
13+
14+
$ cd <your development area>/chimpflow
15+
$ pip install -e .[docs]
16+
17+
To produce the documentation locally::
18+
19+
$ tox -q -e docs
20+
21+
This writes the html into local directory build/html. You can browse the local documentation by::
22+
23+
file:///<your development area>/chimpflow/build/html/index.html
24+
25+
When you push either the main branch or a tag to GitHub, the documents are built and published automatically to this url::
26+
27+
https://diamondlightsource.github.io/chimpflow/main/index.html
28+
29+
30+
.. # dae_devops_fingerprint 0f7a401b81e6dbbc63ac7fa42bc7cff2

.dae-devops/docs/installing.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
.. # ********** Please don't edit this file!
2-
.. # ********** It has been generated automatically by dae_devops version 0.5.2.
2+
.. # ********** It has been generated automatically by dae_devops version 0.5.3.
33
.. # ********** For repository_name chimpflow
44
55
Installing
66
=======================================================================
77

88

9-
You will need python 3.9 or later.
9+
You will need python 3.10 or later.
1010

11-
On a Diamond Light Source internal computer, you can achieve Python 3.9 by::
11+
On a Diamond Light Source internal computer, you can achieve Python 3.10 by::
1212

13-
$ module load python/3.9
13+
$ module load python/3.10
1414

1515
You can check your version of python by typing into a terminal::
1616

@@ -24,20 +24,19 @@ installation will not interfere with any existing Python software::
2424
$ pip install --upgrade pip
2525

2626

27-
You can now use ``pip`` to install the library and its dependencies::
27+
You can now use ``pip`` to install the package and its dependencies::
2828

29-
$ export PIP_FIND_LINKS=/dls_sw/apps/bxflow/artifacts
3029
$ python3 -m pip install chimpflow
3130

32-
If you require a feature that is not currently released you can also install
31+
If you require a feature that is not currently released, you can also install
3332
from git::
3433

3534
$ python3 -m pip install git+https://github.com/diamondlightsource/chimpflow/chimpflow.git
3635

37-
The library should now be installed and the commandline interface on your path.
36+
The package should now be installed and the command line should be available.
3837
You can check the version that has been installed by typing::
3938

4039
$ chimpflow --version
4140
$ chimpflow --version-json
4241

43-
.. # dae_devops_fingerprint f4209c13d354b457d8cc21ddf076df26
42+
.. # dae_devops_fingerprint 9eb5999388b437ecec6c6b841f3294ae

.dae-devops/docs/testing.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. # ********** Please don't edit this file!
2-
.. # ********** It has been generated automatically by dae_devops version 0.5.2.
2+
.. # ********** It has been generated automatically by dae_devops version 0.5.3.
33
.. # ********** For repository_name chimpflow
44
55
Testing
@@ -11,28 +11,24 @@ If you want to run the tests, first get a copy of the code per the instructions
1111

1212
Then you can run all tests by::
1313

14-
$ pytest
15-
16-
Or this, which is the command used by the CI runner.
17-
18-
$ make -f .dae-devops/Makefile validate_pytest
14+
$ tox -q -e pytest
1915

2016
To run a single test you can do::
2117

2218
$ pytest tests/the_test_you_want.py
2319

24-
If you want to see more output of the test while it's running you can do:
20+
If you want to see more output of the test while it's running you can do::
2521

2622
$ pytest -sv -ra --tb=line tests/the_test_you_want.py
2723

2824
Each test will write files into its own directory::
2925

30-
/tmp/chimpflow/tests/....
26+
/tmp/chimpflow/tests/*
3127

3228
The tests clear their directory when they start, but not when they finish.
33-
This allows peeking in there to see what's been written by the test.
29+
This allows you to examine what's been written by the test.
3430

3531

3632

3733

38-
.. # dae_devops_fingerprint 3787294ef4eef4f87161e07806f1f417
34+
.. # dae_devops_fingerprint e9f6ebe8b344e5282c25bc3ba9775f39

.dae-devops/prepare_git_dependencies.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
# ********** Please don't edit this file!
4-
# ********** It has been generated automatically by dae_devops version 0.5.2.
4+
# ********** It has been generated automatically by dae_devops version 0.5.3.
55
# ********** For repository_name chimpflow
66

77
me=${BASH_SOURCE}
@@ -13,4 +13,4 @@ function __install {
1313
}
1414

1515

16-
# dae_devops_fingerprint 74a0f47063a55760445b6dba99ef5c79
16+
# dae_devops_fingerprint 4f7c1d5ab550cf3cf74380bb5076d7ab

.dae-devops/project.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
primary:
33
repository_name: chimpflow
44
package_name: chimpflow_lib
5-
one_line_description: "XChem Business Knowledge Unit. Service, Client, API, persistent store."
5+
one_line_description: "Service which polls the database for subwell images which need to have the chimp detector run on them."
66
author:
77
name: David Erb
88
email: david.erb@diamond.ac.uk
@@ -21,4 +21,3 @@ primary:
2121
- dls_mainiac
2222
- dls_multiconf
2323
- dls_utilpack
24-
- requests

0 commit comments

Comments
 (0)