Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
bbtufty committed May 6, 2024
2 parents 7e333d0 + 071d188 commit d102131
Show file tree
Hide file tree
Showing 64 changed files with 4,159 additions and 14 deletions.
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Bug report
description: Submit a bug report
title: '[BUG]: '
labels: ['bug']
assignees: 'bbtufty'

body:
- type: dropdown
id: version
attributes:
label: Installation
description: Are you using pip or GitHub? Which GitHub tag?
options:
- pip
- GitHub - main branch
- GitHub - dev branch
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe the Bug
description: A clear and concise description of the bug.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce the behavior
description: If not present under all circumstances, give a step-by-step on how to reproduce the bug.
value: |
1.
2.
...
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Attach any applicable screenshots that illustrate your problem.
- type: textarea
id: preferences
attributes:
label: Preference File
description: Paste your config file (likely config.yml), with any sensitive info redacted
render: yaml
- type: textarea
id: log
attributes:
label: Log
description: Attach the relevant log file(s)
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/console_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Console request
description: Suggest a new console for this project
title: '[CONSOLE]: '
labels: ['feature', 'console']
assignees: 'bbtufty'

body:
- type: input
id: console_name
attributes:
label: Console Name
description: What is the full name of the console you would like to add?
placeholder: ex. Nintendo Wii
validations:
required: true
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature
description: Suggest a new feature for this project
title: '[FEAT]: '
labels: ['feature']
assignees: 'bbtufty'

body:
- type: textarea
id: problem
attributes:
label: Problem
description: Is your feature request related to a problem? Please describe
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
id: solution
attributes:
label: Solution
description: Describe the solution you'd like
placeholder: A clear and concise description of what you want to happen.
- type: textarea
id: alternatives
attributes:
label: Alternatives
description: Describe alternatives you've considered
placeholder: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: context
attributes:
label: Context
description: Additional context
placeholder: Add any other context or screenshots about the feature request here.


37 changes: 37 additions & 0 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Test

on:
push:
branches:
- '*'
pull_request:
branches:
- master

jobs:
job:
name: Build Test
runs-on: ubuntu-latest
strategy:
matrix:
# Versions listed at https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
python-version: [
"3.9",
"3.10",
"3.11",
"3.12",
]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
36 changes: 36 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and upload to PyPI

on: [push, pull_request]

jobs:
build_sdist_and_wheel:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Install build
run: python -m pip install build
- name: Build sdist
run: python -m build --sdist --wheel --outdir dist/ .
- uses: actions/upload-artifact@v4
with:
path: dist/*

upload_pypi:
name: Upload to PyPI
needs: [build_sdist_and_wheel]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ python:
- method: pip
path: .
extra_requirements:
- docs
- docs
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.0.1 (2024-05-06)
==================

- Initial release, support for GameCube, SNES, PSX
17 changes: 17 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include README.md
include CHANGES.rst
include LICENSE
include pyproject.toml

recursive-include *.pyx *.c *.pxd
recursive-include docs *
recursive-include licenses *
recursive-include cextern *
recursive-include scripts *

prune build
prune docs/_build
prune docs/api
prune */__pycache__

global-exclude *.pyc *.o
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# romsearch
Your one-stop ROM shop
# ROMSearch

[![](https://img.shields.io/pypi/v/romsearch.svg?label=PyPI&style=flat-square)](https://pypi.org/pypi/romsearch/)
[![](https://img.shields.io/pypi/pyversions/romsearch.svg?label=Python&color=yellow&style=flat-square)](https://pypi.org/pypi/romsearch/)
[![Docs](https://readthedocs.org/projects/romsearch/badge/?version=latest&style=flat-square)](https://romsearch.readthedocs.io/en/latest/)
[![Actions](https://img.shields.io/github/actions/workflow/status/bbtufty/romsearch/build_test.yaml?branch=main&style=flat-square)](https://github.com/bbtufty/romsearch/actions)
[![License](https://img.shields.io/badge/license-GNUv3-blue.svg?label=License&style=flat-square)](LICENSE)

ROMSearch is designed as a simple-to-inferface with tool that will allow you to pull ROM files from some remote (or
local) location, figure out the best ROM, and move it cleanly to a folder that can imported into an emulator. ROMSearch
is supposed to be a one-shot program to get you from files online to playing games (which is what we want, right?).

ROMSearch offers the ability to:

* Sync from remote folder using rclone
* Parse DAT files as well as filenames for ROM information
* Remove dupes from ROM lists using DAT files as well as the excellent ``retool`` clonelists
* Moving files to a structured location, including potentially additional files that may be needed
* Discord integration so users can see the results of runs in a simple, clean way

To get started, see the [documentation](https://romsearch.readthedocs.io/en/latest/).

Currently, ROMSearch is in early development, and so many features may be added over time. At the moment, ROMSearch
works for the following consoles:

* Nintendo - GameCube
* Nintendo - Super Nintendo Entertainment System
* Sony - PlayStation

but be aware there may be quirks that will only become apparent over time. We encourage users to open
[issues](https://github.com/bbtufty/romsearch/issues) as and where they find them.
45 changes: 45 additions & 0 deletions docs/1g1r.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
####
1G1R
####

ROMSearch operates on a "one game, one ROM" (1G1R) philosophy. This means that for each game, it will find the
ROM file that it believes to be the best. The approach ROMSearch takes depends mostly on regions, languages,
versioning, and optional name priority, with regions being the ultimate discriminator.

Languages
---------

Many ROMs are tagged with languages (En, Es, etc), that will be parsed out during the run. If a ROM does not contain
the language the user has specified (most likely En), then this will be removed from the choice.

A lot of ROMs do not have any language tags (particularly US ones). For these, we currently do not cut them out,
but this may change in the future to associate a region with an implicit language.

Versions
--------

There may be different versions of ROMs (e.g. Rev 1, v2.0, etc). For these, we will take the latest one per unique
region combination as the latest and greatest version.

Priority
--------

Some files are essentially stripped down versions of games and so should be de-prioritised versus others. To get
a priority, we use the ``retool`` clonelists.

Regions
-------

After the various cuts, there will still be a number ROMs that pass all check. We therefore do a final filter by
region (e.g. USA, Europe) to get to a final ROM. ROMSearch will choose the ROM with the highest region preference
for each game, so order is important here!

Others
------

There are some other cuts that go into deciding the best ROM. These include:

* Improved version tags (e.g. "EDC" for PS1 games)
* Removing of demos/preproduction ROMs

The final result is that you should get the single best ROM for your preferences. Hooray!
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#########
Changelog
#########

.. include:: ../CHANGES.rst
50 changes: 50 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys
sys.path.insert(0, os.path.abspath('..'))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'romsearch'
copyright = '2024, bbtufty'
author = 'bbtufty'
release = '0.0.1'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx_automodapi.automodapi',
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

master_doc = 'index'

todo_include_todos = True

html_theme_options = {
'collapse_navigation': False,
'navigation_depth': 4,
'globaltoc_collapse': False,
'globaltoc_includehidden': False,
'display_version': True,
}

autoclass_content = 'both'

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = []
19 changes: 19 additions & 0 deletions docs/configs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
############
Config Files
############

ROMSearch is controlled primarily through a number of .yml files, which makes extending its functionality simple
without having to delve deep into the code. Here is a comprehensive list of those config files, along with arguments
for each for those who may want to extend ROMSearch's capabilities.

.. toctree::
:glob:
:titlesonly:
:maxdepth: 2

configs/config
configs/platforms
configs/dats
configs/clonelists
configs/regex
configs/defaults
Loading

0 comments on commit d102131

Please sign in to comment.