Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .devcontainer/.dfetch_data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is a generated file by dfetch. Don't edit this, but edit the manifest.
# For more info see https://dfetch.rtfd.io/en/latest/getting_started.html
dfetch:
branch: main
hash: f2a3ac0bd99186f66dbca1f5c37b09f8
last_fetch: 09/04/2025, 19:11:43
patch: dfetch-devcontainer.patch
remote_url: https://github.com/dfetch-org/dfetch
revision: 89e8c77621e62b6ef657c4358b350a959c82af16
tag: ''
28 changes: 28 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.12-bullseye

# Install dependencies
# pv is required for asciicasts
RUN apt-get update && apt-get install --no-install-recommends -y \
pv=1.6.6-1+b1 \
subversion=1.14.1-3+deb11u1 && \
rm -rf /var/lib/apt/lists/*

WORKDIR /workspaces/dfetch-hub

# Add a non-root user (dev)
RUN useradd -m dev && chown -R dev:dev /workspaces/dfetch-hub

USER dev

ENV PATH="/home/dev/.local/bin:${PATH}"
ENV PYTHONPATH="/home/dev/.local/lib/python3.12"
ENV PYTHONUSERBASE="/home/dev/.local"

COPY --chown=dev:dev . .

RUN pip install --no-cache-dir --root-user-action=ignore --upgrade pip==25.0.1 \
&& pip install --no-cache-dir --root-user-action=ignore -e .[development,gui] \
&& pre-commit install --install-hooks

# Set bash as the default shell
SHELL ["/bin/bash", "-ec"]
21 changes: 21 additions & 0 deletions .devcontainer/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 dfetch-org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
38 changes: 38 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"postCreateCommand": "pip install -e .[development,docs,casts]",
"customizations": {
"vscode": {
"extensions": [
"lextudio.restructuredtext",
"alexkrechik.cucumberautocomplete",
"ms-python.python",
"ms-python.isort",
"ms-python.black-formatter",
"ms-python.debugpy",
"mhutchie.git-graph",
"tamasfe.even-better-toml",
"trond-snekvik.simple-rst",
"jebbs.plantuml",
"jimasp.behave-vsc"
],
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.linux": "bash"
}
}
},
"workspaceFolder": "/workspaces/dfetch-hub",
"remoteUser": "dev"
}
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
# Raise pull requests for version updates
# to pip against the `develop` branch
target-branch: "dev"
# Labels on pull requests for version updates only
labels:
- "dependencies"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/.devcontainer"
schedule:
interval: "daily"
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
pip install .[gui,development]

# - run: codespell # Check for typo's
- run: isort --diff dfetch_hub # Checks import order
- run: black --check dfetch_hub # Checks code style
# - run: flake8 dfetch_hub # Checks pep8 conformance
- run: pylint dfetch_hub # Checks pep8 conformance
# - run: ruff check dfetch # Check using ruff
- run: mypy --strict dfetch_hub # Check types
# - run: pyright . # Check types
# - run: doc8 doc # Checks documentation
# - run: pydocstyle dfetch # Checks doc strings
# - run: bandit -r dfetch # Checks security issues
# - run: xenon -b B -m A -a A dfetch # Check code quality
- run: pytest --cov=dfetch_hub test # Run tests
# - run: coverage run --source=dfetch --append -m behave features # Run features tests
# - run: coverage xml -o coverage.xml # Create XML report
# - run: pyroma --directory --min=10 . # Check pyproject
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
__pycache__
.coverage
.mypy_cache
.pytest_cache
.vscode
build
coverage.xml
dfetch_hub.egg-info
dist
doc/_build
doc/landing-page/_build
example/Tests/
venv*
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: local
hooks:
- id: isort
name: import sorting
entry: isort
language: python
- id: black
name: black formatter
entry: black
language: system
types: [file, python]
- id: pylint
name: lint python files
entry: pylint
language: system
files: ^dfetch_hub/
types: [file, python]
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2025 dfetch-org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2025 dfetch-org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# dfetch-hub
Explorer for finding new projects to dfetch
# dfetch-hub

[![Contribute with Codespaces](https://img.shields.io/static/v1?label=Codespaces&message=Open&color=blue)](https://codespaces.new/dfetch-org/dfetch-hub)

Explorer for finding new projects to dfetch

## Setup

```console
pip install -e .[gui]
```

## Basic usage

### CLI

```console
DfetchHub-cli -u "https://github.com/dfetch-org/dfetch.git"
```

### Gui

```console
python -m "dfetch_hub.example_gui.gui"
```
38 changes: 38 additions & 0 deletions dfetch-devcontainer.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/Dockerfile b/Dockerfile
index b3e8653..4d68823 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,10 +7,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
subversion=1.14.1-3+deb11u1 && \
rm -rf /var/lib/apt/lists/*

-WORKDIR /workspaces/dfetch
+WORKDIR /workspaces/dfetch-hub

# Add a non-root user (dev)
-RUN useradd -m dev && chown -R dev:dev /workspaces/dfetch
+RUN useradd -m dev && chown -R dev:dev /workspaces/dfetch-hub

USER dev

@@ -21,7 +21,7 @@ ENV PYTHONUSERBASE="/home/dev/.local"
COPY --chown=dev:dev . .

RUN pip install --no-cache-dir --root-user-action=ignore --upgrade pip==25.0.1 \
- && pip install --no-cache-dir --root-user-action=ignore -e .[development,docs,test,casts] \
+ && pip install --no-cache-dir --root-user-action=ignore -e .[development,gui] \
&& pre-commit install --install-hooks

# Set bash as the default shell
diff --git a/devcontainer.json b/devcontainer.json
index 3cc8f4d..263377c 100644
--- a/devcontainer.json
+++ b/devcontainer.json
@@ -33,6 +33,6 @@
}
}
},
- "workspaceFolder": "/workspaces/dfetch",
+ "workspaceFolder": "/workspaces/dfetch-hub",
"remoteUser": "dev"
}
Loading