Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci (compile and test in a GitHub action) #26

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
68d2f19
Add callable action to install and download sDNA
JamesParrott Feb 13, 2024
15784d0
Refactor test workflow into a separate callable workflow.
JamesParrott Feb 13, 2024
2d6afa8
Update diff_tests.yml
JamesParrott Feb 13, 2024
3bab605
Update .gitignore
JamesParrott Feb 13, 2024
a81daf6
Add caveat.
JamesParrott Feb 13, 2024
f1237a5
Update .gitignore
JamesParrott Feb 13, 2024
c00de10
Add in test code files from Run_tests_with_pytest branch
JamesParrott Feb 13, 2024
99cf082
Update paths
JamesParrott Feb 13, 2024
bb26076
Try LizardByte's Python 2 backport of setup-python-action
JamesParrott Feb 13, 2024
5a3741a
Fix input var typo. Test Python 2.7
JamesParrott Feb 13, 2024
bb6492e
Use env context, not workflow_call inputs
JamesParrott Feb 13, 2024
5ab4e43
Send matrix variable to called workfow input
JamesParrott Feb 13, 2024
63676af
Env schema is much simpler than inputs's
JamesParrott Feb 13, 2024
dda6803
Try: "Run the diff tests with Pytest"
JamesParrott Feb 13, 2024
86f7d56
Correct path
JamesParrott Feb 13, 2024
1163821
Replace is not "" with != "", to avoid SyntaxWarnings in the output t…
JamesParrott Feb 13, 2024
7ddb9c4
Include bug fixes to sDNA test code
JamesParrott Feb 13, 2024
b4630ce
workflow_call.inputs.type must be in (string, number, boolean)
JamesParrott Feb 13, 2024
53320cd
Test running debug_test.py directly
JamesParrott Feb 13, 2024
7e1f581
Try possible path to sDNA dll, and look in root with dir
JamesParrott Feb 13, 2024
d6e03e1
Look in d:\a\
JamesParrott Feb 13, 2024
4df5eeb
Update diff_tests.yml
JamesParrott Feb 13, 2024
cb6aea9
Update diff_tests.yml
JamesParrott Feb 13, 2024
859b5ac
Run test job after installing sDNA
JamesParrott Feb 13, 2024
aba98b7
Update diff_tests.yml
JamesParrott Feb 13, 2024
4ffdcb0
Update diff_tests.yml
JamesParrott Feb 13, 2024
dc06614
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 13, 2024
a9a3a4e
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 13, 2024
a54cb79
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 13, 2024
aff2664
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 13, 2024
b2f2307
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 13, 2024
5fa99a1
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 13, 2024
acd0f9d
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 13, 2024
196fc3d
Try Stack Overflow powershell .msi installation script
JamesParrott Feb 14, 2024
a359850
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 14, 2024
177eba7
Try Pytest again.
JamesParrott Feb 14, 2024
0432ca0
Don't use multiple run commands.
JamesParrott Feb 14, 2024
936aaa1
Checkout repo, install Python, deps, and run a test directly
JamesParrott Feb 14, 2024
b405554
Correct path to sDNA dll to c:\
JamesParrott Feb 14, 2024
4fd74ff
Look for dll path in called workflow
JamesParrott Feb 14, 2024
be42df4
Update test_an_msi_from_the_releases_page.yml
JamesParrott Feb 14, 2024
52bcbf3
Consolidate into single job in single workflow. State not persisted …
JamesParrott Feb 14, 2024
186474c
Matrix, not inputs
JamesParrott Feb 14, 2024
b06f895
Run test_gathering_windows_command_line_tests.py 0 directly, and diff…
JamesParrott Feb 14, 2024
69388e3
Run all the tests from Pytest
JamesParrott Feb 14, 2024
5a40fe6
Make tested and skipped lines counts correct
JamesParrott Feb 14, 2024
c6563c7
Support DONT_TEST_ONE_LINK_SUBSYSTEMS_ORDER, quoted sed commands and…
JamesParrott Feb 14, 2024
71447f3
Can pass with 10 / 10 on both Python 2 and 3. Correct constant name.…
JamesParrott Feb 14, 2024
7f50781
Run pytest in cmd, not powershell
JamesParrott Feb 14, 2024
d5caa62
Test ALL THE PYTHONS!
JamesParrott Feb 14, 2024
c62f68e
Test not quite ALL THE PYTHONS!!!
JamesParrott Feb 14, 2024
95dfc04
fail-fast: false
JamesParrott Feb 14, 2024
75ecd3e
Remove comments.
JamesParrott Feb 14, 2024
081ce17
Run on push to main branch, for PR into sDNA_plus parent project.
JamesParrott Feb 15, 2024
2c54e66
Specify encoding for Python 2 (utf8). (Unicode char in a comment)
JamesParrott Feb 15, 2024
350e436
Try to deflake prepare test, allow any order of 3-link subsytems
JamesParrott Feb 15, 2024
a51f0b9
Run on push to "Dont_test_order_of_n_link_subsytems"
JamesParrott Feb 15, 2024
0db7714
The prep test has been deflaked (n link subsystem order) but some tes…
JamesParrott Feb 15, 2024
8d63613
Don't let false positives pass (that didn't test any output lines)
JamesParrott Feb 15, 2024
7262e74
Update test_gathering_windows_command_line_tests.py
JamesParrott Feb 15, 2024
f97b2ad
Update test_gathering_windows_command_line_tests.py
JamesParrott Feb 16, 2024
b30e93d
Passes 10/10 on Python 2 .7 and 3.12 with pytest locally, as long as:
JamesParrott Feb 16, 2024
1444bdf
Merge pull request #12 from JamesParrott/Dont_test_order_of_n_link_su…
JamesParrott Feb 16, 2024
7fd69e9
Run on push to main branch, for sDNA parent project
JamesParrott Feb 17, 2024
30b8c3d
Add exception for mismatched dll and /bin. Copy in code from other b…
JamesParrott Feb 18, 2024
6f4a227
Run on push to main for sDNA. In error message, count line nums from…
JamesParrott Feb 18, 2024
9b0d34a
Merge pull request #13 from JamesParrott/Dont_test_repos_python_code_…
JamesParrott Feb 18, 2024
4a5dcb3
Create compile.yml
JamesParrott Feb 18, 2024
6d21267
Run on push to this branch (to test while developing on this branch)
JamesParrott Feb 18, 2024
c8a6fc0
Add placeholders back in to make /release folder
JamesParrott Feb 18, 2024
1b743f5
Bump actions/cache/restore and microsoft/setup-msbuild
JamesParrott Feb 18, 2024
2d28478
Test if sdna is a simple project, and if so, that simple projects rea…
JamesParrott Feb 18, 2024
84414e4
Make hardcoded paths (to ArcGIS Python 2.7 and advanced installer) cr…
JamesParrott Feb 18, 2024
4bfb074
Make rename_version.py Python 3 compatible, and specify file opener c…
JamesParrott Feb 18, 2024
35ee147
Update _parentdir.py
JamesParrott Feb 18, 2024
e038822
Support using Python 3 as the build Python. Fix regex.
JamesParrott Feb 18, 2024
11df288
Only upload the .msi. Bump upload-artifact to v4. Use os.path.join,…
JamesParrott Feb 18, 2024
9fc16f9
Bump cache restore and adv installer setup
JamesParrott Feb 18, 2024
fdc0179
Remove TODO comment, as it's now done. Re-organise exception raising.
JamesParrott Feb 19, 2024
7a1a761
Move the test running code into a reusable Action.
JamesParrott Feb 19, 2024
de99db2
Update test_sDNA_release.yml
JamesParrott Feb 19, 2024
48e95ea
Update test_sDNA_release.yml
JamesParrott Feb 19, 2024
1ed0c24
Test new workflow using regression tests Action, against all Python v…
JamesParrott Feb 19, 2024
4f26a74
Use env variables and output and hope
JamesParrott Feb 19, 2024
d6f44f4
Call the artifact installer_file. Don't run test release workflow on…
JamesParrott Feb 19, 2024
29070f7
Try hard coded .msi file name, nd no quoted whitespace in numpy versi…
JamesParrott Feb 19, 2024
661516c
Update compile_and_test.yml
JamesParrott Feb 19, 2024
a0c14c8
Update compile_and_test.yml
JamesParrott Feb 19, 2024
1910659
Don't read from log file
JamesParrott Feb 19, 2024
d0757f9
Update compile_and_test.yml
JamesParrott Feb 20, 2024
bccb103
Update compile_and_test.yml
JamesParrott Feb 20, 2024
72fc805
Try to pass installer file name as a job's output
JamesParrott Feb 20, 2024
eddd3b1
Try using job env to store installer file name
JamesParrott Feb 20, 2024
b995b42
Compile and test on Pythons 2.7, and 3.5 to 3.12
JamesParrott Feb 20, 2024
2a6b1f0
Update test_sDNA_release.yml
JamesParrott Feb 20, 2024
a0968c8
Run on push to get it in the actions menu
JamesParrott Feb 20, 2024
17710f9
Try 3.13.0-alpha.4 as is
JamesParrott Feb 20, 2024
18f32de
Support testing on Pythons 2.7, and 3.5 to 3.12 only
JamesParrott Feb 20, 2024
f4a1462
Run on CI_(Compile_and_test_in_a_Github_Action) for PR into that branch
JamesParrott Feb 20, 2024
8049ba2
Merge pull request #15 from JamesParrott/CI_refactor_tests_and_compil…
JamesParrott Feb 20, 2024
8403a07
geos_c.dll is now in source control, and copied in as a VS or AI buil…
JamesParrott Feb 20, 2024
7a0d597
Run CI on this branch
JamesParrott Feb 20, 2024
7b22ca2
Drop Python 3.13 until the dependencies for the tests can run on it.
JamesParrott Feb 20, 2024
d5a2129
Merge pull request #16 from JamesParrott/Test_if_Geos_binary_still_ne…
JamesParrott Feb 20, 2024
0a8002e
Run on this branch
JamesParrott Feb 20, 2024
dec3b34
Run on main, for PR into sDNA_plus proper. But comment out due to fl…
JamesParrott Feb 20, 2024
bc33265
Filter out mismatched link numbers of the first with a negative formu…
JamesParrott Mar 9, 2024
8a5a631
Test released .msi installer on push to this branch
JamesParrott Mar 9, 2024
db2d7e2
Specify the custom action's new input, in the calling workflows
JamesParrott Mar 9, 2024
65684c9
Compile and test on push to this branch.
JamesParrott Mar 9, 2024
bc6def0
Run on push or PR into main for PR into sdna_plus parent project.
JamesParrott Mar 9, 2024
6c21e55
Merge branch 'main' into CI_(Compile_and_test_in_a_Github_Action)
JamesParrott Mar 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .github/actions/run_regression_tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name:
Run the regression tests.

description:
Diff the output from the test steps, against correctout*.txt

inputs:
python_version:
required: false
default: "3.12"
description: 'The tests pass on Python 2.7 and Python 3.5, ..., 3.12'

shell:
required: false
default: cmd
description: The shell to run the test commands in, e.g. cmd, powershell, bash.

DONT_TEST_N_LINK_SUBSYSTEMS_ORDER:
required: true
description: "Non-empty string: In correctout_prep.txt, allow output lines of the form: -link subsystem contains link with id = , to be in any order. Empty string ('') : require the orders of the lines to match."

ALLOW_NEGATIVE_FORMULA_ERROR_ON_ANY_LINK_PRESENT:
required: true
description: "The negative formula is on all links, but the tests strictly require the first error to raised to be for the same link as in the original run. "

sdnadll:
description: 'The path to the sdna_vs2008.dll of the installation to be tested.'
required: true


sdna_bin_dir:
description: 'The path to the python entry point files (sdnaintegral.py) to be tested. Default: (dirname $sdnadll)/../bin/'
required: false
default: ''

sdna_debug:
description: "'' (empty string): filter out the lines in correctout*.txt that are only output by debug builds. Non-empty string: don't. "

runs:
using: "composite"
steps:
- uses: LizardByte/setup-python-action@master
with:
python-version: ${{ inputs.python_version }}

