Installation Guide#
This guide provides step-by-step instructions to install ACCERT on Windows, macOS, and Linux systems. Please ensure you have administrative privileges on your device, as some steps require it.
Prerequisites#
Git: Ensure Git is installed on your system.
Download from Git - Downloads if not already installed.
Verify installation by typing
gitin your terminal; if commands appear, Git is installed.
Python Coding Environment: While not required, using an IDE like Visual Studio Code is recommended.
MySQL Community Server: Required for database functionalities.
NEAMS Workbench: Necessary for integrating ACCERT with the Workbench interface.
Installation Instructions#
Choose your operating system to proceed with the installation:
Installation on Windows#
For certain aspects of this process, you will need administrative privileges.
Cloning ACCERT#
Create a Directory for ACCERT:
Open your file explorer and create a folder where you want to install ACCERT (e.g.,
CODE).
Open Git Bash or Terminal:
Navigate to the directory you just created.
Clone the ACCERT Repository:
$ cd /path/to/CODE $ git clone https://github.com/accert-dev/ACCERT.git $ cd ACCERT
Replace
/path/to/CODEwith the actual path to yourCODEdirectory.
Verify Cloning:
Ensure the ACCERT folder contains files similar to the ACCERT Git repository.
Install MySQL Community Server#
Download MySQL:
Visit MySQL Community Server and download the recommended version for Windows.
Install MySQL:
Follow the installation prompts, selecting the Developer Default setup when available.
Important
During installation, you will be prompted to create a root password for MySQL. Keep this password secure and accessible; resetting it can be time-consuming and difficult.
Install NEAMS Workbench#
Download NEAMS Workbench:
Go to NEAMS Workbench Downloads.
Download the .exe file for Windows.
Run the Installer:
Execute the downloaded file and follow the installation instructions.
Note: Your system may flag the installer as unsafe. The file is safe; proceed by selecting the option to keep or run the file.
Launch NEAMS Workbench:
Open the Workbench application before proceeding to the next steps.
Setting Up ACCERT#
Navigate to the `src` Directory:
$ cd src
Edit the `workbench.sh` File:
Open workbench.sh in your Python coding application.
Set the workbench_path variable to point to your NEAMS Workbench installation directory. - For example:
workbench_path="C:/Path/To/Workbench-<version-number>" - Replace `<version-number>` with the actual version number (e.g., `Workbench-5.3.1`). - **Ensure there are no spaces in the folder path**, as this may cause issues.
Save the file.
Run the Setup Script:
Open a terminal in the src directory.
Execute the setup script:
$ ./setup_accert.shNote: If you encounter issues running the script, ensure that Git Bash or a Unix-compatible terminal is used.
Copy Executables to ACCERT `bin` Directory:
Manually create a bin directory inside your ACCERT folder if it doesn’t exist.
Navigate to the bin folder inside your NEAMS Workbench installation.
Copy sonvalidxml from the Workbench bin folder to the ACCERT/bin folder.
Create and Edit install.conf#
Create `install.conf`:
In the src directory, create a new file named install.conf.
Add the Following Content:
[INSTALL] PASSWD = yourpassword # NOTE: ALL OTHER information should be set up later # INSTALL_PATH = /usr/local # DATADIR = /mysql/data # INSTALL_PACKAGE = # EXP_DIR =
Replace
yourpasswordwith your MySQL root password.Save the file with the exact name install.conf.
Ensure file extensions are visible: - In File Explorer, go to View > Show > File name extensions. - Verify that the file is not saved as install.conf.txt.
Install database#
Navigate to ACCERT/src folder: - type “cmd” in the address bar of the file explorer and press enter.
$ mysql -h localhost -u root -p
Enter your MySQL root password when prompted.
Run the following command to create the ACCERT database:
mysql> source accertdb.sql
Verify that the database has been created by running the following command:
mysql> show databases;
You should see accert_db in the list of databases. Then exit the MySQL shell by typing:
mysql> \q
Installation on macOS#
For certain aspects of this process, you will need administrative privileges.
Cloning ACCERT#
Create a Directory for ACCERT:
Open your file explorer and create a folder where you want to install ACCERT (e.g.,
CODE).
Open Git Bash or Terminal:
Navigate to the directory you just created.
Clone the ACCERT Repository:
$ cd /path/to/CODE $ git clone https://github.com/accert-dev/ACCERT.git $ cd ACCERT
Replace
/path/to/CODEwith the actual path to yourCODEdirectory.
Verify Cloning:
Ensure the ACCERT folder contains files similar to the ACCERT Git repository.
Install MySQL Community Server#
Download MySQL:
Visit MySQL Community Server and download the recommended version for macOS.
Install MySQL:
Follow the installation prompts, selecting the Developer Default setup when available.
Remember to keep your MySQL root password secure.
Install NEAMS Workbench#
Download NEAMS Workbench:
Go to NEAMS Workbench Downloads.
Download the .dmg file for macOS.
Run the Installer:
Open the downloaded .dmg file and follow the installation instructions.
Note: Your system may flag the installer as unsafe. The file is safe; proceed accordingly.
Launch NEAMS Workbench:
Open the Workbench application before proceeding to the next steps.
Setting Up ACCERT#
Navigate to the `src` Directory:
$ cd src
Edit the `workbench.sh` File:
Open workbench.sh in your Python coding application.
Set the workbench_path variable to point to your NEAMS Workbench installation directory:
workbench_path="/Applications/Workbench-<version-number>.app/Contents"
Replace <version-number> with the actual version number (e.g., Workbench-5.3.1).
Save the file.
Run the Setup Script:
Make the setup script executable:
$ chmod +x setup_accert.sh
Execute the setup script:
$ ./setup_accert.sh
Create and Edit install.conf#
Create `install.conf`:
In the src directory, create a new file named install.conf.
Add the Following Content:
[INSTALL] PASSWD = yourpassword # NOTE: ALL OTHER information should be set up later # INSTALL_PATH = /usr/local # DATADIR = /mysql/data # INSTALL_PACKAGE = # EXP_DIR =
Replace
yourpasswordwith your MySQL root password.Save the file with the exact name install.conf.
Ensure file extensions are visible: - In File Explorer, go to View > Show > File name extensions. - Verify that the file is not saved as install.conf.txt.
Install database#
** connect to MySQL**: .. code-block:: shell
$ mysql -h localhost -u root -p
Enter your MySQL root password when prompted.
Run the following command to create the ACCERT database:
mysql> source accertdb.sql
Verify that the database has been created by running the following command:
mysql> show databases;
You should see accert_db in the list of databases. Then exit the MySQL shell by typing:
mysql> \q
Installation on Linux#
For certain aspects of this process, you will need administrative privileges.
Cloning ACCERT#
Create a Directory for ACCERT:
Open your file explorer and create a folder where you want to install ACCERT (e.g.,
CODE).
Open Git Bash or Terminal:
Navigate to the directory you just created.
Clone the ACCERT Repository:
$ cd /path/to/CODE $ git clone https://github.com/accert-dev/ACCERT.git $ cd ACCERT
Replace
/path/to/CODEwith the actual path to yourCODEdirectory.
Verify Cloning:
Ensure the ACCERT folder contains files similar to the ACCERT Git repository.
Install MySQL Community Server#
Download and Install MySQL:
Install MySQL using your distribution’s package manager, or download it from MySQL Community Server.
# For Debian/Ubuntu $ sudo apt-get update $ sudo apt-get install mysql-server # For CentOS/RHEL $ sudo yum install mysql-server
Secure MySQL Installation:
$ sudo mysql_secure_installation
Set the root password and follow the prompts.
Install NEAMS Workbench#
Download NEAMS Workbench:
Go to NEAMS Workbench Downloads.
Download the .tar.gz file for Linux.
Extract and Install:
$ tar -xzvf Workbench-<version-number>.tar.gz $ cd Workbench-<version-number>
Run the Installer:
Follow any additional installation instructions provided.
Launch NEAMS Workbench:
Run the Workbench application before proceeding to the next steps.
Setting Up ACCERT#
Navigate to the `src` Directory:
$ cd src
Edit the `workbench.sh` File:
Open workbench.sh in your Python coding application.
Set the workbench_path variable to point to your NEAMS Workbench installation directory:
workbench_path="/path/to/Workbench-<version-number>"
Replace <version-number> with the actual version number.
Save the file.
Run the Setup Script:
Make the setup script executable:
$ chmod +x setup_accert.sh
Execute the setup script:
$ ./setup_accert.sh
Create and Edit install.conf#
Create `install.conf`:
In the src directory, create a new file named install.conf.
Add the Following Content:
[INSTALL] PASSWD = yourpassword # NOTE: ALL OTHER information should be set up later # INSTALL_PATH = /usr/local # DATADIR = /mysql/data # INSTALL_PACKAGE = # EXP_DIR =
Replace
yourpasswordwith your MySQL root password.Save the file with the exact name install.conf.
Install database#
** connect to MySQL**: .. code-block:: shell
$ mysql -h localhost -u root -p
Enter your MySQL root password when prompted.
Run the following command to create the ACCERT database:
mysql> source accertdb.sql
Verify that the database has been created by running the following command:
mysql> show databases;
You should see accert_db in the list of databases. Then exit the MySQL shell by typing:
mysql> \q
Testing the Installation#
Navigate to the Test Directory:
$ cd ../test
Run Tests Using Pytest:
$ pytestThis will run the test suite to verify that ACCERT is installed correctly.
Configuration with NEAMS Workbench#
Open NEAMS Workbench.
Add ACCERT Configuration:
Go to Workbench > Configurations and click Add.
Select Accert from the drop-down menu and click OK.
Set Executable Path:
In the configuration settings, set the Executable field to the full path of Main.py in the ACCERT/src/ directory.
Load Grammar:
In the configuration, click Load Grammar to load ACCERT’s input grammar into Workbench.
ACCERT Execution#
Through NEAMS Workbench
Press the Run button within the Workbench interface to execute ACCERT with your selected input file.
Through Command Line
Execute ACCERT using Python:
$ python ACCERT/src/Main.py -i myinput.son
Replace myinput.son with your input file, such as PWR12-BE.son or ABR1000.son.
Troubleshooting#
Conda Errors:
Ensure that Conda is correctly installed and accessible in your system’s PATH.
Running
conda install -r requirements.txtshould be done in the environment where ACCERT will run.If you encounter an error like
bash: ./conda: Is a directory, ensure you’re referencing the correct path to the Conda executable.
Workbench Connection Issues:
If ACCERT cannot connect to Workbench: - Verify that the workbench_path in workbench.sh is correct and does not contain spaces. - Ensure that you have the necessary permissions to execute scripts.
Password Issues:
If you forget your MySQL root password, refer to MySQL’s official documentation on how to reset the password.
It’s crucial to keep your password secure and accessible.
File Extensions on Windows:
Ensure that file extensions are visible: - In File Explorer, go to View > Show > File name extensions.
Verify that install.conf is not mistakenly saved as install.conf.txt.
Additional Resources#
ACCERT GitHub Repository: - accert-dev/ACCERT
NEAMS Workbench Documentation: - NEAMS Workbench User Guide