diff --git a/.env b/.env deleted file mode 100644 index eef0667..0000000 --- a/.env +++ /dev/null @@ -1,33 +0,0 @@ -venv_dir=".venv" -currentvenv="" -get_project_root() { - local current_dir="$PWD" - while [[ "$current_dir" != "" && ! -d "$current_dir/$venv_dir" ]]; do - current_dir=${current_dir%/*} - done - echo "$current_dir" -} - -root_dir=$(get_project_root) - -if [[ -z "$root_dir" || ! -d "$root_dir/$venv_dir" ]]; then - echo "Unable to find the virtual environment folder." - return -fi - -if [[ $VIRTUAL_ENV != "" ]]; then - currentvenv="${VIRTUAL_ENV##*/}" -fi - -if [[ "$currentvenv" != "$venv_dir" ]]; then - python_version=$(python3 --version 2>&1) - echo "Switching to environment: $venv_dir | $python_version" - source "$root_dir/$venv_dir/bin/activate" -fi - -pip freeze > requirements.txt -sed -i "" -e "s/==/>=/" requirements.txt -pip install --upgrade pip -pip -q install -r requirements.txt -echo "Updated pip packages." - diff --git a/.env.leave b/.env.leave deleted file mode 100644 index d1898d7..0000000 --- a/.env.leave +++ /dev/null @@ -1 +0,0 @@ -deactivate diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..d476346 --- /dev/null +++ b/.envrc @@ -0,0 +1,29 @@ +#!/bin/bash + +# Check if .venv exists +if [[ -d ".venv" ]]; then + # Activate the virtual environment + export VIRTUAL_ENV="$PWD/.venv" + export PATH="$VIRTUAL_ENV/bin:$PATH" + + # Verify we're using the right Python + if [[ -x "$VIRTUAL_ENV/bin/python" ]]; then + export PYTHONPATH="$PWD/src:$PYTHONPATH" + echo "Activated virtual environment: $VIRTUAL_ENV" + else + echo "Warning: Virtual environment Python not found" + fi +else + echo "Warning: No .venv directory found" +fi + +# Run uv sync to update packages +if command -v uv &> /dev/null; then + echo "Running uv sync..." + uv sync + echo "Packages updated successfully" +else + echo "Warning: uv not found" +fi + +echo "Environment configured with direnv" diff --git a/.gitignore b/.gitignore index bb6f085..81fb807 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,8 @@ cython_debug/ # PyPI configuration file .pypirc + +# uv lock files +uv.lock +*.pyc +.python-version \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..11b2230 --- /dev/null +++ b/main.py @@ -0,0 +1,6 @@ +def main(): + print("Hello from gugulet-hu!") + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..203aa13 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,56 @@ +[project] +name = "gugulet-hu" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.13" +dependencies = [ + "babel==2.17.0", + "backrefs==5.9", + "beautifulsoup4==4.14.2", + "certifi==2025.10.5", + "charset-normalizer==3.4.4", + "click==8.1.8", + "colorama==0.4.6", + "csscompressor==0.9.5", + "editorconfig==0.17.1", + "ghp-import==2.1.0", + "hjson==3.1.0", + "htmlmin2==0.1.13", + "idna==3.11", + "importlib-metadata==8.7.0", + "jinja2==3.1.6", + "jsbeautifier==1.15.4", + "jsmin==3.0.1", + "markdown==3.9", + "markupsafe==3.0.3", + "mergedeep==1.3.4", + "mkdocs==1.6.1", + "mkdocs-get-deps==0.2.0", + "mkdocs-glightbox==0.5.1", + "mkdocs-macros-plugin==1.4.0", + "mkdocs-material==9.6.22", + "mkdocs-material-extensions==1.3.1", + "mkdocs-mermaid2-plugin==1.2.3", + "mkdocs-minify-plugin==0.8.0", + "mkdocs-section-index==0.3.10", + "packaging==25.0", + "paginate==0.5.7", + "pathspec==0.12.1", + "platformdirs==4.4.0", + "pygments==2.19.2", + "pymdown-extensions==10.16.1", + "python-dateutil==2.9.0.post0", + "pyyaml==6.0.3", + "pyyaml-env-tag==1.1", + "requests==2.32.5", + "selectolax==0.3.29", + "six==1.17.0", + "soupsieve==2.8", + "super-collections==0.6.2", + "termcolor==3.1.0", + "typing-extensions==4.15.0", + "urllib3==2.5.0", + "watchdog==6.0.0", + "zipp==3.23.0", +]