- name: Install Pytest, and Numpy (the latter for sDNA Learn & Predict).
shell: ${{ inputs.shell }}
working-directory: .\sDNA\sdna_vs2008\tests\pytest
run: pip install pytest numpy

- name: Show versions.
shell: ${{ inputs.shell }}
working-directory: '.\sDNA\sdna_vs2008\tests\pytest'
run: |
python --version
python -c "import numpy; print(numpy.__version__)"
python -m pytest --version


# - name: Run debug_test.py directly.
# shell: cmd
# working-directory: '.\sDNA\sdna_vs2008\tests'
# # run: python -u debug_test.py
# run: set "sdnadll=c:\Program Files (x86)\sDNA\x64\sdna_vs2008.dll" & python -u debug_test.py

# - name: Run diff test number 0 directly via
# test_gathering_windows_command_line_tests.py, by test index
# working-directory: '.\sDNA\sdna_vs2008\tests\pytest'
# run: python test_gathering_windows_command_line_tests.py 0

- name: Run all the diff tests with Pytest.
shell: ${{ inputs.shell }}
working-directory: .\sDNA\sdna_vs2008\tests\pytest
env:
DONT_TEST_N_LINK_SUBSYSTEMS_ORDER: ${{ inputs.DONT_TEST_N_LINK_SUBSYSTEMS_ORDER }}
ALLOW_NEGATIVE_FORMULA_ERROR_ON_ANY_LINK_PRESENT: ${{ inputs.ALLOW_NEGATIVE_FORMULA_ERROR_ON_ANY_LINK_PRESENT }}
sdnadll: ${{ inputs.sdnadll }}
sdna_bin_dir: ${{ inputs.sdna_bin_dir }}
sdna_debug: ${{ inputs.sdna_debug }}
run: pytest -rA
# -rA shows summary of tests, one per line, even when they all pass.
#
# To run the same tests locally, the command is something like:
# run: >
# set "sdnadll=c:\Program Files (x86)\sDNA\x64\sdna_vs2008.dll" &
# set "sdna_bin_dir=c:\Program Files (x86)\sDNA\bin" &
# set sdna_debug=False &
# set DONT_TEST_N_LINK_SUBSYSTEMS_ORDER=1 &
# set ALLOW_NEGATIVE_FORMULA_ERROR_ON_ANY_LINK_PRESENT=1 &
# pytest -rA
167 changes: 167 additions & 0 deletions .github/workflows/compile_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: "Compile with MSBuild and VS 2022 for Windows, and test"

