Skip to content

Commit

Permalink
feat: added merge with akas
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Dieck authored and SlashGordon committed Nov 23, 2022
1 parent 206a1a0 commit b648dfc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
matrix:
python: [3.8]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get install libcurl4-openssl-dev
Expand All @@ -36,7 +38,7 @@ jobs:
parallel: true
debug: true
- name: Python Semantic Release
uses: relekang/python-semantic-release@master
uses: relekang/python-semantic-release@v7.32.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN_PP }}
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PyYAML==5.4.1
PyYAML==6.0
wptools==0.4.17
wikipedia==1.4.0
pandas==1.4.0
pandas==1.5.1
pycountry==22.3.5
Unidecode==1.3.6
uplink==0.9.7
pytickersymbols>=1.6.0
pytickersymbols>=1.12.0
toolz==0.12.0
23 changes: 23 additions & 0 deletions src/pysymbolscanner/index_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ class Indices:
'Name',
['en'],
),
Statics.Indices.US_SP_600: IndexSource(
'List_of_S%26P_600_companies',
[
'Company',
'Symbol',
'GICS Sector',
'GICS Sub-Industry',
'SEC filings',
'CIK',
],
'en',
'Symbol',
'Company',
['en'],
),
Statics.Indices.ES_IBEX_35: IndexSource(
'IBEX_35',
['Company', 'Ticker', 'Sector'],
Expand All @@ -94,6 +109,14 @@ class Indices:
'Name',
['de', 'en'],
),
Statics.Indices.DE_CDAX: IndexSource(
'Liste_der_im_CDAX_gelisteten_Aktien',
['ISIN', 'Logo', 'Name', 'Sitz'],
'de',
None,
'Name',
['de'],
),
Statics.Indices.FR_CAC_60: IndexSource(
'CAC_Mid_60',
['Unternehmen', 'Branche', 'Logo'],
Expand Down
5 changes: 5 additions & 0 deletions src/pysymbolscanner/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ def find_by_symbol(stock, py_stocks):
@staticmethod
def find_by_symbol_and_country(stock, py_stocks):
for idx, py_stock in enumerate(py_stocks):
if (
stock['name'] in py_stock['akas']
or stock['wiki_name'] in py_stock['akas']
):
return idx
if (
stock['symbol'] == py_stock['symbol']
and stock['country'] == py_stock['country']
Expand Down

0 comments on commit b648dfc

Please sign in to comment.