Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

[Breaking] PyPi publish changes - unleash the Poetry! #36

Merged
merged 6 commits into from
Nov 2, 2022
Merged
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
26 changes: 17 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,23 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.11
# mkdocs' gh-deploy command uses the 'legacy' method of deploying custom sites to Pages
# which is placing the built files on a gh-pages branch with a .nojekyll.
# (Source: https://github.com/mkdocs/mkdocs/blob/master/mkdocs/commands/gh_deploy.py#L127)
# Since then, GitHub has released a way to deploy to Pages directly from Actions.
# Which makes our lifes a lot easier.
- name: Install dependencies and build
run: |
python -m venv .
pip install mkdocs mkdocstrings[python] mkdocs-material
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: docs-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with docs
- name: Build with mkdocs
run:
source .venv/bin/activate
mkdocs build -d site
- name: Upload built site
uses: actions/upload-pages-artifact@v1
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Lint VanillaInstaller

on: [push, pull_request]

permissions:
contents: read

jobs:
lint:
name: Lint with flake8
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Linting is done with one version of python
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: ci-lint-venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with ci
- name: Lint with flake8
run: |
source .venv/bin/activate
# stop the build if there are Python syntax errors or undefined names
flake8 ./vanilla_installer/ --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./vanilla_installer/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --ignore=E501,E722,E266
36 changes: 0 additions & 36 deletions .github/workflows/pylint.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ temp/
tests/
%USERPROFILE%
logs/
disticon.png

# Editors
.vscode/launch.json
Expand Down
6 changes: 4 additions & 2 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM gitpod/workspace-python-3.10
FROM gitpod/workspace-python

RUN sudo upgrade-packages
RUN sudo upgrade-packages \
&& sudo install-packages python-is-python3 \
&& curl -sSL https://install.python-poetry.org | python3 -
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vscode:
- Vtrois.gitmoji-vscode
tasks:
- name: Install dependencies
init: cd envs/3.10 && pipenv install
init: poetry install --with dev
gitConfig:
core.eol: "LF"
core.autocrlf: "false"
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"**/Thumbs.db": true,
"**/.css": true,
"**/.css.map": true,
"vanilla-installer/__pycache__": true
"vanilla_installer/__pycache__": true
},
"hide-files.files": [
"vanilla-installer/__pycache__"
"vanilla_installer/__pycache__"
],
"cSpell.words": [
"modpack",
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

- As of right now, we do not support **translations**, but you are welcome to implement such feature if you're a developer!

- As FO does not accept monetary contributions, VanillaInstaller does not accept them either.

[More ways to support (some of them involve the modpack itself)](https://github.com/Fabulously-Optimized/fabulously-optimized/blob/main/CONTRIBUTING.md)

Thanks a lot! :heart:
5 changes: 4 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@
## Reporting a Vulnerability

Please report any security vulnerabilities immediately to our team!
[Open an issue](https://github.com/Fabulously-Optimized/vanilla-installer/issues/new) stating how many people on which platforms could be affected.
However, please do not disclose it in a public issue as then the vulnerability may be exploited. Instead, do *one* of the following things:

- Email `[email protected]` with a note that this is for the Fabulously Optimized Vanilla Installer.
- If you are in the [Fabulously Optimized Discord server](https://discord.gg/yxaXtaQqdB), you may DM osfanbuff63#7137.
2 changes: 1 addition & 1 deletion docs/for-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ We have a [`gitpod`](https://gitpod.io) configuration, so click this to be autom
.gitignore ignores this folder by default.
I wouldn't recommend "git commit"-ing this folder, especially if there isn't any code which could be useful for other developers and contributors.

📂 vanilla-installer
📂 vanilla_installer
Actual Python scripts. (GUI, CLI, helpers etc.)

## Avoiding 404s
Expand Down
2 changes: 0 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# VanillaInstaller



<img alt="mkdocs" height="40" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@2/assets/compact/built-with/mkdocs_vector.svg">
5 changes: 3 additions & 2 deletions docs/planned-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

## Longer-term (major release)

- Migrate GUI to PySide6
- And therefore rewrite the entire GUI
None.

## Completed

- Add a CLI interface (likely using click)
- A custom profile for FO
- And therefore, no reliance on `fabric-installer`
- Migrate GUI to PySide6
- And therefore rewrite the entire GUI
2 changes: 1 addition & 1 deletion docs/reference/cli.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# cli.py reference

:::vanilla-installer.cli
:::vanilla_installer.cli
2 changes: 1 addition & 1 deletion docs/reference/gui.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# gui.py reference

:::vanilla-installer.gui
:::vanilla_installer.gui
2 changes: 1 addition & 1 deletion docs/reference/log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# log.py reference

:::vanilla-installer.log
:::vanilla_installer.log
2 changes: 1 addition & 1 deletion docs/reference/main.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# main.py reference

:::vanilla-installer.main
:::vanilla_installer.main
2 changes: 1 addition & 1 deletion docs/reference/theme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# theme.py reference

:::vanilla-installer.theme
:::vanilla_installer.theme
6 changes: 4 additions & 2 deletions docs/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The program is optimized for Python 3.8 and above, as well as Linux and Windows.

## Troubleshooting

Much of this advice is outdated, so it's recommended just to make a thread in [Fabulously Optimized's Discord](https://discord.gg/yxaXtaQqdB) until this is updated.

### Pixelated font / issues with Anaconda (Linux)

Does the font look pixelated and emojis are not loading?
Expand All @@ -32,7 +34,7 @@ Don't worry! Try the following commands (AFTER trying [install/linux.sh](/instal
```bash
#!/usr/bin/env/bash
python3.10 -m pip install -r requirements.txt
python3.10 vanilla-installer/gui.py
python3.10 vanilla_installer/gui.py
```

...whereas `3.10` can be any (supported) version, e.g. for `3.9`: the commands with `python3.9` in the beginning (you get the point). This makes sure *Anaconda* isn't used for executing the program.
Expand All @@ -58,7 +60,7 @@ The issue probably occurs because you haven't installed VanillaInstaller correct

```bash
#!/usr/bin/env/bash
python3.10 vanilla-installer/gui.py --safegui mode --litegui mode
python3.10 vanilla_installer/gui.py --safegui mode --litegui mode
```

Make sure to choose the correct version - or replace `python3.10` with `python3`, `python` or just `py`.
Expand Down
21 changes: 0 additions & 21 deletions envs/3.10/Pipfile

This file was deleted.

Loading