on:
workflow_dispatch:

push:
branches: [ "main" ]

pull_request:
branches: [ "main" ]

env:
CONFIGURATION: Release
PLATFORM: x64
BOOST_VERSION: '1.8.3'


jobs:
build_and_upload_installer:
name: Try to compile on windows
runs-on: windows-2022
outputs:
installer_file_name: ${{ steps.output_installer_file_name.outputs.name }}
steps:
- uses: actions/checkout@v4




- name: 'Add "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\bin" to path'
shell: bash
run: echo "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\bin" >> $GITHUB_PATH

- name: Deploy Advinst
uses: caphyon/[email protected]
with:
advinst-version: '21.3'

# advinst-license: ${{ secrets.ADVINST_LICENSE_KEY }}
# " advinst-license
# Advanced Installer license ID. This parameter is optional if you are using a simple project type.
# "

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Integrate vcpkg with Visual Studio
run: vcpkg integrate install




- name: Restore vcpkg Deps
id: cache-vcpkg-deps-restore
uses: actions/cache/restore@v4
with:
path: |
C:\vcpkg\packages\
D:\a\sdna_plus\sdna_plus\vcpkg_installed\
key: ${{ runner.os }}-${{ hashFiles('vcpkg.json') }}

# Let vcpkg do its thing with the cache and don't skip this step
# if there is a cache hit. Vcpkg will detect pre existing files.
# that it previously installed.
- name: Install Boost from vcpkg.json
run: vcpkg install


- name: Cache vcpkg Deps
if: steps.cache-vcpkg-deps-restore.outputs.cache-hit != 'true'
id: cache-deps-save
uses: actions/cache/save@v4
with:
path: |
C:\vcpkg\packages\
D:\a\sdna_plus\sdna_plus\vcpkg_installed\
key: ${{ steps.cache-vcpkg-deps-restore.outputs.cache-primary-key }}


- name: Build sDNA
working-directory: ${{ github.workspace }}
run: >
msbuild build_installer.proj
/t:rebuild
/p:Platform=${{ env.PLATFORM }}
/p:Configuration=${{ env.CONFIGURATION }}
/p:VcpkgEnableManifest=true

- name: Output the name of the .msi installer file
id: output_installer_file_name
shell: bash
run: echo "name=$(ls sDNA_setup_win_v*.msi)" >> "$GITHUB_OUTPUT"

- name: upload output dir
id: installer-upload-step
uses: actions/upload-artifact@v4
with:
name: installer_file
# this file name pattern is defined in installerbits\rename_version.py
# outfilename = os.path.join(outputdir, "sDNA_setup_win_v%s.msi" % filename_friendly_version)
path: sDNA_setup_win_v*.msi



test_installer:

needs: build_and_upload_installer

strategy:
fail-fast: false
matrix:
python_version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

name: "Download and run sDNA installer, and run diff tests on it. "

runs-on: windows-2022
# Note: The Windows server 2022 Github runner image already includes
# Python (currently 6 versions from 3.7 to 3.12) and a couple of
# VC++ redistributables. Desktop users may need to install these
# themselves, in addition to sDNA.
#
# https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
#

env:
installer_file_name: ${{ needs.build_and_upload_installer.outputs.installer_file_name }}

steps:


- uses: actions/checkout@v4

- name: Download installer built in previous job
uses: actions/download-artifact@v4
with:
name: installer_file

- shell: cmd
run: dir .


- name: Allow the .msi to be executed
run: Set-ItemProperty -Path ${{ env.installer_file_name }} -Name IsReadOnly -Value $false


- name: Run sDNA installer using powershell script.
# This is based on @Simran-B's powershell script (from Github Community forum),
# according to GuiFalourd on Stack Overflow
# https://stackoverflow.com/a/72291019/20785734
run: |
$file = "${{ env.installer_file_name }}"
$log = "install.log"
$procMain = Start-Process "msiexec" "/i `"$file`" /qn /l*! `"$log`"" -NoNewWindow -PassThru
$procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru
$procMain.WaitForExit()
$procLog.Kill()
Remove-Item $file


- name: Run regression tests
uses: ./.github/actions/run_regression_tests
with:
python_version: ${{ matrix.python_version }}
DONT_TEST_N_LINK_SUBSYSTEMS_ORDER: 1
ALLOW_NEGATIVE_FORMULA_ERROR_ON_ANY_LINK_PRESENT: 1
sdnadll: 'c:\Program Files (x86)\sDNA\x64\sdna_vs2008.dll'
sdna_debug: ""
79 changes: 79 additions & 0 deletions .github/workflows/test_sDNA_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: test_a_released_sDNA_installer_(.msi)

on:
workflow_dispatch:



env:
VERSION: 4_1_1

DOWNLOAD_URL_PREFIX: https://sdna.cardiff.ac.uk/sdna/wp-content/downloads/sDNA_setup_win_v
# e.g.: https://sdna.cardiff.ac.uk/sdna/wp-content/downloads/sDNA_setup_win_v4_1_1.msi
# or: https://sdna.cardiff.ac.uk/sdna/wp-content/downloads/old%20versions/sDNA_setup_win_v3_4_5.msi



