# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['yafti', 'yafti.plugin', 'yafti.screen']

package_data = \
{'': ['*']}

install_requires = \
['gbulb>=0.6.4,<0.7.0',
 'pydantic==1.10.2',
 'pygobject>=3.42.2,<4.0.0',
 'pyyaml>=6.0,<7.0']

entry_points = \
{'console_scripts': ['yafti = yafti.__main__:run'],
 'yafti.plugin': ['run = yafti.plugin.run:Run',
                  'yafti.plugin.flatpak = yafti.plugin.flatpak:Flatpak',
                  'yafti.plugin.run = yafti.plugin.run:Run'],
 'yafti.screen': ['yafti.screen.console = yafti.screen.console:ConsoleScreen',
                  'yafti.screen.package = yafti.screen.package:PackageScreen',
                  'yafti.screen.title = yafti.screen.title:TitleScreen']}

setup_kwargs = {
    'name': 'yafti',
    'version': '0.2.8',
    'description': 'Yet another first time installer',
    'long_description': '# Yet Another First Time Installer\n\nThis application is responsible for installing Flatpaks on first boot after a user finishes installation. \nIt is intended as a replacement for custom zenity dialogs. \n\n## Project goals\n\n* Config file driven via JSON/YAML\n* Support for arbitrary pre and post-install commands\n* Configuration driven screens\n* Screen independent state management with ability to set defaults\n* Extensible with drop-in Python classes / plugins to extend functionality\n\n## Core features\n\nThese are goals for each feature of the first time installer:\n\n### Title Screen\n\nThe Title screen will be comprised of three primary elements. An image/icon, a header/primary text, and a paragraph description text.\n\n```\n\n         ICON\n      TITLE TEXT\n\n  this is a description\n  to accompany the title\n  screen.\n```\n\n### Packages screen\n\nDisplay several groups of packages to install, allow for expansion of each group to individually select discrete packages or toggle the entire group on/off.\n\neg:\n```\nCore                [/] >\nGaming              [/] >\nOffice              [/] >\n```\n\nExpanding Core would reveal\n\n```\nCore                [/] v\n  firefox           [x]\n  calculator        [x]\n  text editor       [x]\n  clocks            [x]\n  fonts             [x]\nGaming              [/] >\nOffice              [/] >\n```\n\nThe application then installs the Flatpaks. Plugins for other packages systems may/can be developed.\n\n### Configuration\n\n```yaml\ntitle: uBlue First Boot\nactions:\n  pre:\n  - run: /full/path/to/bin --with --params\n  - run: /another/command run\n  - yafti.plugin.flatpak:\n      install: org.gnome.Calculator\n  post:\n  - run: /run/these/commands --after --all --screens\nscreens:\n  first-screen:\n    source: yafti.screen.title\n    values:\n      title: "That was pretty cool"\n      icon: "/path/to/icon"\n      description: |\n        Time to play overwatch\n  applications:\n    source: yafti.screen.package\n    values:\n      title: Package Installation\n      show_terminal: true\n      package_manager: yafti.plugin.flatpak\n      groups:\n        Core:\n          description: All the good stuff\n          packages:\n          - Calculator: org.gnome.Calculator\n          - Firefox: org.mozilla.firefox\n        Gaming:\n          description: GAMES GAMES GAMES\n          packages:\n          - Steam: com.valvesoftware.Steam\n          - Games: org.gnome.Games\n        Office:\n          description: All the work stuff\n          packages:\n          - LibreOffice: org.libreoffice.LibreOffice\n          - Calendar: org.gnome.Calendar\n  final-screen:\n    source: yafti.screen.title\n    values:\n      title: "All done"\n      icon: "/path/to/icon"\n      description: |\n        Thanks for installing, join the community, next steps\n```\n\n## Development\n\nThis project uses Poetry and Python 3.11. Make sure you have Python 3.11 and [Poetry installed](https://python-poetry.org/docs/). Checkout the repository and navigate to root project directory.\n\n### Prerequisites\n\nIf you\'re on a Ublue / immutable OS, you\'ll need to run these and the poetry install in a toolbox.\n\n```\nsudo dnf install python3-devel cairo-devel gobject-introspection-devel cairo-gobject-devel\npoetry install\n```\n\n### Running\n\n```\npoetry run python -m yafti tests/example.yml\n```\n\nThis will launch the Yafti window.\n\n### Testing\n\nThis project uses pytest, black, isort, and ruff for testing and linting.\n\n```\npoetry run pytest --cov=yafti --cov-report=term-missing\npoetry run black yafti\npoetry run isort yafti\npoetry run ruff yafti\n```\n\n## Contributing\n\nThis project follows a fork and pull request syle of contribution.\n\n### Creating a Fork\n\nJust head over to the GitHub page and [click the "Fork" button](https://help.github.com/articles/fork-a-repo). Once you\'ve done that, you can use your favorite git client to clone your repo or just head straight to the command line:\n\n```shell\n# Clone your fork to your local machine\ngit clone git@github.com:USERNAME/FORKED-PROJECT.git\n```\n\n### Keeping Your Fork Up to Date\n\nWhile this isn\'t an absolutely necessary step, if you plan on doing anything more than just a tiny quick fix, you\'ll want to make sure you keep your fork up to date by tracking the original "upstream" repo that you forked. You can do this by using [the Github UI](https://help.github.com/articles/syncing-a-fork) or locally by adding this repo as an upstream.\n\n```shell\n# Add \'upstream\' repo to list of remotes\ngit remote add upstream https://github.com/ublue-os/yafti.git\n\n# Verify the new remote named \'upstream\'\ngit remote -v\n```\n\nWhenever you want to update your fork with the latest upstream changes, you\'ll need to first fetch the upstream repo\'s branches and latest commits to bring them into your repository:\n\n```shell\n# Fetch from upstream remote\ngit fetch upstream\n\n# View all branches, including those from upstream\ngit branch -va\n```\n\nNow, checkout your own main branch and merge the upstream repo\'s main branch:\n\n```shell\n# Checkout your main branch and merge upstream\ngit checkout main\ngit merge --ff-only upstream/main\n```\n\nIf there are no unique commits on the local main branch, git will simply perform a fast-forward. However, if you have been making changes on main (in the vast majority of cases you probably shouldn\'t be - [see the next section](#doing-your-work), you may have to deal with conflicts. When doing so, be careful to respect the changes made upstream.\n\nNow, your local main branch is up-to-date with everything modified upstream.\n\n### Doing Your Work\n\n#### Create a Branch\n\nWhenever you begin work on a new feature or bugfix, it\'s important that you create a new branch. Not only is it proper git workflow, but it also keeps your changes organized and separated from the main branch so that you can easily submit and manage multiple pull requests for every task you complete.\n\nTo create a new branch and start working on it:\n\n```shell\n# Checkout the main branch - you want your new branch to come from main\ngit checkout main\n\n# Create a new branch named newfeature (give your branch its own simple informative name)\ngit checkbout -b newfeature\n```\n\nNow, go to town hacking away and making whatever changes you want to.\n\n#### Commit Messages\n\nWe use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and enforce them with a bot to keep the changelogs tidy:\n\n```\nchore: add Oyster build script\ndocs: explain hat wobble\nfeat: add beta sequence\nfix: remove broken confirmation message\nrefactor: share logic between 4d3d3d3 and flarhgunnstow\nstyle: convert tabs to spaces\ntest: ensure Tayne retains clothing\n```\n\nIf you have multiple commits, when [submitting your chages](#submitting-a-pull-request), make sure to use a conventional commit style PR title as this project does squash merges and that will be used as your contribution.\n\n### Submitting a Pull Request\n\n#### Cleaning Up Your Work\n\nPrior to submitting your pull request, you might want to do a few things to clean up your branch and make it as simple as possible for the original repo\'s maintainer to test, accept, and merge your work.\n\nIf any commits have been made to the upstream main branch, you should rebase your feature branch so that merging it will be a simple fast-forward that won\'t require any conflict resolution work.\n\n```shell\n# Fetch upstream main and merge with your repo\'s main branch\ngit fetch upstream\ngit checkout main\ngit merge upstream/main\n\n# If there were any new commits, rebase your feature branch\ngit checkout newfeature\ngit rebase main\n```\n\n#### Submitting\n\nOnce you\'ve committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your feature branch, and click the pull request button. If you need to make any adjustments to your pull request, just push the updates to GitHub. Your pull request will automatically track the changes on your feature branch and update.\n\n### Accepting and Merging a Pull Request\n\nTake note that unlike the previous sections which were written from the perspective of someone that created a fork and generated a pull request, this section is written from the perspective of the original repository owner who is handling an incoming pull request. Thus, where the "forker" was referring to the original repository as `upstream`, we\'re now looking at it as the owner of that original repository and the standard `origin` remote.\n\n#### Checking Out and Testing Pull Requests\n\nThere are multiple ways to [check out a pull request locally](https://help.github.com/articles/checking-out-pull-requests-locally). This way uses standard git operations to complete. Open up the `.git/config` file and add a new line under `[remote "origin"]`:\n\n```\nfetch = +refs/pull/*/head:refs/pull/origin/*\n```\n\nNow you can fetch and checkout any pull request so that you can test them:\n\n```shell\n# Fetch all pull request branches\ngit fetch origin\n\n# Checkout out a given pull request branch based on its number\ngit checkout -b 9001 pull/origin/9001\n```\n\nKeep in mind that these branches will be read only and you won\'t be able to push any changes.\n\n#### Automatically Merging a Pull Request\nIn cases where the merge would be a simple fast-forward, you can automatically do the merge by  clicking the button on the pull request page on GitHub.\n',
    'author': 'Marco Ceppi',
    'author_email': 'marco@ceppi.net',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'https://github.com/ublue-os/yafti',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.11,<4.0',
}


setup(**setup_kwargs)
