Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 748478c

Browse files
Release 11/11/24 (#131)
- Setup PIP - Remove Prefect from repo - Remove any leftover references of participation rewards --------- Co-authored-by: Haris Angelidakis <64154020+harisang@users.noreply.github.com>
1 parent 92e702d commit 748478c

File tree

11 files changed

+36
-282
lines changed

11 files changed

+36
-282
lines changed

.github/workflows/prefect.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,3 @@ build-image:
4848
run-image:
4949
echo "using ${PWD}/data"
5050
docker run -v ${PWD}/data:/app/data --env-file .env local_dune_sync
51-
52-
prefect:
53-
@if [ -z "$(VIRTUAL_ENV)" ]; then \
54-
echo "Error: Not in a virtual environment. Please activate a virtual environment before running this command."; \
55-
exit 1; \
56-
else \
57-
pip install -r requirements/prefect.txt; \
58-
prefect server start; \
59-
fi
60-
61-
deployment:
62-
@if [ -z "$(VIRTUAL_ENV)" ]; then \
63-
echo "Error: Not in a virtual environment. Please activate a virtual environment before running this command."; \
64-
exit 1; \
65-
else \
66-
pip install -r requirements/prefect.txt; \
67-
pip install -r requirements/prod.txt; \
68-
python -m src.deploy_prefect.local_deploy; \
69-
fi

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ To execute the main binary (inside the container) run
1515
python3 -m src.main --sync-table <job>
1616
```
1717

18+
Another way to install the repo is with pip:
19+
``
20+
pip install git+https://github.com/cowprotocol/dune-sync.git@<branch-name>
21+
```
22+
This allows you to install the repo as a module to your local environment and automatically install the required dependencies.
23+
1824
# Docker
1925
2026
### Build

manifest.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include logging.conf
2+
include requirements/prod.txt

requirements/prefect.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import os
2+
from setuptools import setup, find_packages
3+
4+
subpackages = find_packages("src")
5+
packages = ["src"] + ["src." + p for p in subpackages]
6+
7+
8+
def read_requirements(filename):
9+
with open(filename, "r") as f:
10+
return [line.strip() for line in f.readlines() if line.strip()]
11+
12+
13+
setup(
14+
name="src",
15+
version="1.6.4",
16+
packages=packages,
17+
package_dir={"dune_sync": "src/dune_sync"},
18+
include_package_data=True,
19+
data_files=[
20+
(
21+
os.path.join(
22+
"lib", "python{0}.{1}".format(*os.sys.version_info[:2]), "site-packages"
23+
),
24+
["logging.conf"],
25+
)
26+
],
27+
install_requires=read_requirements("requirements/prod.txt"),
28+
)

src/deploy_prefect/__init__.py

Whitespace-only changes.

src/deploy_prefect/deployment.py

Lines changed: 0 additions & 166 deletions
This file was deleted.

src/deploy_prefect/local_deploy.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/models/batch_rewards_schema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def from_pdf_to_dune_records(cls, rewards_df: DataFrame) -> list[dict[str, Any]]
3535
"fee": int(row["network_fee"]),
3636
"winning_score": int(row["winning_score"]),
3737
"reference_score": int(row["reference_score"]),
38-
"participating_solvers": row["participating_solvers"],
3938
},
4039
}
4140
for row in rewards_df.to_dict(orient="records")

0 commit comments

Comments
 (0)