about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--justfile4
-rw-r--r--nix/flake/devshell.nix4
-rw-r--r--pyproject.toml74
-rw-r--r--requirements-dev.lock140
-rw-r--r--requirements.lock66
-rwxr-xr-xsrc/cli/pizza.py54
6 files changed, 0 insertions, 342 deletions
diff --git a/justfile b/justfile
index 5106635..b069c52 100644
--- a/justfile
+++ b/justfile
@@ -1,7 +1,3 @@
-# a quick setup
-setup:
-	rye sync
-
 # update dependencies
 update-deps:
 	nix flake update --commit-lock-file
diff --git a/nix/flake/devshell.nix b/nix/flake/devshell.nix
index 8fb0c2c..ae1d17d 100644
--- a/nix/flake/devshell.nix
+++ b/nix/flake/devshell.nix
@@ -11,9 +11,7 @@
       devshell.startup.pre-commit.text = config.pre-commit.installationScript;
       packages = with pkgs; [
         (config.treefmt.build.wrapper)
-        python3
         just
-        pandoc
         nixos-rebuild
       ];
       env = [{
@@ -34,8 +32,6 @@
       programs = {
         nixpkgs-fmt.enable = true;
         shfmt.enable = true;
-        taplo.enable = true;
-        ruff.enable = true;
         yamlfmt.enable = true;
       };
     };
diff --git a/pyproject.toml b/pyproject.toml
deleted file mode 100644
index a81475a..0000000
--- a/pyproject.toml
+++ /dev/null
@@ -1,74 +0,0 @@
-[project]
-name = "world"
-version = "0.1.0"
-description = "collection of tools and scripts"
-authors = [{ name = "Franck Cuny", email = "franck@fcuny.net" }]
-dependencies = [
-  "bs4>=0.0.2",
-  "requests>=2.31.0",
-  "prettytable>=3.10.0",
-  "termcolor>=2.4.0",
-  "click>=8.1.7",
-  "ipython>=8.24.0",
-]
-readme = "README.md"
-requires-python = ">= 3.8"
-
-[build-system]
-requires = ["hatchling"]
-build-backend = "hatchling.build"
-
-[tool.rye]
-managed = true
-dev-dependencies = [
-  "python-lsp-server[all]>=1.11.0",
-  "python-lsp-ruff>=2.2.1",
-  "types-requests>=2.31.0.20240406",
-]
-
-[tool.hatch.metadata]
-allow-direct-references = true
-
-[tool.hatch.build.targets.wheel]
-packages = ["src/cli", "src/rbx_nomad"]
-
-[tool.ruff]
-line-length = 120
-
-[tool.ruff.format]
-docstring-code-format = true
-
-[tool.ruff.lint]
-select = [
-  # isort
-  "I",
-  # bugbear rules
-  "B",
-  # remove unused imports
-  "F401",
-  # bare except statements
-  "E722",
-  # unused arguments
-  "ARG",
-  # misuse of typing.TYPE_CHECKING
-  "TCH004",
-  # import rules
-  "TID251",
-]
-
-[tool.ruff.lint.pycodestyle]
-max-line-length = 120
-
-[tool.ruff.lint.isort]
-length-sort = true
-length-sort-straight = true
-combine-as-imports = true
-known-first-party = ["rbx_nomad", "term", "git"]
-
-[project.scripts]
-gha_billing = "cli.gha_billing:cli"
-hashienv = "cli.hashienv:cli"
-int2ip = "cli.ipconverter:int2ip"
-ip2int = "cli.ipconverter:ip2int"
-nomad_allocs = "cli.nomad_allocs:cli"
-pizza = "cli.pizza:main"
diff --git a/requirements-dev.lock b/requirements-dev.lock
deleted file mode 100644
index c6d4b59..0000000
--- a/requirements-dev.lock
+++ /dev/null
@@ -1,140 +0,0 @@
-# generated by rye
-# use `rye lock` or `rye sync` to update this lockfile
-#
-# last locked with the following flags:
-#   pre: false
-#   features: []
-#   all-features: false
-#   with-sources: false
-
--e file:.
-astroid==3.1.0
-    # via pylint
-asttokens==2.4.1
-    # via stack-data
-attrs==23.2.0
-    # via cattrs
-    # via lsprotocol
-autopep8==2.0.4
-    # via python-lsp-server
-beautifulsoup4==4.12.3
-    # via bs4
-bs4==0.0.2
-    # via world
-cattrs==23.2.3
-    # via lsprotocol
-    # via python-lsp-ruff
-certifi==2024.2.2
-    # via requests
-charset-normalizer==3.3.2
-    # via requests
-click==8.1.7
-    # via world
-decorator==5.1.1
-    # via ipython
-dill==0.3.8
-    # via pylint
-docstring-to-markdown==0.15
-    # via python-lsp-server
-executing==2.0.1
-    # via stack-data
-flake8==7.0.0
-    # via python-lsp-server
-idna==3.7
-    # via requests
-importlib-metadata==7.1.0
-    # via yapf
-ipython==8.24.0
-    # via world
-isort==5.13.2
-    # via pylint
-jedi==0.19.1
-    # via ipython
-    # via python-lsp-server
-lsprotocol==2023.0.1
-    # via python-lsp-ruff
-matplotlib-inline==0.1.7
-    # via ipython
-mccabe==0.7.0
-    # via flake8
-    # via pylint
-    # via python-lsp-server
-packaging==24.0
-    # via pytoolconfig
-parso==0.8.4
-    # via jedi
-pexpect==4.9.0
-    # via ipython
-platformdirs==4.2.1
-    # via pylint
-    # via pytoolconfig
-    # via yapf
-pluggy==1.5.0
-    # via python-lsp-server
-prettytable==3.10.0
-    # via world
-prompt-toolkit==3.0.43
-    # via ipython
-ptyprocess==0.7.0
-    # via pexpect
-pure-eval==0.2.2
-    # via stack-data
-pycodestyle==2.11.1
-    # via autopep8
-    # via flake8
-    # via python-lsp-server
-pydocstyle==6.3.0
-    # via python-lsp-server
-pyflakes==3.2.0
-    # via flake8
-    # via python-lsp-server
-pygments==2.18.0
-    # via ipython
-pylint==3.1.0
-    # via python-lsp-server
-python-lsp-jsonrpc==1.1.2
-    # via python-lsp-server
-python-lsp-ruff==2.2.1
-python-lsp-server==1.11.0
-    # via python-lsp-ruff
-pytoolconfig==1.3.1
-    # via rope
-requests==2.31.0
-    # via world
-rope==1.13.0
-    # via python-lsp-server
-ruff==0.4.3
-    # via python-lsp-ruff
-six==1.16.0
-    # via asttokens
-snowballstemmer==2.2.0
-    # via pydocstyle
-soupsieve==2.5
-    # via beautifulsoup4
-stack-data==0.6.3
-    # via ipython
-termcolor==2.4.0
-    # via world
-tomli==2.0.1
-    # via yapf
-tomlkit==0.12.4
-    # via pylint
-traitlets==5.14.3
-    # via ipython
-    # via matplotlib-inline
-types-requests==2.31.0.20240406
-ujson==5.9.0
-    # via python-lsp-jsonrpc
-    # via python-lsp-server
-urllib3==2.2.1
-    # via requests
-    # via types-requests
-wcwidth==0.2.13
-    # via prettytable
-    # via prompt-toolkit
-whatthepatch==1.0.5
-    # via python-lsp-server
-yapf==0.40.2
-    # via python-lsp-server
-zipp==3.18.1
-    # via importlib-metadata
diff --git a/requirements.lock b/requirements.lock
deleted file mode 100644
index e6067b6..0000000
--- a/requirements.lock
+++ /dev/null
@@ -1,66 +0,0 @@
-# generated by rye
-# use `rye lock` or `rye sync` to update this lockfile
-#
-# last locked with the following flags:
-#   pre: false
-#   features: []
-#   all-features: false
-#   with-sources: false
-
--e file:.
-asttokens==2.4.1
-    # via stack-data
-beautifulsoup4==4.12.3
-    # via bs4
-bs4==0.0.2
-    # via world
-certifi==2024.2.2
-    # via requests
-charset-normalizer==3.3.2
-    # via requests
-click==8.1.7
-    # via world
-decorator==5.1.1
-    # via ipython
-executing==2.0.1
-    # via stack-data
-idna==3.7
-    # via requests
-ipython==8.24.0
-    # via world
-jedi==0.19.1
-    # via ipython
-matplotlib-inline==0.1.7
-    # via ipython
-parso==0.8.4
-    # via jedi
-pexpect==4.9.0
-    # via ipython
-prettytable==3.10.0
-    # via world
-prompt-toolkit==3.0.43
-    # via ipython
-ptyprocess==0.7.0
-    # via pexpect
-pure-eval==0.2.2
-    # via stack-data
-pygments==2.18.0
-    # via ipython
-requests==2.31.0
-    # via world
-six==1.16.0
-    # via asttokens
-soupsieve==2.5
-    # via beautifulsoup4
-stack-data==0.6.3
-    # via ipython
-termcolor==2.4.0
-    # via world
-traitlets==5.14.3
-    # via ipython
-    # via matplotlib-inline
-urllib3==2.2.1
-    # via requests
-wcwidth==0.2.13
-    # via prettytable
-    # via prompt-toolkit
diff --git a/src/cli/pizza.py b/src/cli/pizza.py
deleted file mode 100755
index d07abc8..0000000
--- a/src/cli/pizza.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python3
-
-from textwrap import fill
-
-import requests
-from bs4 import BeautifulSoup
-from termcolor import colored
-from prettytable import PrettyTable
-
-url = "https://cheeseboardcollective.coop/pizza/"
-
-
-def main():
-    content = requests.get(url)
-    soup = BeautifulSoup(content.text, "html.parser")
-
-    magic_ingredients = ["corn"]
-
-    table = PrettyTable()
-    table.field_names = ["date", "pizza"]
-    table.align = "l"
-
-    pizzas = soup.select(".pizza-list > article")
-    for pizza in pizzas:
-        date_color = "white"
-        menu_color = "white"
-
-        date = pizza.find(class_="date").text
-
-        # the pizza is the 1st element, the 2nd is the salad, and i don't
-        # care about the salad :)
-        menu = pizza.select(".menu > p:nth-of-type(1)")[0].get_text(strip=True, separator="\n").split("\n")
-
-        if "closed" in menu[0]:
-            date_color = "red"
-
-        if "Parbake pizza is available" in menu[0]:
-            menu.pop(0)
-
-        if "Lunch from" in menu[0]:
-            menu.pop(0)
-
-        if "No hot pizza today" in menu[0]:
-            menu.pop(0)
-
-        final_menu = "".join(menu)
-
-        for ingredient in magic_ingredients:
-            if ingredient in final_menu:
-                menu_color = "yellow"
-
-        table.add_row([colored(date, date_color), fill(colored(final_menu, menu_color), width=80)])
-
-    print(table)