profile
viewpoint
Ian Mayo IanMayo Deep Blue C Portsmouth, UK http://www.DeepBlueC.com Software engineer focussed on tools used for analysis of exercises and trials in the maritime domain.

IanMayo/mustard 4

Mustard - the Open Source Sonar Super Simulator

IanMayo/ManagedFolders 3

Package of PowerShell scripts used to create and manage a set of MS Windows folders

billwiliams/Non_linear_regression 1

Non Linear regression in java

DeepBlueCLtd/lesco 1

Bulk analysis of ElasticSearch data

BarisSari/python-import-library 0

Python library to handle database ingest of geospatial track (and other) data

DeepBlueCLtd/narr-next 0

Browser-based interactive logging application

IanMayo/anglewrapdemo 0

This is an angle wrap demo with a modified XYLineAndShapeRenderer of JFreeChart

IanMayo/angular-hotkeys 0

Configuration-centric keyboard shortcuts for your Angular apps.

IanMayo/CitAHome 0

Home page for Kiosk display in CitA

push eventserge-web/serge

Ian Mayo

commit sha 00e780c1f275b99bda4ae7e7f4de6c3df9ff16fd

fix snapshot

view details

push time in a day

push eventserge-web/serge

Ian Mayo

commit sha bd3b2d966c0f6bacac96b0e8e74ffb8dd3feb0b8

Fix handler

view details

Ian Mayo

commit sha 3dea740352924ffea7974065f454a03e313c217b

naming handler

view details

push time in 2 days

push eventserge-web/serge

Ian Mayo

commit sha 4e3d50938603908575155f5c59aa18523e51532c

Linter fixes

view details

push time in 2 days

PR opened serge-web/serge

Refactor json editor

The current json editor knows too much about the structure of message objects.

Refactor the props, so we can pass in different types of data.

+119 -62

0 comment

8 changed files

pr created time in 2 days

issue openedserge-web/serge

Add `duplicate` button

💬 Brief description of feature

<!-- In a few words, what is this feature --> A Game Designer needs to repeat a number of messages from a past turn. These will be COA messages, and just need a new date.

📖 User Story

<!-- A description of the requirements in Gherkin format --> As a Game Designer I wish to be able to duplicate a message to save re-typing it.

In a Collab-Working channel, running in collab-edit mode, and if the current user has a release-manager permission, add a Duplicate button in the message header (near Mark as Read). When this is clicked, create a copy of the current message, strip out the _id and _reference fields, and add Copy to the Title, and then send it to the database.

☑️ Acceptance criteria

<!-- - A list of things that can be verified to show that this user story is satisfied. use markdown checklist format-->

  • [ ] Tests pass

📐 Designs / Wireframes

<!-- A link to a design file. If the design is very basic then a screenshot or wireframe/sketch is acceptable here. -->

📝 Notes

<!-- Any other information to include? -->

created time in 2 days

create barnchserge-web/serge

branch : refactor_json_editor

created branch time in 2 days

push eventdebrief/pepys-import

Robin Wilson

commit sha 3d2fc8b25a46aa22435302cb0a26f0a5bd24f9bb

Add MacOS installation guide

view details

Robin Wilson

commit sha ed749af29f27a1256fec24f842ff6d5ffde773bf

Update installation instructions

view details

Ian Mayo

commit sha 7630b638301f04e2a6a96a656db6f032ac16cd6d

Clarification on updating PATH

view details

Ian Mayo

commit sha 743a2c9f8e4f3b42d4c1680bf3dbfcffa2f30880

Correct usage of PATH

view details

Ian Mayo

commit sha d22f9752746d7b59d26840cc555a9182c58e7f43

Merge pull request #1091 from debrief/add-macos-installation-instructions Add MacOS developer setup guide

view details

push time in 2 days

delete branch debrief/pepys-import

delete branch : add-macos-installation-instructions

delete time in 2 days

PR merged debrief/pepys-import

Add MacOS developer setup guide

🧰 Issue

Fixes #925

🚀 Overview:

Adds MacOS developer setup guide

🤔 Reason:

Add guide for MacOS developers

🔨Work carried out:

  • [x] Update developer setup guide
  • [x] Tests pass

Confirmations

  • [x] I have chosen reviewers for my PR.
  • [x] I have chosen an appropriate label for the PR, adding interactive_review if reviewers will need to see UI
  • [x] I have extended/updated the documentation in \docs folder
  • [x] Any database content changes (Create, Edit, Delete) are recorded in the Log/Changes tables
  • [x] Any database schema changes are implemented via alembic revision transitions
  • [x] I have completed the mandatory sections of this document.
  • [x] I have deleted any unused sections.

