• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HicServices / RDMP / 9988321408

18 Jul 2024 08:39AM UTC coverage: 57.299% (+0.6%) from 56.679%
9988321408

push

github

web-flow
marge develop into main (#1890)

* add cron test

* fix yaml

* fix yaml

* update spacing

* use example

* update cron

* update to push

* add 2am cron

* update yaml

* use utc

* add first update

* add populate function

* add changelog

* update tests

* fix test

* attempt to fix test

* interim

* interim

* add label

* add description field

* add vertical scaling

* working UI

* add tooltips

* working ui

* add to cignorelist

* add changelog entry

* tidy up

* fix typo

* fix codeql

* Task/rdmp-1  Update Ticketing System (#1870)

* add initial ticketing update

* fix patch

* interim

* allow blanks

* pass statuses around

* update tests

* add image

* add resources

* tidy up

* tidy up

* fix build

* add icon

* add image

* fix test

* add changelog

* fix error not poping

* add missing line

* fix typo

* tidy up

* Bump ObjectListView.Repack.NET6Plus from 2.9.4 to 2.9.5

Bumps ObjectListView.Repack.NET6Plus from 2.9.4 to 2.9.5.

---
updated-dependencies:
- dependency-name: ObjectListView.Repack.NET6Plus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Terminal.Gui from 1.17.0 to 1.17.1 (#1879)

Bumps Terminal.Gui from 1.17.0 to 1.17.1.

---
updated-dependencies:
- dependency-name: Terminal.Gui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/setup-dotnet from 4.0.0 to 4.0.1 (#1875)

Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.0.0...v4.0.1)

---... (continued)

11072 of 20790 branches covered (53.26%)

Branch coverage included in aggregate %.

49 of 83 new or added lines in 17 files covered. (59.04%)

45 existing lines in 12 files now uncovered.

31313 of 53181 relevant lines covered (58.88%)

7890.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

67.57
/Rdmp.Core/DataLoad/Engine/LoadExecution/Components/LoadFiles.cs
1
// Copyright (c) The University of Dundee 2018-2019
2
// This file is part of the Research Data Management Platform (RDMP).
3
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.
6

7
using System.Collections.Generic;
8
using System.Linq;
9
using Rdmp.Core.Curation;
10
using Rdmp.Core.DataFlowPipeline;
11
using Rdmp.Core.DataLoad.Engine.Job;
12
using Rdmp.Core.DataLoad.Engine.LoadExecution.Components.Runtime;
13
using Rdmp.Core.ReusableLibraryCode.Progress;
14

15
namespace Rdmp.Core.DataLoad.Engine.LoadExecution.Components;
16

17
/// <summary>
18
/// DLE component responsible for the LoadStage.GetFiles.  This includes running any user configured ProcessTask (which will be RuntimeTasks in _components).
19
/// Also pushes DeleteForLoadingFilesOperation onto the disposal stack so that any files accumulated in ForLoading are cleared at the end of the DLE run (After
20
/// archiving).
21
/// </summary>
22
public class LoadFiles : CompositeDataLoadComponent
23
{
24
    public LoadFiles(List<IRuntimeTask> collection) : base(collection.Cast<IDataLoadComponent>().ToList())
46✔
25
    {
26
        Description = Description = "LoadFiles";
46✔
27
    }
46✔
28

29
    public override ExitCodeType Run(IDataLoadJob job, GracefulCancellationToken cancellationToken)
30
    {
31
        if (Skip(job))
46!
32
            return ExitCodeType.Error;
×
33

34
        var
46✔
35
            toReturn = ExitCodeType
46✔
36
                .Success; //This default will be returned unless there is an explicit DataProvider or collection of runtime tasks to run which return a different result (See below)
46✔
37

38
        // Figure out where we are getting the source files from
39
        try
40
        {
41
            if (Components.Any())
46✔
42
                toReturn = base.Run(job, cancellationToken);
2✔
43
            else
44
            {
45
                if (!((LoadDirectory)job.LoadDirectory).AllSubdirectoriesExist())
44!
46
                {
NEW
47
                    job.OnNotify(this, new NotifyEventArgs(ProgressEventType.Error,
×
NEW
48
                            $"One or more of the Load Metadata directories does not exist. Check the following locations exits: {string.Join(", ", [job.LoadDirectory.ForLoading.FullName, job.LoadDirectory.ForArchiving.FullName, job.LoadDirectory.Cache.FullName, job.LoadDirectory.ExecutablesPath.FullName])}"));
×
NEW
49
                    return ExitCodeType.Error;
×
50
                }
51
                else if (job.LoadDirectory.ForLoading.EnumerateFileSystemInfos().Any())
44✔
52
                    job.OnNotify(this, new NotifyEventArgs(ProgressEventType.Information,
42✔
53
                        $"Using existing files in '{job.LoadDirectory.ForLoading.FullName}', there are no GetFiles processes or DataProviders configured"));
42✔
54
                else
55
                    job.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning,
2✔
56
                        $"There are no GetFiles tasks and there are no files in the ForLoading directory ({job.LoadDirectory.ForLoading.FullName})"));
2✔
57
            }
58

59
        }
2✔
60
        finally
61
        {
62
            // We can only clean up ForLoading after the job is finished, so give it the necessary disposal operation
63
            job.PushForDisposal(new DeleteForLoadingFilesOperation(job));
46✔
64
        }
46✔
65

66
        return toReturn;
46✔
UNCOV
67
    }
×
68

69
    public void DeleteAllFilesInForLoading(LoadDirectory directory, DataLoadJob job)
70
    {
71
        job.OnNotify(this, new NotifyEventArgs(ProgressEventType.Information,
×
72
            $"Deleting files in ForLoading ({directory.ForLoading.FullName})"));
×
73
        directory.ForLoading.EnumerateFiles().ToList().ForEach(info => info.Delete());
×
74
        directory.ForLoading.EnumerateDirectories().ToList().ForEach(info => info.Delete(true));
×
75
    }
×
76
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc