Although OpenAtlas is developed and tested to install on Linux (Debian to be precise) there are cases one might install it on a Windows system e.g. to try it out or for developing.
We don't recommend to use a Windows installation for a productive use but want to give some instruction how to go about nevertheless.
Keep in mind that these instructions are not maintained as regularly as the ones for the main environment Linux and might therefore not be entirely up to date.
You find a package list at requirements.txt the root of the OpenAtlas application which can be used, e.g. to install software with pip
Further you will need:To be able to install all required packages MV C++ 14.00 or greater is needed. You can get it via https://visualstudio.microsoft.com/visual-cpp-build-tools/ the name of the required package in the build tools is "MSVC... Buildtools" we tested it with "MSVC v143 - VS 2022 C++-x64/x86-Buildtools" but it might work with older versions as well.
The download link for the newest PostgreSQL Version Windows installer can be found on [[https://www.postgresql.org/download/windows/]] in the first line under "Download the installer".
Choose the appropriate version and use the installer to get PostgreSQL, during the process you can choose to use the stack builder tool to install additional extensions. Through this you can also easily obtain and install PostGIS, though there are other ways as well should you want to.
Change locale to en_US UTF-8 otherwise the export tests will fail.
PostgreSQL
Add C:\Program Files\PostgreSQL\13\bin to the Path variable at the environmental variables
7zip
Add C:\Program Files\7-Zip to the Path variable at the environmental variables
Download the newest version from https://imagemagick.org/script/download.php#windows and install it (https://docs.wand-py.org/en/0.6.10/guide/install.html#install-imagemagick-on-windows use this guide).
Important: Install the dll version, not the static one!
Restart your PC to make sure all PATH variables are successfully registered.
openatlas
)openatlas
OpenAtlas/Install/1_structure
OpenAtlas/Install/1_structure
Install
folderproduction.py
" & "testing.py
"¶This is used to set variables for the project configuration. You will find an example in the instance
folder.
example_production.py
in the same folder and rename it to production.py
DATABASE_PASS
to the password you have set, or want, for the OpenAtlas Database.testing.py
repeat the same steps but:
example_testing.py
instead of example_production.py
In the project root directory run the following command:
- pip install -r requirements.txt
Uncomment the lines following "# Used for testing" in "requirements.txt" then execute the following command:
- pip install -r requirements.txt
For test running:
In order to run the tests on Windows you'll need to delete thetests/__init__.py
and then run the command:
git update-index --skip-worktree .\tests\__init__.py
This will prevent your changes to tests/__init__.py
from being commited. For information on how or why this works please look at https://stackoverflow.com/a/14462290 and https://stackoverflow.com/a/13631525 respectively.
python3.9.exe -m nose --verbose --config=.noserc
If you encounter the error "./test_reference_system.py::ReferenceSystemTest::test_reference_system Failed with Error: 'file_upload_max_size'" during testing, you can try deleting all files in the "../files/uploads
" directory, except for ".gitignore". Sometimes, on Windows, images from previous tests may not be cleared, causing subsequent tests to fail.
If you have other files in the directory that you don't want to delete, the files uploaded by the tests are the OpenAtlas logo in both .jpeg and .png formats, as well as one .json file describing OpenAtlas. Removing these files should be sufficient.
Use PowerShell
Get scoop: https://scoop.sh/
OpenAtlas
scoop install git
scoop bucket add versions
scoop bucket add extras
scoop install python39 imagemagick nodejs
Collaboration
scoop install pycharm mattermost
Add a new tmp path to the testing.py where the user can write if /tmp not available, e.g.:
from pathlib import Path
TMP_DIR = Path('C:\\Users\\USERNAME')
Add
LOAD_WINDOWS_TEST_SQL = True
testing.py
to load the SQL for Windows. C:\iiif