-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_project.sh
executable file
·205 lines (158 loc) · 3.44 KB
/
setup_project.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#!/bin/bash
# ActiveInferenceForager Project Setup Script
# Exit immediately if a command exits with a non-zero status
set -e
# Project name
PROJECT_NAME="ActiveInferenceForager"
# Create main project directory
mkdir $PROJECT_NAME
cd $PROJECT_NAME
# Create project structure
mkdir -p src tests docs examples config
# Create source code directory structure
mkdir -p src/$PROJECT_NAME/{agents,environments,utils}
touch src/$PROJECT_NAME/__init__.py
touch src/$PROJECT_NAME/agents/__init__.py
touch src/$PROJECT_NAME/environments/__init__.py
touch src/$PROJECT_NAME/utils/__init__.py
# Create main script
cat << EOF > src/$PROJECT_NAME/main.py
def main():
print("Welcome to ActiveInferenceForager!")
if __name__ == "__main__":
main()
EOF
# Create test directory structure
mkdir -p tests/{unit,integration}
touch tests/__init__.py
touch tests/unit/__init__.py
touch tests/integration/__init__.py
# Create documentation files
touch docs/README.md
echo "# $PROJECT_NAME Documentation" > docs/README.md
# Create example scripts
touch examples/basic_simulation.py
# Create configuration files
touch config/default_config.yaml
# Create README file
cat << EOF > README.md
# $PROJECT_NAME
An adaptive AI agent implementing the Free Energy Principle and Active Inference in dynamic environments.
## Project Structure
\`\`\`
$PROJECT_NAME/
│
├── src/
│ └── $PROJECT_NAME/
│ ├── agents/
│ ├── environments/
│ └── utils/
│
├── tests/
│ ├── unit/
│ └── integration/
│
├── docs/
├── examples/
├── config/
│
├── README.md
├── requirements.txt
└── .gitignore
\`\`\`
## Setup
1. Clone the repository
2. Create a virtual environment: \`python -m venv venv\`
3. Activate the virtual environment:
- On Windows: \`venv\Scripts\activate\`
- On Unix or MacOS: \`source venv/bin/activate\`
4. Install the requirements: \`pip install -r requirements.txt\`
## Usage
[Provide basic usage instructions here]
## Contributing
[Provide contribution guidelines here]
## License
[Specify the license here]
EOF
# Create requirements file
touch requirements.txt
# Create .gitignore file
cat << EOF > .gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
# IDE settings
.vscode/
.idea/
EOF
# Initialize git repository
git init
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Install basic requirements
pip install numpy scipy matplotlib pyyaml pytest
# Freeze requirements
pip freeze > requirements.txt
echo "Project setup complete! Your $PROJECT_NAME project is ready to go."
echo "To get started, activate the virtual environment with 'source venv/bin/activate'"