Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added australian profiles and fixed few typos #252

Closed
wants to merge 5 commits into from

Conversation

Andrej730
Copy link
Contributor

I've added australian bluescope i-beam, c-beam, l-beam and hollow (circular, rectangular and squared) profiles. I was using Lysaght referee for the data reference - https://cdn.dcs.bluescope.com.au/download/the-lysaght-referee-35th-edition

Also fixed a few bugs/typos in current .blt profiles data that were causing exception during import boltspy:
546469d
Changed hexagonlocknut name to "Metric hexagon locknut" ad72346

It was producing the error below if you try to `import boltspy`.

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "%localappdata%\Local\Programs\Python\Python310\lib\site-packages\boltspy\__init__.py", line 26, in <module>
    repo = blt.Repository(rootpath)
  File "%localappdata%\Programs\Python\Python310\lib\site-packages\boltspy\bolttools\blt.py", line 289, in __init__
    cls = Class(cl)
  File "%localappdata%\Programs\Python\Python310\lib\site-packages\boltspy\bolttools\blt.py", line 134, in __init__
    self.parameters = Parameters(cl.get("parameters",{"types" : {}}))
  File "%localappdata%\Programs\Python\Python310\lib\site-packages\boltspy\bolttools\common.py", line 463, in __init__
    table._normalize_and_check_types(self.types)
  File "%localappdata%\Programs\Python\Python310\lib\site-packages\boltspy\bolttools\common.py", line 655, in _normalize_and_check_types
    raise ValueError("Column is missing for row: %s" % key)
ValueError: Column is missing for row: M16
```
Previous name "Metric hexagon nut" already belongs to "hexagonnut1".

Without fix `import boltspy` was raising an error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "%localappdata%\Programs\Python\Python310\lib\site-packages\boltspy\__init__.py", line 26, in <module>
    repo = blt.Repository(rootpath)
  File "%localappdata%\Programs\Python\Python310\lib\site-packages\boltspy\bolttools\blt.py", line 324, in __init__
    raise MalformedRepositoryError("Duplicate name %s" % name.get_id())
boltspy.bolttools.errors.MalformedRepositoryError: Duplicate name MetricHexagonNut.
@berndhahnebach
Copy link
Contributor

would it be possible to make two PRs, one for the changes on existing data and code and one for all the new additions of australian data. Review would much more simpler ...

Do you know how to change commit messages afterwards? If yes would it be possible to start with one word which indicates what is the change about. Have a look at my commit messages. https://github.com/boltsparts/BOLTS/commits/master

cheers bernd

@berndhahnebach
Copy link
Contributor

BTW: great to see this development :-)

@Andrej730
Copy link
Contributor Author

Created two separate PRs, added "data:" prefix to commits.
PRs: #254 #255

@Andrej730 Andrej730 closed this Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants