Skip to content

Commit

Permalink
Merge pull request #34 from awhipp/dev/updating_sales_tax_2024
Browse files Browse the repository at this point in the history
Dev/updating sales tax 2024
  • Loading branch information
awhipp authored Jul 25, 2024
2 parents 4673bae + d56a3df commit 891c455
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check_data_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10.8' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check_endpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ jobs:
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: |
sudo apt install jq -y
- name: Checking Hauling Endpoint
run: |
curl -X GET "$HAULING_PROD_API?from=10000002:60003760&to=10000043:60008494&tax=0.08&minProfit=500000&minROI=0.05&maxBudget=99999999999&maxWeight=9999999&routeSafety=secure&systemSecurity=high_sec" | jq
curl -X GET "$HAULING_PROD_API?from=10000002:60003760&to=10000043:60008494&tax=0.045&minProfit=500000&minROI=0.05&maxBudget=99999999999&maxWeight=9999999&routeSafety=secure&systemSecurity=high_sec" | jq
- name: Checking Orders Endpoint
run: |
curl -X GET "$ORDERS_PROD_API?itemId=33697&from=10000002:60003760&to=10000043:60008494" | jq
- name: Checking Station Trading Endpoint
run: |
curl -X GET "$STATION_PROD_API?station=60003760&profit=1000&tax=0.08&fee=0.03&margins=0.20,0.30&min_volume=100000&volume_filter=1" | jq
curl -X GET "$STATION_PROD_API?station=60003760&profit=1000&tax=0.045&fee=0.03&margins=0.20,0.30&min_volume=100000&volume_filter=1" | jq
6 changes: 3 additions & 3 deletions .github/workflows/evetrade_api_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -27,7 +27,7 @@ jobs:
python -m poetry config virtualenvs.in-project true
- name: Cache the virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/evetrade_deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -29,7 +29,7 @@ jobs:
python -m poetry config virtualenvs.in-project true
- name: Cache the virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion api/evetrade/hauling.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ async def get(request) -> list:
'''
startTime = time.time()
queries = request['queryStringParameters']
SALES_TAX = float(queries.get('tax', 0.08))
SALES_TAX = float(queries.get('tax', 0.045))
MIN_PROFIT = float(queries.get('minProfit', 500000))
MIN_ROI = float(queries.get('minROI', 0.04))
MAX_BUDGET = float(queries.get('maxBudget', float('inf')))
Expand Down
2 changes: 1 addition & 1 deletion api/evetrade/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def get(event: dict) -> list:
queries = event['queryStringParameters']

STATION = queries['station']
SALES_TAX = float(queries.get('tax', 0.08))
SALES_TAX = float(queries.get('tax', 0.045))
BROKER_FEE = float(queries.get('fee', 0.03))
MARGINS = list(map(float, queries.get('margins', '0.20,0.40').split(',')))
MIN_VOLUME = int(queries.get('min_volume', 1000))
Expand Down
6 changes: 3 additions & 3 deletions tests/test_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_get_hauling(mock_boto_sqs) -> None:
"queryStringParameters": {
"from": "10000002",
"to": "10000043",
"tax": 0.08,
"tax": 0.045,
"minProfit": 500000,
"minROI": 0.05,
"routeSafety": "secure",
Expand Down Expand Up @@ -113,7 +113,7 @@ def test_get_hauling_nearby(mock_boto_sqs) -> None:
"queryStringParameters": {
"from": "10000002",
"to": "nearby",
"tax": 0.08,
"tax": 0.045,
"minProfit": 500000,
"minROI": 0.05,
"routeSafety": "secure",
Expand Down Expand Up @@ -165,7 +165,7 @@ def test_get_stations() -> None:
},
"queryStringParameters": {
"station": "60008494",
"tax": "0.08",
"tax": "0.045",
"fee": "0.03",
"margins": "0.10,0.20",
"min_volume": 1000,
Expand Down

1 comment on commit 891c455

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Coverage

Code Coverage
FileStmtsMissCoverMissing
__init__.py00100% 
gateway.py884647%43–45, 47–50, 52–57, 59, 68–69, 71–72, 75, 78–79, 82, 84–85, 87–89, 91–92, 94–96, 98–102, 104, 115, 123–124, 130–131, 161, 163, 165
evetrade
   __init__.py00100% 
   hauling.py1622385%39, 44, 61–62, 67, 93, 101, 189–190, 195–196, 291–294, 302–305, 307, 357–358, 366
   orders.py330100% 
   station.py68395%62–64
utils
   __init__.py00100% 
   helpers.py230100% 
TOTAL3747280% 

Please sign in to comment.