Skip to content

Commit

Permalink
Repo updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
feltroidprime committed Aug 23, 2024
1 parent 0c7f781 commit 2747799
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 146 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/fustat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.10.14
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Setup repo
run: make setup
- name: Check cairo Formatting
Expand All @@ -44,4 +38,4 @@ jobs:
- name: Run fustat programs
run: |
source venv/bin/activate
pytest tests/fustat_programs/test_fustat.py -n auto -s
pytest tests/fustat_programs/test_fustat.py -n auto -s -x
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,4 @@ venv
*.sage.py
*.idea
*.secrets
tools/make/requirements.txt
2 changes: 2 additions & 0 deletions .secrets.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Read only to download artifacts in local CI.
GITHUB_TOKEN=ghp_
13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,8 @@ build:
setup:
./tools/make/setup.sh

bytecode-check:
./tools/make/bytecode_check.sh

rewrite:
./tools/make/rewrite.sh

steps:
./tools/make/steps.sh

ci-e2e:
./tools/make/ci_e2e.sh
ci-fustat:
./tools/make/ci_fustat.sh

profile:
@echo "A script to select, run & profile one Cairo file."
Expand Down
44 changes: 44 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[project]
name = "garaga-zero"
version = "0.0.1"
requires-python = ">=3.10,<3.11"

dependencies = [
"garaga>=0.13.2a0",
"cairo-lang==0.13.2a0",
"protobuf==3.20.3",
"inquirer",
"pandas",
"tabulate",
"pytest",
"pre-commit",
]


[tool.isort]
profile = "black"

[tool.pytest.ini_options]
cache_dir = "build/.pytest_cache"
testpaths = ["tests/hydra"]
# addopts = "--tb=short --showlocals"
asyncio_default_fixture_loop_scope = "function" # Explicitly set the loop scope

[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| \venv
| build
| dist
)/
'''
1 change: 0 additions & 1 deletion src/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion tools/make/fustat_format_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export -f format_file

# Find all .cairo files under src/ and tests/ directories and format them in parallel
# Using --halt soon,fail=1 to stop at the first failure
find ./src/fustat ./tests/fustat_programs -name '*.cairo' | parallel --halt soon,fail=1 format_file
find ./src ./tests/fustat_programs -name '*.cairo' | parallel --halt soon,fail=1 format_file

# Capture the exit status of parallel
exit_status=$?
Expand Down
112 changes: 0 additions & 112 deletions tools/make/poseidon_utils.patch

This file was deleted.

9 changes: 0 additions & 9 deletions tools/make/requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions tools/make/rewrite.sh

This file was deleted.

6 changes: 4 additions & 2 deletions tools/make/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ install_parallel() {
# Linux
if command -v apt-get >/dev/null; then
# Debian/Ubuntu
sudo apt-get install -y parallel
sudo apt-get update && sudo apt-get install -y parallel
elif command -v dnf >/dev/null; then
# Fedora
sudo dnf install -y parallel
Expand Down Expand Up @@ -87,7 +87,9 @@ echo 'export PYTHONPYCACHEPREFIX="$PWD/venv/build/__pycache__"' >> venv/bin/acti
echo "PROJECT_ROOT=$PWD" > .env
echo "PYTHONPATH=$PWD/hydra" >> .env # For vscode python path when running in integrated terminal.
source venv/bin/activate
pip install -r tools/make/requirements.txt
pip install uv
uv pip compile pyproject.toml --output-file tools/make/requirements.txt -q
uv pip install -r tools/make/requirements.txt

# Install the commit hooks (black, isort)
pre-commit install
Expand Down

0 comments on commit 2747799

Please sign in to comment.