Skip to content

Commit 631ddf8

Browse files
tg359Fraser Greenroyd
authored andcommitted
Implemented valid Invoke methods for versioning compliance
1 parent 2693688 commit 631ddf8

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

Python_Engine/Compute/Invoke.cs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* This file is part of the Buildings and Habitats object Model (BHoM)
3+
* Copyright (c) 2015 - 2022, the respective contributors. All rights reserved.
4+
*
5+
* Each contributor holds copyright over their respective contributions.
6+
* The project versioning (Git) records all such contribution source information.
7+
*
8+
*
9+
* The BHoM is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Lesser General Public License as published by
11+
* the Free Software Foundation, either version 3.0 of the License, or
12+
* (at your option) any later version.
13+
*
14+
* The BHoM is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public License
20+
* along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
21+
*/
22+
23+
using BH.oM.Base.Attributes;
24+
using Python.Runtime;
25+
using System.Collections.Generic;
26+
using System.Linq;
27+
28+
namespace BH.Engine.Python
29+
{
30+
public static partial class Compute
31+
{
32+
[ToBeRemoved("5.3", "This method included in order to fool versioning into playing nicely.")]
33+
public static PyObject Invoke(PyObject module, string method, Dictionary<string, object> args)
34+
{
35+
return module;
36+
}
37+
38+
[ToBeRemoved("5.3", "This method included in order to fool versioning into playing nicely.")]
39+
public static PyObject Invoke(PyObject module, string method, IEnumerable<object> args, Dictionary<string, object> kwargs)
40+
{
41+
return module;
42+
}
43+
}
44+
}

Python_Engine/Python_Engine.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
</ItemGroup>
6969
<ItemGroup>
7070
<Compile Include="Compute\DownloadPython.cs" />
71+
<Compile Include="Compute\Invoke.cs" />
7172
<Compile Include="Compute\RemoveVirtualenv.cs" />
7273
<Compile Include="Compute\InstallVirtualenv.cs" />
7374
<Compile Include="Compute\InstallReferencedVirtualenv.cs" />

0 commit comments

Comments
 (0)