This project generates a report based on a sample of 100 random items from a specified contract. The report includes various analyses and is saved as a PDF file.
- Docker
- Docker Compose
-
Build the Docker Image:
docker build -t gsads . -
Run the Docker Container:
docker run --rm -it -v $(pwd)/output:/app/output gsads
-
Build the Docker Image:
docker build -t gsads . -
Run the Docker Container:
docker run --rm -it -v $(pwd)/output:/app/output gsads
src/main.py: Main script to run the report generation.src/utils/report.py: Contains theSamplePriceCompclass for generating the report.Dockerfile: Docker configuration file.requirements.txt: Python dependencies.
Run the Docker Container:
docker build -t gsads . && docker run --rm -it -v $(pwd)/output:/app/output gsadsThe generated PDF report will be saved in the output directory.
Got it! You want to create a new branch called GSADS in your main web app repository (https://github.com/cvantienen/gsa), and this branch will track the Python scripts used in the web app (from https://github.com/cvantienen/GSA-Data-Scripts).
Here’s how you can go about it:
If you don’t have the gsa repository on your local machine, clone it:
git clone https://github.com/cvantienen/gsa.git
cd gsaNow that you're in the gsa repository, create a new branch called GSADS:
git checkout -b GSADSThis command:
- Creates a new branch named
GSADS. - Switches your working directory to the
GSADSbranch.
Next, you'll need to add the GSA-Data-Scripts repository as a remote, so you can bring in the data scripts from that repository.
To do this, add a new remote (let’s call it datascripts):
git remote add datascripts https://github.com/cvantienen/GSA-Data-Scripts.gitNow that the GSA-Data-Scripts repository is added as a remote, fetch its contents:
git fetch datascriptsYou have a couple of options here depending on whether you want to bring over the entire history or just a snapshot of the files from GSA-Data-Scripts.
If you want to merge the contents of GSA-Data-Scripts into the GSADS branch (but keep all histories separate), you can merge the content like so:
git merge datascripts/main --allow-unrelated-histories- This assumes that the
GSA-Data-Scriptsrepository's default branch ismain. Adjust if it’s different. - The
--allow-unrelated-historiesflag is necessary because these two repositories have different histories.
If you want to bring over the files (without merging the entire history), you can check out just the files from the GSA-Data-Scripts repository into the GSADS branch:
git checkout datascripts/main -- path/to/your/data/scriptsThis will copy the files from the GSA-Data-Scripts repository into your GSADS branch without bringing over the full commit history.
Once you’ve merged or checked out the data scripts, you might need to stage and commit the changes if any new files were added to the branch:
git add .
git commit -m "Add data scripts from GSA-Data-Scripts repo"Now, push the new GSADS branch to your gsa repository on GitHub:
git push origin GSADSThis will push the GSADS branch to your GitHub repository.
Here’s the full sequence of commands to achieve what you're asking for:
# Step 1: Clone the gsa repo (if you haven't already)
git clone https://github.com/cvantienen/gsa.git
cd gsa
# Step 2: Create and checkout the GSADS branch
git checkout -b GSADS
# Step 3: Add the GSA-Data-Scripts repo as a remote
git remote add datascripts https://github.com/cvantienen/GSA-Data-Scripts.git
# Step 4: Fetch the content from the data scripts repo
git fetch datascripts
# Step 5: Merge or check out the data scripts (depending on your choice)
# Option 1: Merging
git merge datascripts/main --allow-unrelated-histories
# Option 2: Checking out files (if you just want to copy them over)
git checkout datascripts/main -- path/to/your/data/scripts
# Step 6: Stage and commit the changes
git add .
git commit -m "Add data scripts from GSA-Data-Scripts repo"
# Step 7: Push the GSADS branch to GitHub
git push origin GSADSWith this, you will have successfully created a GSADS branch in your main gsa repository, added the data scripts from the GSA-Data-Scripts repository, and pushed the GSADS branch to GitHub.
Let me know if any part needs more clarification!