Changeset 69
- Timestamp:
- 10/11/21 16:01:02 (3 years ago)
- Files:
-
- 41 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
exampleparties/randomparty/requirements.txt
r67 r69 1 https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython/export/6 6/geniuswebcore/dist/geniusweb-1.1.0.tar.gz1 https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython/export/68/geniuswebcore/dist/geniusweb-1.1.1.tar.gz 2 2 mypy 3 3 -
exampleparties/randomparty/setup.py
r67 r69 3 3 setup( 4 4 name='randomparty', 5 version='1.1. 0',5 version='1.1.1', 6 6 description='A python3 party that places random bids with sufficient utility', 7 7 url='https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWeb', 8 8 author='W.Pasman', 9 9 packages=['randomparty'], 10 install_requires=[ "geniusweb@https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython/export/6 6/geniuswebcore/dist/geniusweb-1.1.0.tar.gz"],10 install_requires=[ "geniusweb@https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython/export/68/geniuswebcore/dist/geniusweb-1.1.1.tar.gz"], 11 11 py_modules=['party'] 12 12 ) -
exampleparties/stupidparty/requirements.txt
r67 r69 1 https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython/export/6 6/geniuswebcore/dist/geniusweb-1.1.0.tar.gz1 https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython/export/68/geniuswebcore/dist/geniusweb-1.1.1.tar.gz 2 2 mypy 3 3 -
exampleparties/stupidparty/setup.py
r67 r69 3 3 setup( 4 4 name='stupidparty', 5 version='1.1. 0',5 version='1.1.1', 6 6 description='A example python3 party module', 7 7 url='https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWeb', 8 8 author='W.Pasman', 9 9 packages=['stupidparty'], 10 install_requires=[ "geniusweb@https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython/export/6 6/geniuswebcore/dist/geniusweb-1.1.0.tar.gz"],10 install_requires=[ "geniusweb@https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPython/export/68/geniuswebcore/dist/geniusweb-1.1.1.tar.gz"], 11 11 py_modules=['party'], 12 12 -
geniuswebcore/geniusweb/progress/ProgressTime.py
r67 r69 55 55 56 56 def getTerminationTime(self) -> datetime: 57 return datetime.fromtimestamp( int(datetime.timestamp(self._start)*1000) + self._duration);57 return datetime.fromtimestamp( (int(datetime.timestamp(self._start)*1000) + self._duration)/1000.); 58 58 59 59 -
geniuswebcore/geniusweb/protocol/NegoSettings.py
r67 r69 8 8 9 9 10 @JsonSubTypes( ["geniusweb.protocol.session.saop.SAOPSettings.SAOPSettings" ]) 10 @JsonSubTypes( ["geniusweb.protocol.session.saop.SAOPSettings.SAOPSettings", 11 "geniusweb.protocol.session.mopac.MOPACSettings.MOPACSettings" ]) 11 12 @JsonTypeInfo(use = Id.NAME, include = As.WRAPPER_OBJECT) 12 13 class NegoSettings(ABC): -
geniuswebcore/requirements.txt
r67 r69 1 1 wheel 2 https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/3 06/pyson/dist/pyson-1.1.1.tar.gz3 https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/30 4/utilitiespy/dist/utilities-1.0.3.tar.gz2 https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/312/pyson/dist/pyson-1.1.3.tar.gz 3 https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/309/utilitiespy/dist/utilities-1.0.4.tar.gz 4 4 https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/226/loggingpy/dist/logging-1.0.0.tar.gz 5 5 websocket-client==1.0.1 -
geniuswebcore/setup.py
r67 r69 3 3 setup( 4 4 name='geniusweb', 5 version='1.1. 0',5 version='1.1.1', 6 6 description='GeniusWeb glue code to connect python3 parties', 7 7 url='https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWeb', … … 11 11 package_data = { 'geniusweb': ['py.typed'],'tudelft': ['py.typed'] }, 12 12 install_requires=[ 13 "pyson@https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/3 06/pyson/dist/pyson-1.1.1.tar.gz",14 "utilities@https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/30 4/utilitiespy/dist/utilities-1.0.3.tar.gz",13 "pyson@https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/312/pyson/dist/pyson-1.1.3.tar.gz", 14 "utilities@https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/309/utilitiespy/dist/utilities-1.0.4.tar.gz", 15 15 "logging@https://tracinsy.ewi.tudelft.nl/pubtrac/Utilities/export/226/loggingpy/dist/logging-1.0.0.tar.gz", 16 16 "websocket-client==1.0.1" -
geniuswebcore/test/geniusweb/progress/ProgressTimeTest.py
r67 r69 41 41 42 42 def testTerminationTime(self): 43 self.assertEqual(datetime.fromtimestamp( 100000900+1999), self.progress.getTerminationTime())43 self.assertEqual(datetime.fromtimestamp((100000900+1999)/1000), self.progress.getTerminationTime()) 44 44 45 45 def testGet(self): -
geniuswebcore/test/geniusweb/simplerunner/SessionRunnerE2ETest.py
r67 r69 27 27 params = ["test/resources/settings.json", 28 28 # "test/resources/settings2.json" , PARTIALORDERING NOT YET 29 "test/resources/settingsbadprofile.json" 29 "test/resources/settingsbadprofile.json", 30 30 # "test/resources/shaoptoursettings.json", ALLPERMUTATIONSETTINGS NOT YET 31 # "test/resources/mopac.json" , MOPAC NOT YET 31 "test/resources/mopac.json" 32 32 # "test/resources/tournament.json" ALLPERMUTATIONSETTINGS NOT YET 33 33 ] -
geniuswebcore/test/resources/mopac.json
r67 r69 4 4 {"TeamInfo":{"parties":[ 5 5 { 6 "party": {"partyref":" classpath:geniusweb.exampleparties.randomparty.RandomParty", "parameters":{"power":1}},7 "profile": "file: src/test/resources/jobs/jobs1.json"6 "party": {"partyref":"pythonpath:test.testparty.TestParty.TestParty", "parameters":{"power":1}}, 7 "profile": "file:test/resources/jobs/jobs1.json" 8 8 } ]}}, 9 9 10 10 {"TeamInfo":{"parties":[ 11 11 { 12 "party": {"partyref":" classpath:geniusweb.exampleparties.randomparty.RandomParty", "parameters":{"power":1}},13 "profile": "file: src/test/resources/jobs/jobs2.json"12 "party": {"partyref":"pythonpath:test.testparty.TestParty.TestParty", "parameters":{"power":1}}, 13 "profile": "file:test/resources/jobs/jobs2.json" 14 14 } ]}} ], 15 15 "deadline": { -
geniuswebcore/test/testparty/TestParty.py
r67 r69 2 2 import logging 3 3 import sys 4 from typing import Dict, Any 4 from typing import Dict, Any, Set 5 5 from typing import cast 6 6 … … 9 9 from geniusweb.actions.Offer import Offer 10 10 from geniusweb.actions.PartyId import PartyId 11 from geniusweb.actions.Vote import Vote 12 from geniusweb.actions.Votes import Votes 11 13 from geniusweb.inform.ActionDone import ActionDone 12 14 from geniusweb.inform.Finished import Finished 13 15 from geniusweb.inform.Inform import Inform 16 from geniusweb.inform.OptIn import OptIn 14 17 from geniusweb.inform.Settings import Settings 18 from geniusweb.inform.Voting import Voting 15 19 from geniusweb.inform.YourTurn import YourTurn 16 20 from geniusweb.issuevalue.Bid import Bid … … 35 39 #self.getReporter().log(logging.INFO,"received info:"+str(info)) 36 40 if isinstance(info,Settings) : 37 se ttings:Settings=cast(Settings,info)38 self._me = se ttings.getID()39 self._protocol = se ttings.getProtocol()41 self._settings:Settings=cast(Settings,info) 42 self._me = self._settings.getID() 43 self._protocol = self._settings.getProtocol() 40 44 elif isinstance(info, ActionDone): 41 45 action:Action=cast( ActionDone,info).getAction() … … 54 58 val(self.getConnection()).send(offer) 55 59 self.getReporter().log(logging.INFO,"sent empty offer:") 60 elif isinstance(info, Voting): 61 # MOPAC protocol 62 self._lastvotes = self._vote(cast(Voting, info)); 63 val(self.getConnection()).send(self._lastvotes) 64 elif isinstance(info, OptIn): 65 val(self.getConnection()).send(self._lastvotes) 66 56 67 elif isinstance(info, Finished): 57 68 self.terminate() … … 76 87 self._profile = None 77 88 89 def _vote(self, voting:Voting) ->Votes : 90 ''' 91 @param voting the {@link Voting} object containing the options 92 93 @return our next Votes. Stupid: vote for all received offers. 94 ''' 95 votes:Set[Vote] = set([Vote(self._me, offer.getBid(), 2, 5)\ 96 for offer in voting.getOffers() ]) 97 return Votes(self._me, votes)
Note:
See TracChangeset
for help on using the changeset viewer.