jobs:

download_install_and_test_sDNA_msi:

strategy:
fail-fast: false
matrix:
python_version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

# cannot install numpy on: ['3.13.0-alpha.4']
# https://github.com/JamesParrott/sdna_plus/issues/14

name: "Download and install a release of sDNA, and run diff tests on it. "

runs-on: windows-2022
# Note: The Windows server 2022 Github runner image already includes
# Python (currently 6 versions from 3.7 to 3.12) and a couple of
# VC++ redistributables. Desktop users may need to install these
# themselves, in addition to sDNA.
#
# https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
#
steps:


- uses: actions/checkout@v4


# - name: Download and install release of sDNA, then delete installer file.

# run: |
# Invoke-WebRequest ${{ env.DOWNLOAD_URL_PREFIX }}${{ env.VERSION }}.msi -OutFile sDNA_setup_win_v${{ env.VERSION }}.msi
#
# # This command is all that is required to successfully run the sDNA installer
# # on desktop Windows 11, silently. Sadly it is not also sufficient on
# # the Github Actions Windows runner image (I know not why):
# .\sDNA_setup_win_v${{ env.VERSION }}.msi /passive
#
# Remove-Item .\sDNA_setup_win_v${{ env.VERSION }}.msi

- name: Install sDNA using powershell script.
# This is @Simran-B's powershell script (from Github Community forum),
# according to GuiFalourd on Stack Overflow
# https://stackoverflow.com/a/72291019/20785734
run: |
$file = "sDNA_setup_win_v${{ env.VERSION }}.msi"
Invoke-WebRequest ${{ env.DOWNLOAD_URL_PREFIX }}${{ env.VERSION }}.msi -OutFile $file
$log = "install.log"
$procMain = Start-Process "msiexec" "/i `"$file`" /qn /l*! `"$log`"" -NoNewWindow -PassThru
$procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru
$procMain.WaitForExit()
$procLog.Kill()
Remove-Item $file

- name: Run regression tests
uses: ./.github/actions/run_regression_tests
with:
python_version: ${{ matrix.python_version }}
DONT_TEST_N_LINK_SUBSYSTEMS_ORDER: 1
ALLOW_NEGATIVE_FORMULA_ERROR_ON_ANY_LINK_PRESENT: 1
sdnadll: 'c:\Program Files (x86)\sDNA\x64\sdna_vs2008.dll'
sdna_debug: ""

9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ UpgradeLog*.htm
.vs
.vscode
vcpkg_installed
output/
*testout*
sDNA/sdna_vs2008/tests/**/odtest.*
sDNA/sdna_vs2008/tests/**/regtestresids_py3.*
sDNA/sdna_vs2008/tests/**/tinypred_py3.*
sDNA/sdna_vs2008/tests/**/geom_test_py3.txt
sDNA/sdna_vs2008/tests/**/regtestresids_py?.*
sDNA/sdna_vs2008/tests/**/tinypred_py?.*
sDNA/sdna_vs2008/tests/**/geom_test_py?.txt
sDNA/sdna_vs2008/tests/**/out_py?.*
sDNA/sdna_vs2008/tests/**/tinyout_*
2 changes: 1 addition & 1 deletion arcscripts/sdnapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class my_void_p(c_void_p):
__send_message_callback = None # for global issues only - there are other callbacks in constructor for Calculation()

def set_dll_path(path):
if path is not "":
if path != "":
global __sdna_dll_path
__sdna_dll_path = path

Expand Down
Empty file added output/release/placeholder.txt
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions sDNA/sdna_vs2008/tests/3d_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import print_function

import sys,arcscriptsdir
from sdnapy import *

Expand Down
2 changes: 2 additions & 0 deletions sDNA/sdna_vs2008/tests/benchmark_dll.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import print_function

import ctypes
import sys
import numpy
Expand Down
Loading
Loading