📝 Developer Notes:

@IanMayo Could you test these instructions? They worked for me on a clean MacBook, but it is possible I've missed a step somewhere.

+25 -3

1 comment

2 changed files

robintw

pr closed time in 2 days

issue closeddebrief/pepys-import

Macos dev setup instructions

When @robintw originally wrote the developer setup notes he didn't have access to a MACOS device.

Now that he does, there would be value in completing the developer getting started instructions to cover MACOS development: https://github.com/debrief/pepys-import/blob/develop/DeveloperGuide.rst#mac-os-x

This is a low priority task.

closed time in 2 days

IanMayo
PullRequestReviewEvent

Pull request review commentdebrief/pepys-import

Add more tests for unknown platform handling

 def test_get_sensor_given_type(self):         assert sensor.sensor_type_name == "Radar"         assert sensor.host__name == "Test Name"         assert sensor.privacy_name == "Public"+++def test_unknown_platform_from_importer():+    class TestParser(Importer):+        def __init__(+            self,+            name="Test Importer",+            validation_level=constants.NONE_LEVEL,+            short_name="Test Importer",+            datafile_type="Test",+        ):+            super().__init__(name, validation_level, short_name, datafile_type)+            self.errors = list()++        def can_load_this_header(self, header) -> bool:+            return True++        def can_load_this_filename(self, filename):+            return True++        def can_load_this_type(self, suffix):+            return True++        def can_load_this_file(self, file_contents):+            return True++        def _load_this_file(self, data_store, path, file_object, datafile, change_id):+            self.test_platform = self.get_cached_platform(+                data_store, None, change_id=change_id, unknown=True+            )++    ds = DataStore("", "", "", 0, ":memory:", db_type="sqlite")+    ds.initialise()++    with ds.session_scope():+        ds.populate_reference()+        ds.populate_metadata()++    test_parser = TestParser()++    processor = FileProcessor()+    processor.register_importer(test_parser)++    with ds.session_scope():+        processor.process(SINGLE_REP_FILE, ds, False)+        ds.session.add(test_parser.test_platform)+        _ = uuid.UUID(test_parser.test_platform.name)+        assert test_parser.test_platform.platform_type_name == "Unknown"+        assert test_parser.test_platform.nationality_name == "Unknown"+++class UnknownPlatformsResolverTestCase(unittest.TestCase):+    def setUp(self):+        self.ds = DataStore(+            "", "", "", 0, ":memory:", db_type="sqlite", missing_data_resolver=CommandLineResolver()+        )+        self.ds.initialise()++        with self.ds.session_scope():+            self.ds.populate_reference()++        self.processor = FileProcessor()+        self.processor.load_importers_dynamically()++    @patch("pepys_import.file.file_processor.prompt")+    @patch("pepys_import.resolvers.command_line_input.prompt")+    @patch("pepys_import.resolvers.command_line_resolver.prompt")+    def test_answering_store_as_unknown(self, prompt, menu_prompt, processor_prompt):+        menu_prompt.side_effect = [+            "2",  # Public+            "1",  # Yes, correct+            "3",  # Store platform as Unknown+        ]++        processor_prompt.side_effect = ["2"]++        self.processor.process(SINGLE_NISIDA_FILE, data_store=self.ds)++        with self.ds.session_scope():+            # Should have imported the right number of State entries+            states = self.ds.session.query(self.ds.db_classes.State).all()+            assert len(states) == 5++            # The platform that has been imported should be marked as Unknown+            platforms = self.ds.session.query(self.ds.db_classes.Platform).all()+            assert len(platforms) == 1++            plat = platforms[0]++            assert plat.name == "ADRI"+            assert plat.platform_type_name == "Unknown"+            assert plat.nationality_name == "Unknown"++    @patch("pepys_import.file.file_processor.prompt")+    @patch("pepys_import.resolvers.command_line_input.prompt")+    @patch("pepys_import.resolvers.command_line_resolver.prompt")+    def test_answering_store_remaining_as_unknown(self, prompt, menu_prompt, processor_prompt):+        menu_prompt.side_effect = [+            "2",  # Public+            "1",  # Yes, correct+            "4",  # Store remaining platforms as Unknown+        ]++        processor_prompt.side_effect = ["2"]++        self.processor.process(SINGLE_REP_FILE, data_store=self.ds)++        with self.ds.session_scope():+            # Should have imported the right number of State entries+            states = self.ds.session.query(self.ds.db_classes.State).all()+            assert len(states) == 8++            # The platforms that have been imported should be marked as Unknown+            platforms = self.ds.session.query(self.ds.db_classes.Platform).all()+            assert len(platforms) == 3++            for plat in platforms:+                # Check platform name is NOT a UUID+                with pytest.raises(ValueError):+                    _ = uuid.UUID(plat.name)+                assert plat.platform_type_name == "Unknown"+                assert plat.nationality_name == "Unknown"++    @patch("pepys_import.file.file_processor.prompt")+    @patch("pepys_import.resolvers.command_line_input.prompt")+    @patch("pepys_import.resolvers.command_line_resolver.prompt")+    def test_answering_store_remaining_as_unknown_multiple_files(+        self, prompt, menu_prompt, processor_prompt

Same again with this use of prompt

robintw

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentdebrief/pepys-import

Add more tests for unknown platform handling

 def test_get_sensor_given_type(self):         assert sensor.sensor_type_name == "Radar"         assert sensor.host__name == "Test Name"         assert sensor.privacy_name == "Public"+++def test_unknown_platform_from_importer():+    class TestParser(Importer):+        def __init__(+            self,+            name="Test Importer",+            validation_level=constants.NONE_LEVEL,+            short_name="Test Importer",+            datafile_type="Test",+        ):+            super().__init__(name, validation_level, short_name, datafile_type)+            self.errors = list()++        def can_load_this_header(self, header) -> bool:+            return True++        def can_load_this_filename(self, filename):+            return True++        def can_load_this_type(self, suffix):+            return True++        def can_load_this_file(self, file_contents):+            return True++        def _load_this_file(self, data_store, path, file_object, datafile, change_id):+            self.test_platform = self.get_cached_platform(+                data_store, None, change_id=change_id, unknown=True+            )++    ds = DataStore("", "", "", 0, ":memory:", db_type="sqlite")+    ds.initialise()++    with ds.session_scope():+        ds.populate_reference()+        ds.populate_metadata()++    test_parser = TestParser()++    processor = FileProcessor()+    processor.register_importer(test_parser)++    with ds.session_scope():+        processor.process(SINGLE_REP_FILE, ds, False)+        ds.session.add(test_parser.test_platform)+        _ = uuid.UUID(test_parser.test_platform.name)+        assert test_parser.test_platform.platform_type_name == "Unknown"+        assert test_parser.test_platform.nationality_name == "Unknown"+++class UnknownPlatformsResolverTestCase(unittest.TestCase):+    def setUp(self):+        self.ds = DataStore(+            "", "", "", 0, ":memory:", db_type="sqlite", missing_data_resolver=CommandLineResolver()+        )+        self.ds.initialise()++        with self.ds.session_scope():+            self.ds.populate_reference()++        self.processor = FileProcessor()+        self.processor.load_importers_dynamically()++    @patch("pepys_import.file.file_processor.prompt")+    @patch("pepys_import.resolvers.command_line_input.prompt")+    @patch("pepys_import.resolvers.command_line_resolver.prompt")+    def test_answering_store_as_unknown(self, prompt, menu_prompt, processor_prompt):+        menu_prompt.side_effect = [+            "2",  # Public+            "1",  # Yes, correct+            "3",  # Store platform as Unknown+        ]++        processor_prompt.side_effect = ["2"]++        self.processor.process(SINGLE_NISIDA_FILE, data_store=self.ds)++        with self.ds.session_scope():+            # Should have imported the right number of State entries+            states = self.ds.session.query(self.ds.db_classes.State).all()+            assert len(states) == 5++            # The platform that has been imported should be marked as Unknown+            platforms = self.ds.session.query(self.ds.db_classes.Platform).all()+            assert len(platforms) == 1++            plat = platforms[0]++            assert plat.name == "ADRI"+            assert plat.platform_type_name == "Unknown"+            assert plat.nationality_name == "Unknown"++    @patch("pepys_import.file.file_processor.prompt")+    @patch("pepys_import.resolvers.command_line_input.prompt")+    @patch("pepys_import.resolvers.command_line_resolver.prompt")+    def test_answering_store_remaining_as_unknown(self, prompt, menu_prompt, processor_prompt):

the linter is saying prompt is unused. It is unused, but is it still a necessary import?

robintw

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentdebrief/pepys-import

Add more tests for unknown platform handling

 def test_get_sensor_given_type(self):         assert sensor.sensor_type_name == "Radar"         assert sensor.host__name == "Test Name"         assert sensor.privacy_name == "Public"+++def test_unknown_platform_from_importer():+    class TestParser(Importer):+        def __init__(+            self,+            name="Test Importer",+            validation_level=constants.NONE_LEVEL,+            short_name="Test Importer",+            datafile_type="Test",+        ):+            super().__init__(name, validation_level, short_name, datafile_type)+            self.errors = list()++        def can_load_this_header(self, header) -> bool:+            return True++        def can_load_this_filename(self, filename):+            return True++        def can_load_this_type(self, suffix):+            return True++        def can_load_this_file(self, file_contents):+            return True++        def _load_this_file(self, data_store, path, file_object, datafile, change_id):+            self.test_platform = self.get_cached_platform(+                data_store, None, change_id=change_id, unknown=True+            )++    ds = DataStore("", "", "", 0, ":memory:", db_type="sqlite")+    ds.initialise()++    with ds.session_scope():+        ds.populate_reference()+        ds.populate_metadata()++    test_parser = TestParser()++    processor = FileProcessor()+    processor.register_importer(test_parser)++    with ds.session_scope():+        processor.process(SINGLE_REP_FILE, ds, False)+        ds.session.add(test_parser.test_platform)+        _ = uuid.UUID(test_parser.test_platform.name)+        assert test_parser.test_platform.platform_type_name == "Unknown"+        assert test_parser.test_platform.nationality_name == "Unknown"+++class UnknownPlatformsResolverTestCase(unittest.TestCase):+    def setUp(self):+        self.ds = DataStore(+            "", "", "", 0, ":memory:", db_type="sqlite", missing_data_resolver=CommandLineResolver()+        )+        self.ds.initialise()++        with self.ds.session_scope():+            self.ds.populate_reference()++        self.processor = FileProcessor()+        self.processor.load_importers_dynamically()++    @patch("pepys_import.file.file_processor.prompt")+    @patch("pepys_import.resolvers.command_line_input.prompt")+    @patch("pepys_import.resolvers.command_line_resolver.prompt")+    def test_answering_store_as_unknown(self, prompt, menu_prompt, processor_prompt):

@robintw - the linter is saying prompt is unused. It is unused, but is it still a necessary import?

robintw

comment created time in 2 days

PullRequestReviewEvent

push eventdebrief/pepys-import

Ian Mayo

commit sha 743a2c9f8e4f3b42d4c1680bf3dbfcffa2f30880

Correct usage of PATH

view details

push time in 2 days

Pull request review commentdebrief/pepys-import

Compare version with network version on launch, and add Update Pepys option

 Flask Flask-CacheBuster flask-cors waitress-lxml\ No newline at end of file+lxml+packaging

hey @robintw - packaging was a good find :-)

robintw

comment created time in 2 days

PullRequestReviewEvent

push eventdebrief/pepys-import

Ian Mayo

commit sha 7630b638301f04e2a6a96a656db6f032ac16cd6d

Clarification on updating PATH

view details

push time in 2 days

push eventIanMayo/PostgresApp

Ian Mayo

commit sha 17bd2c3cf0a0517ef0a397ae5c8e38beafcc8950

Expand message highlighting need to go into `Applications` folder.

view details

push time in 3 days

fork IanMayo/PostgresApp

The easiest way to get started with PostgreSQL on the Mac

https://postgresapp.com

fork in 3 days

issue commentPostgresApp/PostgresApp

latest version crashes on startup

Yes, @jakob - that's a valid long term goal.

In the near term, however, it could avoid making a poor first impression if users knew the installation constraint.

hobbyman

comment created time in 3 days

issue commentPostgresApp/PostgresApp

latest version crashes on startup

@jakob - I also suffered from this problem. Is it worth documenting the requirement for Postgres.app to go in the root of Applications on the Downloads page?

hobbyman

comment created time in 3 days

push eventserge-web/serge

Ian Mayo

commit sha 06f5a7989bfc041317d10151333dfa89e32f49a4

Progress

view details

Ian Mayo

commit sha 8e29df247955fc98ab3a7cfa885912a60694de81

More progress

view details

Ian Mayo

commit sha 960956e07cce3ff05197587d4e69d2ea9bfefc05

More progress

view details

Ian Mayo

commit sha 5f868cdf06b8000c74bc911e2d35411fcad8d14d

tidying

view details

Ian Mayo

commit sha f3da497abe18844ff012e8e489f944179853d830

Introduce new collab states for v3

view details

Ian Mayo

commit sha d77bd337e4851fe9d8c91a0df6625ce312ccf718

partially working

view details

Ian Mayo

commit sha c169d6d42c7ee5cf4d8b0fc822a70988a6264310

Working

view details

Ian Mayo

commit sha 3a611d9db98e1d4e4d3ef02ec0c7834b9ea94bfd

extract handlers

view details

Ian Mayo

commit sha ac9260ceb137347d59467771cb0ce264646d7e00

Remove debug line

view details

Ian Mayo

commit sha 87c844d9bb01ed5929897f22308b8b4f9eb4913a

More implementation

view details

Ian Mayo

commit sha 7f7b7e94d11a7c01af2ec714524beedd3cfd3833

More progress

view details

Ian Mayo

commit sha 72b0b193be12658ce184e33c7db53dfbd114bf82

Provide handler for missing state (closed)

view details

Ian Mayo

commit sha 20df71b529dd7e672ef2f4f3a8be94de617c2074

porgress

view details

Ian Mayo

commit sha e4afb79e4b4a3e5f46fb3512de88559a325c27c8

Tidy sample data

view details

Ian Mayo

commit sha 2fdb8d896f7ae1e2ed515da038db9c02785c8410

Introduce flag for feedback required

view details

Ian Mayo

commit sha 51f493242a8607942840e084556aecd1873d9bcd

Remove unused import

view details

Ian Mayo

commit sha e02126b1177d2d30dfe6057a3b0c535eb4984879

Linting

view details

Ian Mayo

commit sha 6683e2a4695c205d4fcc4d49eb603eaa1e19fb1b

Update snapshot

view details

Ian Mayo

commit sha 1e2f8ad7016fe3b8a7d32a7e372d1ed9e4f8e750

Don't let force collaborate in this channel

view details

Ian Mayo

commit sha b3787c099badbfad138ce38a21c35720864be9a9

Improve tests

view details

push time in 3 days

PullRequestReviewEvent

Pull request review commentdebrief/pepys-import

Add MacOS developer setup guide

 Run the following command:: Mac OS X ^^^^^^^^ -**Note:** These instructions are not complete due to not having a bare OS X machine to test on. However,-they should give you some hints as to how to get an OS X machine set up to develop pepys-import.+The easiest way to get the relevant libraries working on a M1 MacOS machine is to use the conda Python package manager which will install from the+packages provided by conda-forge. This is different to the standard pip/virtualenv process, but works quite nicely alongside it.+The conda package manager can be quite slow, so the instructions show how to install mamba instead, which is a faster fork. -**TODO - Complete instructions here**+These instructions are for Macs with a M1 (ARM) processor. A similar approach will work for x86 (Intel) Macs, but you will need+to ensure that you install the Intel version of miniconda.++1. Install the ARM version of mambaforge, which is available `here <https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-arm64.sh>`_, following all the instructions to the end (including setting up integration with your shell)++2. Create a new environment (like conda's equivalent of a virtualenv) by running: ``mamba create -n pepys python=3.9 libspatialite``. This will+   install Python 3.9 and libspatialite in a new environment called ``pepys``.++3. Activate the environment by running ``mamba activate pepys``++4. Install the other Pepys dependencies by running ``pip install -r requirements.txt -r requirements_dev.txt``

This step requires pg_config. We don't install postgres.app until later on. Did you have another pg_config present?

Otherwise, I think we need to install postgres.app, include a step put contents\latest\bin on the path, then install the dependencies.

robintw

comment created time in 3 days

PullRequestReviewEvent

Pull request review commentdebrief/pepys-import

Add MacOS developer setup guide

 Run the following command:: Mac OS X ^^^^^^^^ -**Note:** These instructions are not complete due to not having a bare OS X machine to test on. However,-they should give you some hints as to how to get an OS X machine set up to develop pepys-import.+The easiest way to get the relevant libraries working on a M1 MacOS machine is to use the conda Python package manager which will install from the+packages provided by conda-forge. This is different to the standard pip/virtualenv process, but works quite nicely alongside it.+The conda package manager can be quite slow, so the instructions show how to install mamba instead, which is a faster fork. -**TODO - Complete instructions here**+These instructions are for Macs with a M1 (ARM) processor. A similar approach will work for x86 (Intel) Macs, but you will need+to ensure that you install the Intel version of miniconda.++1. Install the ARM version of mambaforge, which is available `here <https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-arm64.sh>`_, following all the instructions to the end (including setting up integration with your shell)+

@robintw - I've can see the instructions here: https://github.com/conda-forge/miniforge/

But, I don't see the instructions about integrating with the shell. Aah, the instructions in the installer, I guess.

robintw

comment created time in 3 days

more