diff --git a/.deepsource.toml b/.deepsource.toml index 6b5a6bbf..93db97b2 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -9,7 +9,7 @@ test_patterns = [ enabled = true [analyzers.meta] - max_line_length = 100 + max_line_length = 120 [[analyzers]] name = "javascript" @@ -30,3 +30,7 @@ enabled = true [[transformers]] name = 'prettier' enabled = true + +[[analyzers]] +name = "secrets" +enabled = true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c6791a68..a343b36e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,7 +2,8 @@ **The repository has**: -- [ ] At least three issues with the good first issue label. +- [ ] At least three issues with the `good first issue` label. +- [ ] At least 10 contributors. - [ ] Detailed setup instructions for the project. - [ ] CONTRIBUTING.md - [ ] Actively maintained. diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 4a66712b..00000000 --- a/.github/stale.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 90 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 7 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - pinned - - security - - Status:WIP - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - Is this issue still relevant? - There has been no recent activity found and is considered stale. - If relevant please comment or update to unstale. - -# Comment to post when closing a stale Issue or Pull Request. -closeComment: > - This issue has been automatically closed because of inactivity. - You can re-open if needed. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 5 - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -pulls: - daysUntilStale: 90 - - markComment: > - Is this pull request still relevant? - There has been no recent activity found and is considered stale. - If relevant please comment or update to unstale. - - closeComment: > - This pull request has been automatically closed because of inactivity. - You can re-open it if needed. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2842aff3..aa3ab899 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,16 +6,16 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@v1 + - name: Checkout repo + uses: actions/checkout@v4 - - name: Set up Python 3.6 - uses: actions/setup-python@v1 - with: - python-version: '3.6' + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: '3.12' - - name: Install dependencies - run: make pre-build + - name: Install dependencies + run: make pre-build - - name: Run tests for data sanity - run: make test + - name: Run tests for data sanity + run: make test diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index a5c085bd..d3d88282 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -3,13 +3,39 @@ name: Cron on: schedule: - cron: '0 8 * * *' + workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Set up bun + uses: oven-sh/setup-bun@v1 + + - name: Install dependencies + run: | + make pre-build + bun install + + - name: Populate the latest data + run: make generate + env: + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} + + - name: Sync data to the blob store + run: bun sync up + env: + BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }} + - name: Trigger deployment uses: joelwmale/webhook-action@master - env: - WEBHOOK_URL: ${{ secrets.NETLIFY_CRON_BUILD_HOOK }} - data: "" + with: + url: ${{ secrets.DEPLOY_HOOK_URL }} diff --git a/.github/workflows/gitopia-mirror.yml b/.github/workflows/gitopia-mirror.yml deleted file mode 100644 index e63dd46c..00000000 --- a/.github/workflows/gitopia-mirror.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Gitopia Mirror - -on: - push: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - name: Gitopia Mirror Action - uses: gitopia/gitopia-mirror-action@v0.1.2 - with: - gitopiaWallet: "${{ secrets.ARWEAVE_WALLET }}" - branch: "master" - remoteUrl: "gitopia://WU8MwK_wNu7had5xKwuD2dilKn9gzCFH6carv-QmIKs/good-first-issue" diff --git a/.gitignore b/.gitignore index f2e9769c..0bfe4708 100644 --- a/.gitignore +++ b/.gitignore @@ -1,162 +1,31 @@ -# Public dir -public/ -resources/ - -# Node modules -node_modules/ -themes/lucy/node_modules/ - -# Generated configs -cdn_config.toml - -# Generated data files -data/generated.json -data/tags.json -content/language/*.md - -# 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/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro .cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ +dist -# Translations -*.mo -*.pot +# Node dependencies +node_modules -# Django stuff: +# Logs +logs *.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints -# IPython -profile_default/ -ipython_config.py +# Misc +.DS_Store +.fleet +.idea -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments +# Local env files .env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json +.env.* +!.env.example -# Pyre type checker -.pyre/ +__pycache__ -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# static files generated from Django application using `collectstatic` -media - -.nuxt - -static/sw.js +# Generated data files +data/generated.json +data/tags.json +content/language/*.md diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..e887efb3 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +node 20.10.0 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..86496ff9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +.nuxt +pnpm-lock.yaml +dist +.output +*.json diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..d8f46f33 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "printWidth": 120, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": true, + "semi": false +} diff --git a/.python-version b/.python-version new file mode 100644 index 00000000..e4fba218 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/Makefile b/Makefile index 056a2d20..a00bda33 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,26 @@ .ONESHELL: pre-build: - pip install --upgrade poetry && \ - poetry install && \ - yarn + pip install --upgrade poetry + poetry install --no-root build: - yarn generate + bun install + bun generate generate: poetry run python gfi/populate.py -tweet: - poetry run python gfi/tweet.py - -index: - poetry run python gfi/index.py - generate-prod: - make pre-build - make generate - @if [ $$PREVIEW == "false" ]; then \ - make tweet; \ - fi; \ - make build + bun install + bun sync down + bun generate test: poetry run python gfi/test_data.py + poetry run mypy gfi/*.py + +format: + poetry run ruff format . + bunx prettier --write . .DEFAULT_GOAL := build diff --git a/README.md b/README.md index d9c3b227..028fcba4 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,10 @@
- Good First Issue curates easy pickings from popular open-source projects, and helps you make - your first contribution to open-source. + Good First Issue curates easy pickings from popular open-source projects, and helps you make your first + contribution to open-source.
- A weekly update on popular open-source projects including the digest of open good first - issues, right into your inbox. -
-