Skip to content

Commit

Permalink
added some cities from each state
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel3dartist committed Nov 30, 2023
1 parent e9e6ca0 commit 6bc242c
Show file tree
Hide file tree
Showing 34 changed files with 2,278 additions and 16 deletions.
Binary file modified .coverage
Binary file not shown.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[run]
source = pyFBIG/
source = tests/
omit = __init__.py
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
python3 -m pip install --upgrade pip
cd pyFBIG
python3 -m pip install -r requirements.txt
- name: Run tests
run: |
python3 -m pip install pytest
pytest --cov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run tests
run: |
python3 -m pip install pytest
pytest tests
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ print(rg)
rg = fake.rg(is_complete=True)
print(rg)
#{
# 'name':'Lucimara Santos Lemos',
# 'gender': 'F',
# 'birth': {
# {
# 'name':'Lucimara Santos Lemos',
# 'gender': 'F',
# 'birth': {
# 'day': '21/10/1954',
# 'city':'Pocos de Caldas',
# 'state':'MG'
Expand Down
14 changes: 8 additions & 6 deletions pyFBIG/BR_names/name.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
import json
import os
import pathlib
from pathlib import Path
from random import randrange

path = Path(__file__).parent.resolve()
path = str(path).replace('\\', '/')

class Name:
def __init__(self):
self.path = pathlib.Path(__file__).parent.resolve()
self.path = str(self.path).replace('\\', '/')
self.path = path

def json_load(self, name_list):
return json.load(name_list)

def female_name(self):
female_name = open(self.path + '/BR_female_names.json')
female_name = open(path + '/BR_female_names.json')
_list = self.json_load(name_list=female_name)
return _list['names']

def male_name(self):
male_name = open(self.path + '/BR_male_names.json')
male_name = open(path + '/BR_male_names.json')
_list = self.json_load(name_list=male_name)
return _list['names']

def surname(self):
male_name = open(self.path + '/BR_surnames.json')
male_name = open(path + '/BR_surnames.json')
_list = self.json_load(name_list=male_name)
return _list['surnames']

Expand Down
80 changes: 80 additions & 0 deletions pyFBIG/BR_states/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
from ac import AC
from al import AL
from am import AM
from ap import AP
from ba import BA
from ce import CE
from df import DF
from es import ES
from go import GO
from ma import MA
from mg import MG
from ms import MS
from mt import MT
from pa import PA
from pb import PB
from pe import PE
from pi import PI
from pr import PR
from rj import RJ
from rn import RN
from ro import RO
from rr import RR
from rs import RS
from sc import SC
from se import SE
from sp import SP
from to import TO

"""
states_name = {
'AC': {
'name': "Acre",
'acronym': 'AC',
'state_class': AC()
},
'AL':{
'name': "Alagoas",
'acronym': 'AL',
'state_class': AL(),
},
"Amapá",
"Amazonas",
"Bahia",
"Ceará",
"Distrito Federal",
"Espírito Santo",
"Goiás",
"Maranhão",
"Mato Grosso",
"Mato Grosso do Sul",
"Minas Gerais",
"Pará",
"Paraíba",
"Paraná",
"Pernambuco",
"Piauí",
"Rio de Janeiro",
"Rio Grande do Norte",
"Rio Grande do Sul",
"Rondônia",
"Roraima",
"Santa Catarina",
"São Paulo",
"Sergipe",
"Tocantins"
}
"""

class BRStates:
def __init__(self):
# self.states_name = states_name
self.states = [AC, AM, AP, BA, CE, DF, ES, GO, MA, MT, MS, MG, PA, PB, PR, PE]


if __name__ == '__main__':
br = BRStates()
# print(br.states_name)
for i in BRStates().states:
if i().cities:
print(i, i().cities)
20 changes: 20 additions & 0 deletions pyFBIG/BR_states/ac.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

class AC:
def __init__(self):
self.cities = [
"Rio Branco",
"Cruzeiro do Sul",
"Sena Madureira",
"Tarauacá",
"Feijó",
"Senador Guiomard",
"Xapuri",
"Porto Acre",
"Mâncio Lima",
"Jordão",
"Capixaba",
"Manoel Urbano",
"Assis Brasil",
"Plácido de Castro",
"Rodrigues Alves"
]
5 changes: 5 additions & 0 deletions pyFBIG/BR_states/al.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


class AL:
def __init__(self):
self.cities: str
103 changes: 103 additions & 0 deletions pyFBIG/BR_states/am.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@


class AM:
def __init__(self):
self.cities = [
"Manaus",
"Parintins",
"Itacoatiara",
"Manacapuru",
"Coari",
"Tefé",
"Tabatinga",
"Humaitá",
"Maués",
"Borba",
"Autazes",
"São Gabriel da Cachoeira",
"Eirunepé",
"Barcelos",
"Benjamin Constant",
"Boca do Acre",
"Careiro",
"Iranduba",
"Santo Antônio do Içá",
"São Paulo de Olivença",
"Tabatinga",
"Rio Preto da Eva",
"Manicoré",
"Presidente Figueiredo",
"Novo Aripuanã",
"Jutaí",
"Tonantins",
"Fonte Boa",
"Lábrea",
"Nova Olinda do Norte",
"Beruri",
"Uarini",
"Anamã",
"Urucurituba",
"Novo Airão",
"Silves",
"Tapauá",
"Careiro da Várzea",
"Urucará",
"Codajás",
"Atalaia do Norte",
"Pauini",
"Itapiranga",
"Amaturá",
"Alvarães",
"Manaquiri",
"Santa Isabel do Rio Negro",
"Canutama",
"Tefé",
"Japurá",
"Apui",
"Carauari",
"Barreirinha",
"Novo Airão",
"Envira",
"Juruá",
"Juruá",
"Itamarati",
"Uarini",
"Eirunepé",
"Fonte Boa",
"Guajará",
"Humaitá",
"Ipixuna",
"Iranduba",
"Itapiranga",
"Japurá",
"Juruá",
"Jutaí",
"Lábrea",
"Manacapuru",
"Manaquiri",
"Manaus",
"Manicoré",
"Maraã",
"Maués",
"Nhamundá",
"Nova Olinda do Norte",
"Novo Airão",
"Novo Aripuanã",
"Parintins",
"Pauini",
"Presidente Figueiredo",
"Rio Preto da Eva",
"Santa Isabel do Rio Negro",
"Santo Antônio do Içá",
"São Gabriel da Cachoeira",
"São Paulo de Olivença",
"São Sebastião do Uatumã",
"Silves",
"Tabatinga",
"Tapauá",
"Tefé",
"Tonantins",
"Uarini",
"Urucará",
"Urucurituba"
]
22 changes: 22 additions & 0 deletions pyFBIG/BR_states/ap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@


class AP:
def __init__(self):
self.cities = [
"Macapá",
"Santana",
"Laranjal do Jari",
"Oiapoque",
"Mazagão",
"Tartarugalzinho",
"Pedra Branca do Amapari",
"Porto Grande",
"Amapá",
"Cutias",
"Ferreira Gomes",
"Calçoene",
"Pracuúba",
"Serra do Navio",
"Itaubal",
"Vitória do Jari"
]
Loading

0 comments on commit 6bc242c

Please sign in to comment.