Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
Merge branch 'main' of https://github.com/RLNT/bl2_eridium
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronophylos committed Mar 23, 2021
2 parents 0c8dfdd + 4af0f17 commit a5582d0
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 33 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]
env:
MOD_NAME: EridiumLib
RELEASE_FILES: "*.py LICENSE licenses dist"
UNREALSDK_PYI_URL: https://gist.githubusercontent.com/Chronophylos/b77049094c20c6906ebe13d042a07998/raw/bf05d45e33c9f69f03eb8b90d72e85d4b2f61ff0/unrealsdk.pyi

jobs:
check:
Expand All @@ -21,6 +22,9 @@ jobs:
cd PythonSDK
git sparse-checkout init --cone
git sparse-checkout set Mods
- name: Download unrealsdk.pyi
run: Invoke-WebRequest -Uri ${{ env.UNREALSDK_PYI_URL }} -Outfile PythonSDK/unrealsdk.pyi

- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -51,6 +55,7 @@ jobs:

build:
runs-on: ubuntu-latest
needs: check
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
Expand All @@ -69,6 +74,3 @@ jobs:
${{ env.MOD_NAME }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



42 changes: 30 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,74 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog][keep a changelog] and this project adheres to [Semantic Versioning][semantic versioning].

## [Unreleased]

## [0.3.1] - 2021-03-22
- /

---

## [Released]

## [0.3.2] - 2021-03-22

### Added
- modinfo for mod database

### Fixed
- semver checks


## [0.3.1] - 2021-03-22

### Added
- Log python version

### Fixed

- Installed ujson for Win32 Python 3.7


## [0.3.0] - 2021-03-22

### Added

- Export `socket`, `ssl`, `requests`, `semver` and `ujson`

### Changed

- Rename to `EridiumLib`
- `log` now takes multiple argument to be closer to `unrealsdk.Log`


## [0.2.0] - 2021-03-20

### Added

- `dist` with `_socket`, `_ssl` and other files needed to make `requests` work
- `getLatestVersion` and `isLatestRelease` functions
- Automatic releases and linting with Github Actions
- Licenses for *OpenSSL* and *Python 3.7*

### Changed

- Moved `isClient` to `Eridium`
- Mod name to `EridiumLib`

### Removed

- Wrapped classes, they do not align with the goal of this library


## [0.1.0] - 2021-03-19
- Initial Release


Initial Release
<!-- Links -->
[keep a changelog]: https://keepachangelog.com/
[semantic versioning]: https://semver.org/

[Unreleased]: https://github.com/RLNT/bl2_eridium/compare/v0.3.1...HEAD
<!-- Versions -->
[unreleased]: https://github.com/RLNT/bl2_eridium/compare/v1.0.0...HEAD
[released]: https://github.com/RLNT/bl2_eridium/releases
[0.3.2]: https://github.com/RLNT/bl2_eridium/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/RLNT/bl2_eridium/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/RLNT/bl2_eridium/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/RLNT/bl2_eridium/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/RLNT/bl2_eridium/releases/tag/v0.1.0
[0.1.0]: https://github.com/RLNT/bl2_eridium/releases/tag/v0.1.0
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# **Eridium Lib**
# **Eridium Lib** [![Workflow Status][workflow_status_badge]][workflow_status_link] [![Total Downloads][total_downloads_badge]][total_downloads_link] [![License][license_badge]][license]

> A [PythonSDK] library for Borderlands which holds utility functions for all our mods.
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/RLNT/bl2_eridium/CI?style=for-the-badge)](https://github.com/RLNT/bl2_eridium/actions/workflows/main.yml)
[![GitHub release (latest by date)](https://img.shields.io/github/downloads/RLNT/bl2_eridium/total?style=for-the-badge)](https://github.com/RLNT/bl2_eridium/releases/latest)
[![GitHub](https://img.shields.io/github/license/RLNT/bl2_eridium?style=for-the-badge)](LICENSE)
[![Code Style Black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://github.com/psf/black)

- [Discord][discord]
- PythonSDK: `v0.7.9`
- Mod Menu: `v2.4`
Expand Down Expand Up @@ -57,14 +52,21 @@ Everything related to versions and their release notes can be found in the [chan


## **🎓 License**
This project and all containing files, except for those in `dist`, are licensed under [GPL-3.0-or-later][license].
This project and all containing files, except for those in `dist`, are licensed under [LGPL-2.1-or-later][license].

- OpenSSL 1.1 is licensed under [the dual OpenSSL and SSLeay license][openssl_license]
- Python 3.7 is licensed under [the Python License][python_license]

You can find licenses for python packages downloaded with `pip` in their respective `*.dist-info` directory.


<!-- Badges -->
[workflow_status_badge]: https://img.shields.io/github/workflow/status/RLNT/bl2_eridium/CI?style=flat-square
[workflow_status_link]: https://github.com/RLNT/bl2_eridium/actions/workflows/main.yml
[total_downloads_badge]: https://img.shields.io/github/downloads/RLNT/bl2_eridium/total?style=flat-square
[total_downloads_link]: https://github.com/RLNT/bl2_eridium/releases/latest
[license_badge]: https://img.shields.io/github/license/RLNT/bl2_eridium?style=flat-square

<!-- Links -->
[pythonsdk]: http://borderlandsmodding.com/sdk-mods/
[discord]: https://discordapp.com/invite/Q3qxws6
Expand Down
9 changes: 7 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"socket",
"ssl",
]
__version__ = "0.3.1"
__version__ = "0.3.2"


def log(mod: SDKMod, *args: Any) -> None:
Expand All @@ -79,12 +79,17 @@ def getLatestVersion(repo: str) -> str:


def isLatestRelease(latest_version: str, current_version: str) -> bool:
if latest_version[0] == "v":
latest_version = latest_version[1:]
if current_version[0] == "v":
current_version = current_version[1:]

return int(semver.compare(current_version, latest_version)) >= 0


class EridiumLib(SDKMod):
Name = "EridiumLib"
Author = "Chronophylos"
Author = "Chronophylos, Relentless"
Description = "A library with common functionality of all our mods"
Version = __version__

Expand Down
21 changes: 21 additions & 0 deletions modinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"mods": [
{
"name": "EridiumLib",
"authors": "Chronophylos, Relentless",
"description": "Holds utility functions for some mods.",
"types": ["Library"],
"supports": ["BL2", "TPS"],
"issues": "https://github.com/RLNT/bl2_eridium/issues",
"source": "https://github.com/RLNT/bl2_eridium",
"latest": "0.3.2",
"versions": {
"0.3.2": "https://github.com/RLNT/bl2_eridium/releases/tag/v0.3.2"
},
"license": [
"GNU Lesser General Public License v2.1",
"https://github.com/RLNT/bl2_eridium/blob/main/LICENSE"
]
}
]
}
18 changes: 9 additions & 9 deletions requirements-linters.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
flake8-bugbear==20.11.1
flake8-comprehensions==3.3.1
flake8-mutable==1.2.0
flake8-noqa==1.1.0
flake8-pyi==20.10.0
flake8-simplify==0.13.0
flake8==3.8.4
isort==5.7.0
flake8-bugbear~=20.11.1
flake8-comprehensions~=3.4.0
flake8-mutable~=1.2.0
flake8-noqa~=1.1.0
flake8-pyi~=20.10.0
flake8-simplify~=0.13.0
flake8~=3.8.4
isort~=5.7.0
mypy~=0.812
pep8-naming==0.11.1
pep8-naming~=0.11.1
black~=20.8b1

0 comments on commit a5582d0

Please sign in to comment.