1
0

Initial
Some checks failed
Test Python / Test (push) Failing after 20s

This commit is contained in:
Jon Michael Aanes 2024-05-29 21:54:45 +02:00
commit 6d44aec4bc
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA
11 changed files with 134 additions and 0 deletions

View File

@ -0,0 +1,15 @@
name: Package Python
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
Package:
uses: jmaa/workflows/.gitea/workflows/python-package.yaml@v6.21
with:
REGISTRY_DOMAIN: gitfub.space
REGISTRY_ORGANIZATION: usagi-keiretsu
secrets:
PIPY_REPO_USER: ${{ secrets.PIPY_REPO_USER }}
PIPY_REPO_PASS: ${{ secrets.PIPY_REPO_PASS }}

View File

@ -0,0 +1,6 @@
name: Test Python
on: [push]
jobs:
Test:
uses: jmaa/workflows/.gitea/workflows/python-test.yaml@v6.21

19
.gitignore vendored Normal file
View File

@ -0,0 +1,19 @@
# Program specific
/output/
/deps/
/secrets/
/private_deps/
/data/
# Python
__pycache__/
/build/
/dist/
*.egg-info/
.mypy_cache/
# Python, Testing
/test/secrets.py
/.coverage
/.hypothesis/
/htmlcov/

14
README.md Normal file
View File

@ -0,0 +1,14 @@
# Financial Depository Fetchers
Python library for automatic fetching of personal asset depo information.
Supports:
- None :)
## TODO
- [ ] Kraken through API
- [ ] Partisia Blockchain Account
- [ ] Nordnet
- [ ] Bank Account (Open Banking)

1
fin_depo/__init__.py Normal file
View File

@ -0,0 +1 @@
# TODO

1
fin_depo/_version.py Normal file
View File

@ -0,0 +1 @@
__version__ = '0.1.0'

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
enforce-typing

1
requirements_test.txt Normal file
View File

@ -0,0 +1 @@
pytest

71
setup.py Normal file
View File

@ -0,0 +1,71 @@
#!/usr/bin/env python
#
# WARNING
#
# THIS IS AN AUTOGENERATED FILE.
#
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
import re
from setuptools import setup
PACKAGE_NAME = 'fin_depo'
with open('README.md') as f:
readme = f.read()
def parse_version_file(text: str) -> str:
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
if match is None:
msg = 'Malformed _version.py file!'
raise Exception(msg)
return match.group(2)
with open(PACKAGE_NAME + '/_version.py') as f:
version = parse_version_file(f.read())
def parse_requirements(text: str) -> list[str]:
return text.strip().split('\n')
def read_requirements(path: str) -> list[str]:
with open(path) as f:
return parse_requirements(f.read())
def determine_short_description(readme: str) -> str:
readme = re.sub(r'#+[^\n]*\n+', '', readme)
m = re.search(r'^\s*(\w+[\w\s,`+-]+\.)', readme)
try:
return m.group(1)
except AttributeError as err:
msg = f'Could not determine short description: {readme}'
raise Exception(msg) from err
REQUIREMENTS_MAIN = """
enforce-typing
"""
REQUIREMENTS_TEST = """
pytest
"""
setup(
name=PACKAGE_NAME,
version=version,
description=determine_short_description(readme),
long_description=readme,
long_description_content_type='text/markdown',
author='Jmaa',
author_email='jonjmaa@gmail.com',
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
packages=[PACKAGE_NAME],
install_requires=parse_requirements(REQUIREMENTS_MAIN),
extras_require={
'test': parse_requirements(REQUIREMENTS_TEST),
},
python_requires='>=3.9',
)

0
test/__init__.py Normal file
View File

5
test/test_data.py Normal file
View File

@ -0,0 +1,5 @@
import pytest
import fin_depo
# TODO