Skip to content

Commit

Permalink
Merge pull request #12 from lifs-tools/fileopenutf8
Browse files Browse the repository at this point in the history
Fix issues with platform encoding as default for file opening - explicitly set utf8
  • Loading branch information
dominik-kopczynski authored Aug 5, 2022
2 parents 80caee6 + 43336de commit a9caa2d
Show file tree
Hide file tree
Showing 51 changed files with 120 additions and 196 deletions.
84 changes: 0 additions & 84 deletions Jenkinsfile

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python3 implementation for Goslin
[![Build Status](https://travis-ci.org/lifs-tools/pygoslin.svg?branch=master)](https://travis-ci.org/lifs-tools/pygoslin)
[![Build Status](https://github.com/lifs-tools/pygoslin/actions/workflows/python-package.yml/badge.svg)](https://github.com/lifs-tools/pygoslin/actions/workflows/python-package.yml)

This is the Goslin reference implementation for Python 3.

Expand Down
4 changes: 2 additions & 2 deletions pygoslin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/Adduct.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/Cycle.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/Element.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/FattyAcid.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/Fragment.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions pygoslin/domain/FunctionalGroup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -254,7 +254,7 @@ def to_string(self, level):
_known_functional_groups, s = {}, SumFormulaParser()
fg_dir_name = path.dirname(pygoslin.__file__)
fg_file_name = path.join(fg_dir_name, "data", "goslin", "functional-groups.csv")
with open(fg_file_name, "rt") as fg_infile:
with open(fg_file_name, mode = "rt", encoding= "utf-8") as fg_infile:
fg_infile.readline()
for line in fg_infile:
line = line.strip()
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/HeadGroup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidAdduct.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidCategory.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions pygoslin/domain/LipidClass.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -62,7 +62,7 @@ def get_class(name):

all_lipids_dir_name = path.dirname(pygoslin.__file__)
file_name = path.join(all_lipids_dir_name, "data", "goslin", "lipid-list.csv")
with open(file_name, mode = "rt") as infile:
with open(file_name, mode = "rt", encoding= "utf-8") as infile:
line = infile.readline() # skip title row
lipid_reader = csv.reader(infile, delimiter=',', quotechar='"')
sum_formula_parser = SumFormulaParser()
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidCompleteStructure.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidExceptions.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidFaBondType.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidFullStructure.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidLevel.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidMolecularSpecies.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidSnPosition.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidSpecies.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidSpeciesInfo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/LipidStructureDefined.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/domain/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/parser/BaseParserEventHandler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/parser/FattyAcidParserEventHandler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions pygoslin/parser/GoslinParserEventHandler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
MIT License
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} isas.de
Nils Hoffmann - nils.hoffmann {at} isas.de
Copyright (c) 2020 Dominik Kopczynski - dominik.kopczynski {at} univie.ac.at
Nils Hoffmann - nils.hoffmann {at} cebitec.uni-bielefeld.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit a9caa2d

Please sign in to comment.