Welcome to the AcidWatch repository.
This repository is dedicated to the development of a common portal for tools aimed at calculating and predicting chemical reactions occurring within CO2 streams. Our goal is to democratise and open up the discussion around CO2 impurities and to provide a reliable resource for researchers, chemists, and industry professionals interested in understanding and controlling the behavior of CO2 impurities.
AcidWatch is accessible at https://acidwatch.radix.equinor.com/, which is the official link to the latest stable version of the platform. Additionally, mainly for development purposes, we maintain three environments:
- Development: The latest features in active development (may be unstable). Access the dev version here.
- Testing: For testing new features (more stable than dev). Access the test version here.
- Production: The official live platform with all tested and stable features. Access the production version here. The main URL (https://acidwatch.radix.equinor.com/) also directs to the production environment.
Please note: You might need appropriate permissions to access the environments.
Before you begin, ensure you have the following installed on your machine:
- Node.js (version 14.x or later)
- npm (version 6.x or later)
- Python (version 3.10 or later)
- Poetry (for managing Python dependencies)
Clone the repository to your local machine:
git clone [email protected]:equinor/acidwatch.git
cd acidwatch
Navigate to the backend directory, create a .env file based on .env.example to configure environment variables (secrets can be found in azure portal). As of now, the app relies on you being able to connect to the Azure database and this functionality is not accessible to the users outside Equinor.
Install the dependencies using poetry, activate the Python virtual environment (we refer to Python documentation for the details) and start server:
cd backend
poetry install
cd src/acidwatch_api/
python3 __main__.py
Navigate to the frontend directory, create a .env file based on .env.example to configure environment variables. The variables begin with the prefix VITE_, but in the code they are referenced without the prefix. Then
cd ../frontend
npm install
npm run dev
This is optional, you can still do quite a lot frontend development without having any models running. Check the relevant models repos for guidance how to run locally:
Open your browser and navigate to http://localhost:5173 to access the frontend application. The backend API will be running at http://localhost:8001. Swagger at http://localhost:8001/docs
If using VS Code it is recommended to run backend in a different instances of VS Code. This will avoid a lot of hazzle configuring and running correct python virtual environment etc.
GitHub Actions Workflows are used for building, testing and deploying Acidwatch to Radix.
Tests are run on every push, and deployment to dev environment are done on merge to main branch
Deployment to test en prod environment are for now done manually in Radix console
If someone fancies using codespaces and wants to break out of the tedious local setup then following steps can be followed.
Open a terminal and write following commands to run frontend.
cd /frontend
npm run dev
Open another terminal and write following commands to enable virtual environment and then to run backend.
source venv/bin/activate .
python3 backend/src/acidwatch_api/__main__.py
Kudos! Now frontend is running on port 5173, and backend is on 8001. Toggle the port for backend only to be public so its accessible by frontend.
Now open source models can be run and tested. To point to a different instance of deployment (dev, prod or local) install-dependencies.sh can be updated.